MUXOperator Class


The MUXOperator is a multiplexer that selects one source from a selection of many sources. More...

Header: #include <MUXOperator>
Inherits: ArgumentableOperator<OPERATOR_TYPE>

Public Functions

MUXOperator(const CDPPropertyBase &in)

Reimplemented Public Functions

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 MUXOperator is a multiplexer that selects one source from a selection of many sources.

The signal which the operator resides in will always be source 0. Additional sources can be added as Arguments into the MUXOperator. The source selection is done by setting the MUXOperator Index to the desired 0-based source number to use. Index can be routed from another value by specifying IndexRouting.


To select between a signal value and the values 10,20 and 30; add a Signal<double>, go into it and add three Arguments of desired type. Go into the first Argument and set Value to 10, then go into the second Argument and set Value to 20, and finally go into the third argument and set Value to 30.

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.

Click into the signal containing the MUXOperator, and change Index between 0 and 3, and validate that the signal value changes according to selected source index.

Note: If index is larger than the allowed range (number of arguments), then the Index will be limited (to number of arguments).

Member Function Documentation

MUXOperator::MUXOperator(const CDPPropertyBase &in)

Default constructs an instance of MUXOperator.

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

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

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

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