DDFSelect
ptolemy.domains.ddf.lib.DDFSelect

A type polymorphic select, which routes specified input channels to the output, used in the DDF domain. In the first iteration, an input token at the <i>control</i> port is read and its value is recorded. In the second iteration, an input token is read from the input port channel specified by the most recently seen token at the <i>control</i> port and sent to the output. It alternates between these two kinds of iterations until stopped. The <i>control</i> port must receive IntTokens. The input port may receive tokens of any type. Because tokens are immutable, the same token is sent to the output, rather than a copy. Note that as for any multiport, the channel number starts from 0 and increments by 1 for each additional channel in the order the channel is created (e.g., when a connection is drawn in Vergil). <p> Note this actor sends an output token every two iterations. Contrast this with Select which sends an output token every iteration.

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


input
The input port. The port type can be any type.
control
The input port for control tokens, which specifies the input channels to read the tokens from. The type is int.
output
The output port. The type is at least the type of <i>input</i>.


input_tokenConsumptionRate
This parameter provides token consumption rate for <i>input</i>. The type is array of ints.
control_tokenConsumptionRate
This parameter provides token consumption rate for <i>control</i>. The type is int.