DDFBooleanSelect
ptolemy.domains.ddf.lib.DDFBooleanSelect

A type polymorphic select with boolean valued control for use in the DDF domain. In the first iteration, an input token at the <i>control</i> port is read and its value is noted. In the second iteration, if the <i>control</i> input read from the previous iteration is true, then an input token at the <i>trueInput</i> port is read and sent to the output. Likewise with a false <i>control</i> input and the <i>falseInput</i> port. It alternates between these two kinds of iterations until stopped. The <i>control</i> port must receive Boolean Tokens. The <i>trueInput</i> and <i>falseInput</i> ports may receive Tokens of any type. Because tokens are immutable, the same Token is sent to the output, rather than a copy. <p> Note this actor sends an output token every two iterations. Contrast this with BooleanSelect which sends an output token every iteration.

Author(s): Gang Zhou
Version:$Id: DDFBooleanSelect.doc.html,v 1.1 2006/02/22 18:40:26 mangal Exp $
Pt.Proposed Rating:Yellow (zgang)
Pt.Accepted Rating:Yellow (cxh)


trueInput
Input for tokens on the true path. The port type can be any type.
falseInput
Input for tokens on the false path. The port type can be any type.
control
Input that selects one of the other input ports. The type is boolean.
output
The output port. The type is at least the type of <i>trueInput</i> and <i>falseInput</i>


trueInput_tokenConsumptionRate
This parameter provides token consumption rate for <i>trueInput</i>. The type is int.
falseInput_tokenConsumptionRate
This parameter provides token consumption rate for <i>falseInput</i>. The type is int.
control_tokenConsumptionRate
This parameter provides token consumption rate for <i>control</i>. The type is int.