Trait simrs::Component [−][src]
Interface of a simulation component.
Associated Types
Loading content...Required methods
fn process_event(
&self,
self_id: ComponentId<Self::Event>,
event: &Self::Event,
scheduler: &mut Scheduler,
state: &mut State
)
[src]
&self,
self_id: ComponentId<Self::Event>,
event: &Self::Event,
scheduler: &mut Scheduler,
state: &mut State
)
Reacts to event
. A component has access to the following elements of the simulation:
self_id
: This is the ID of this component. This is used to schedule events to itself. This is passed for convenience, as the ID is only known after the component has been already constructed and passed to the simulation.event
: The occurring event.scheduler
: The scheduler used to access time and schedule new events.state
: The state is used to access queues and values in the value store.