Next: Randomizing
Up: Available routines in the
Previous: List handling
  Contents
- NAME
- :
simul_end, init_event, init_a_event - Protocol stopping, restarting protocol in a node.
- SYNTAX
- :
simul_end()
init_event( int n )
init_a_event( int n )
- DESCRIPTION
- :
- simul_end can be called from protocol when a node decides that the execution must be ended. It must be in every protocol implementation, because it is the only succesful way of ending the protocol execution. When it is called from a node all pending events are not executed and simulator displays the message This is the END !.
- init_event creates the initializing event INITPROTOCOL and schedules it to be executed after a delay uniformly distributed between the initial starting time limits min_init_time and max_init_time that take their values from input file.
- init_a_event creates the initializing event INITPROTOCOL and schedules it to be executed at the user specified time that is indicated by field PCB[i].init_time. In case of the use of a synchronizer, PCB[i].wake_time is also considered in the evaluation of the time that the INITPROTOCOL event is going to happen.
SEE ALSO: System structure (Section 5.2) and Simul.h.
Next: Randomizing
Up: Available routines in the
Previous: List handling
  Contents
Ha Hoai Phuong
2002-11-11