MODOperator Class

(Automation::MODOperator)

The MODOperator applies Modulo Division on the input so that the output value becomes the remainder of the division. More...

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

Public Functions

MODOperator(const CDPPropertyBase &in)
~MODOperator()

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 MODOperator applies Modulo Division on the input so that the output value becomes the remainder of the division.

The Modulo value is taken from Modulo or, if specified, from the value retrieved from ModuloRouting.

Example

Add a MODOperator<unsigned short> into a Signal<unsigned short> in Configure mode. Then go into the MODOperator that was added, and set Modulo to 2.

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 ROL operator to 9, and verify that the value after the operator has been applied becomes 1.

Member Function Documentation

MODOperator::MODOperator(const CDPPropertyBase &in)

Default constructs an instance of MODOperator.

MODOperator::~MODOperator()

Destroys the instance of MODOperator.

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

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

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

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

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