Full Library / Math Operator / Boolean / BooleanSelect
Block Name: BooleanSelect
Code File Location: VisualSim/actor/lib/BooleanSelect
A type polymorphic select with boolean valued control. In an iteration, if an input token is available at the control input, that token is read, and its value is noted. Its value specifies the input port that should be read next. If the control input is true, then if an input token is available on the trueInput port, then it is is read and sent to the output. Likewise with a false input and the falseInput port. The token sent to the output is determined by the control input, which must be a boolean value. Because tokens are immutable, the same Token is sent to the output, rather than a copy. The trueInput and falseInput port may receive Tokens of any type.
The actor indicates a willingness to fire in its prefire() method if there is an input available on the channel specified by the most recently seen token on the control port. If no token has ever been received on the control port, then falseInput is assumed to be the one to read.
This actor is similar to the BooleanMultiplexor actor, except that it never discards input tokens. Tokens on channels that are not selected are not consumed.
Field Detail |
public TypedIOPort trueInput
public TypedIOPort falseInput
public TypedIOPort control
public TypedIOPort output
Created with the Personal Edition of HelpNDoc: Create cross-platform Qt Help files