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 |
- 9 public functions inherited from CDPOperator
- 5 public functions inherited from CDPOperatorBase
- 42 public functions inherited from CDPBaseObject
- 17 public functions inherited from CDP::StudioAPI::CDPNode
Additional Inherited Members
- 1 static public member inherited from CDPBaseObject
- 1 protected function inherited from CDPBaseObject
- 1 protected function inherited from CDP::StudioAPI::CDPNode
- 7 protected variables inherited from CDPOperator
- 1 protected type inherited from CDPOperatorBase
- 10 protected variables inherited from CDPBaseObject
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.