Full Library / Defining_Flow / Switching / Switch
Block Name: Switch
- public class Switch_Basic
- extends TypedAtomicActor
- This block has two input ports, the input port for incoming data tokens, and the control port to select the output data path. This block routes tokens or Data Structure arriving on the input port to the true or false output ports based on the boolean value on the control port. If no token has been received on the control port, then the input token is dropped. The control port value can be int/long (0 or 1) and Boolean (TRUE or FALSE). 0 and TRUE places the DS on the true_output port while 1 and FALSE places the data on the false_output port. The input token can be of any data type (int, long, double, array, boolean or Data Structure)
input
public TypedIOPort input
- Input port for data tokens.
control
public TypedIOPort control
- Input port for control tokens, which selects the output true, or false, output port. The type is int, long or boolean.
true_output
public TypedIOPort true_output
- Output port, true path, type same as input.
false_output
public TypedIOPort false_output
- Output port, false path, type same as input.
Created with the Personal Edition of HelpNDoc: Create cross-platform Qt Help files