ROROperator Class

(Automation::ROROperator)

The ROROperator rotates bits in a value to the right right by NumBitsToRotate, or by the value retrieved by RotateRouting, if specified. More...

Header: #include <ROROperator>
Inherits: CDPOperator<OPERATOR_TYPE>

Public Functions

ROROperator(const CDPPropertyBase &in)
~ROROperator()

Reimplemented Public Functions

virtual void Configure(XMLPrimitive *operatorXML) override
virtual void Create(const char *shortName, CDPBaseObject *parent) override
virtual void FillNodeChildren(CDP::StudioAPI::NodeStream &stream) const override
virtual std::string GetNodeTypeName() const override
virtual unsigned int Process() override

Additional Inherited Members

Detailed Description

The ROROperator rotates bits in a value to the right right by NumBitsToRotate, or by the value retrieved by RotateRouting, if specified.

The bits rotated out to the right, are rotated back in from the left. In other words, when rotating 1 bit right, the least significant bit becomes the most significant bit, and all the other bits move one bit to the right.

Example

To rotate a signal value 4 bits to the right, add a ROROperator<unsigned short> into a Signal<unsigned short> in Configure mode. Then go into the ROROperator that was added, and set NumBitsToRotate to 4.

How to Run the Example

To run the example from CDP Studio, open Welcome mode and find it under Examples. Next, in Configure mode right click on the system project and select Run & Connect. See the Running the Example Project tutorial for more information.

Set the signal Value containing the ROR operator to 0x000f (15), and verify that the value after the operator has been applied becomes 0xf000(61440)

Member Function Documentation

ROROperator::ROROperator(const CDPPropertyBase &in)

Default constructs an instance of ROROperator.

ROROperator::~ROROperator()

Destroys the instance of ROROperator.

[override virtual] void ROROperator::Configure(XMLPrimitive *operatorXML)

[override virtual] void ROROperator::Create(const char *shortName, CDPBaseObject *parent)

[override virtual] void ROROperator::FillNodeChildren(CDP::StudioAPI::NodeStream &stream) const

[override virtual] std::string ROROperator::GetNodeTypeName() const

[override virtual] unsigned int ROROperator::Process()