Source Station
A SourceStation generates QObject instances according to an arrival process and injects them into a StationNetwork. It is the self-contained special case of a NetworkIngress that also creates the arriving instances.
Instances are created by the station and may be marked (typed, given attributes, or assigned their own value object) via the supplied marking action before they enter the network. Externally created instances can also be injected by calling receive directly, which makes the source a true open boundary.
Typically created via StationNetwork.source.
Parameters
the network this source feeds
the time between successive arrivals
the receiver that processes generated instances
the time until the first arrival
the maximum number of arrivals to generate
optional class template applied to each newly created instance
optional action applied to each newly created instance (after the class)
the name of the station
Properties
True if this node has any onward routing configured (a static next receiver, a station-level sender, or a class route). A non-terminal node for which this is false — and which is not a non-terminal step of a registered route — is a dangling node and fails validation.
The number of instances generated by this source.
The name of this port, unique within its StationNetwork.
Functions
Sets the receiver that processes generated instances.
The statically known receivers this node may route to. Best-effort: empty when the node has no static link or when its routing is opaque (for example, a probabilistic sender whose destinations are not introspectable).
Receives a QObject as the network's ingress: performs the network entry bookkeeping and forwards the instance. If the instance carries its own sender (for example, a class-supplied route), that sender drives the first hop; otherwise the configured first receiver is used. Generated arrivals and externally injected instances both flow through here.
Stops generating further arrivals; the source still accepts externally injected instances via receive. Typically called from a scheduled action (e.g., a closing time).