|Home > Iris APIs > Simulation instantiation and discovery API > Simulation instantiation and discovery event sources|
The Simulation instantiation and discovery API supports the following event sources.
This global event is generated when the simulation is about to enter its shutdown procedure. This is the earliest point at which instances can know that the simulation is about to exit. This event source has no fields.
If the event receiver activated this event source with
the shutdown procedure is not entered until the
returns. This enables clients to perform last-minute operations, for example reading
the final state of registers.
Instances must not unregister themselves from the instance registry using
instanceRegistry_unregisterInstance() in response to this
event, because other instances might want to continue to communicate with them
during the shutdown phase.
If this event was requested with
syncEc=True, the requesting
instance should not make any Iris calls after returning from
ec_FOO(). This is possible in a race-free way. If this event
was requested with
syncEc=False, the requesting instance should not
make any Iris calls after this event was received. This is inherently racy. Any Iris
calls made while or after this event was received with
For in-process instances, the C++
IrisInterface pointers of the
instance and of the global instance stay valid and can be used even when returning
from this event.
This global event is generated when the simulation shutdown procedure is complete. After receiving this event, instances cannot communicate with each other. This event source has no fields.
This event is issued only after all instances that requested
syncEc=True have returned from their
Instances can consider themselves to have been unregistered from the instance registry when they receive this event, so they should not call
instanceRegistry_unregisterInstance() after receiving it. They are guaranteed not to receive any more Iris calls or responses after receiving it.
This event can be used by instances to destroy themselves. The C++
IrisInterface pointers must no longer be used after returning from
IrisInterface::irisHandleMessage(). This is always possible race-free.