gomethod of the star is executed, it is guaranteed that all required input data are present, and after execution, any particles generated by the star are correctly sent off to their destinations. The only additional thing the star writer must know is how to specify that a porthole is conditional on other portholes. This is accomplished with a method of the class
setBDFParamsmethod takes four arguments. The first argument is the number of particles transferred by the port when the port is enabled. Note that unconditional ports are always enabled. The second argument is either a pointer or a reference to another
BDFPortHole, which is called the associated port (the function has two overloaded forms, which is why the argument may be specified either as a pointer or as a reference). The third argument is a code specifying the relation between the porthole this method is called on and the associated port:
Forkactor and aids the operation of the clustering algorithm.
setBDFParamsis the maximum delay, that is, the largest value that the star may specify as an argument to the
%operator on that porthole. The default value is zero. This argument serves the same purpose as the second argument to
setSDFParamsfunction may be used on BDF portholes; it does not alter the associated port or the relation type, but does alter the other two parameters of
setBDFParams. By default, BDF portholes transfer one token, unconditionally.
setBDFParamsmay be placed in the
setupmethod of a star, or alternatively in the constructor if the call does not depend on any parameters of the star. Consider as an example a
Switchstar. This star's functionality is as follows: on each execution, it reads a particle from its control input port. If the value is
TRUE, it reads a particle from its
trueInputport; otherwise it reads a particle from its
falseInputport. In any case, the particle is copied to the output port. Using the
ptlangpreprocessor, the setup method could be written