PassthroughNode

abstract class PassthroughNode<InputT, OutputT, ChannelT : ChannelType<ChannelT>>(label: String, source: InputChannel<InputT, ChannelT>, destination: OutputChannel<OutputT, ChannelT>, sources: List<InputChannel<*, *>>, destinations: List<OutputChannel<*, *>>) : Node

Base class for nodes that process entities one-to-one from input to output while managing readiness. Subclasses implement process to transform entities and isReady to control flow. Automatically adapts to push/pull channel types.

Parameters

InputT

the type of incoming entities @param OutputT the type of outgoing entities @param ChannelT the channel type (Push or Pull)

label

the name of this node

source

the input channel from which entities are received

destination

the output channel where entities are sent

sources

the complete list of input channels

destinations

the complete list of output channels

Inheritors

Constructors

Link copied to clipboard
constructor(label: String, source: InputChannel<InputT, ChannelT>, destination: OutputChannel<OutputT, ChannelT>, sources: List<InputChannel<*, *>>, destinations: List<OutputChannel<*, *>>)

Properties

Link copied to clipboard
override val incoming: List<InputChannel<*, *>>
Link copied to clipboard
Link copied to clipboard
override val outgoing: List<OutputChannel<*, *>>
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
context(_: Simulator)
abstract fun isReady(): Boolean

Checks if this node is ready to process an entity.

Link copied to clipboard
context(_: Simulator)
open override fun onStart()

Initializes readiness state on simulation start.

Link copied to clipboard
context(_: Simulator)
abstract fun process(input: InputT): OutputT

Processes an input entity and produces an output entity.

Link copied to clipboard
Link copied to clipboard
open override fun toString(): String