Base for simple data sources. This provides an output
port and a trigger input port, both exposed as public variables.
The trigger port is a multiport with undeclared type, meaning that
you can supply it with any data type. The trigger port can also be
left unconnected. The purpose of the trigger input is to
(optionally) supply events that cause the actor to fire. If the
port is connected to something, then this actor will check it
for a token and return false from prefire() if there is no token.
each channel of the trigger input, if any, and then discards the
token.
<p>
Some derived classes may attach additional significance to an input
on the trigger port. For example, they might fix the type and attach
some significance to the value. Note that it is not recommend to
use getWidth() on the port to determine whether the port is connected,
since the width may be greater than zero even if there
is no actual source of data. This can occur, for example, if a trigger port
is connected to the inside of a port of an opaque composite actor, and
there is nothing connected to the outside of that port. It is not
recommended to make the behavior of an actor dependent on a global
property such as whether there is ultimately a source of data.</p>
<p>
Any type of data on is accepted on the trigger port, therefore no
type is declared. Instead, the type resolution algorithm finds
the least fixed point. If backward type inference is enabled, and
no type has been declared for the trigger, it is constrained to be
equal to <code>BaseType.GENERAL</code>. This will result in upstream
ports resolving to the most general type rather than the most specific.
</p>
Edward A. Lee
$Id: Source.java 70402 2014-10-23 00:52:20Z cxh $
Ptolemy II 0.3
Green (eal)
Green (bilung)
The output port. The type of this port is unspecified.
Derived classes may set it.
The trigger port. The type of this port is undeclared, meaning
that it will resolve to any data type.