Station

abstract class Station(parent: ModelElement, nextReceiver: QObjectReceiverIfc = NotImplementedReceiver, name: String? = null) : ModelElement, QObjectReceiverIfc, StationCIfc, Comparable<Station> (source)

A station is a location that can receive, potentially process instances of the QObject class, and cause them to be received by other receivers via appropriate send logic.

Inheritors

Constructors

Link copied to clipboard
constructor(parent: ModelElement, nextReceiver: QObjectReceiverIfc = NotImplementedReceiver, name: String? = null)

Properties

Link copied to clipboard
open override val numAtStation: TWResponseCIfc
Link copied to clipboard
open override val numProcessed: CounterCIfc
Link copied to clipboard
open override val stationTime: ResponseCIfc

Functions

Link copied to clipboard
open operator override fun compareTo(other: Station): Int
Link copied to clipboard

Specifies an action to occur when a QObject instance enters the station. The action occurs immediately after entering the station. That is, the QObject is considered within the station.

Link copied to clipboard

Specifies an action to occur when a QObject instance exits the station. The action occurs immediately before being sent to the next receiver. That is, the QObject is considered to have exited the station.

Link copied to clipboard

Sets the receiver of qObject instances from this station

Link copied to clipboard
open fun onEntry(arrivingQObject: ModelElement.QObject)

This function can be overridden to provide logic upon entry to the station. The action occurs immediately after entering the station. That is, the QObject is considered within the station. If an entry action is provided, this function occurs immediately after the entry action but before any other logic. To be used by subclasses.

Link copied to clipboard
open fun onExit(completedQObject: ModelElement.QObject)

This function can be overridden to provide logic upon exit from the station before being sent to the next receiver. If an exit action is provided, this function executes immediately after the exit action.

Link copied to clipboard
override fun receive(arrivingQObject: ModelElement.QObject)
Link copied to clipboard
fun sender(sender: QObjectSenderIfc?)

Can be used to supply a sender that will be used instead of the default behavior. The default behavior uses a sender attached to the QObject instance and if not attached will send the QObject to the next receiver.