Set 1. Framework Functions (ExtDec_Sim

Procedure

  1. RCO ExtDec_api_init initializes the API's data structures.
  2. Async ports are created to handle decision request messages.
  3. Once initialized, the main program calls the event handler loop.
  4. Event handler loop continuously checks for any message (read timeout = one second) on both main port and async port (through event flag).
  5. The appropriate handlers are called (set two functions) through function pointers for these messages.
  6. Once the main port receives TERM_SEG or Router dies, the main program calls CleanUp function to free the allocated memory.
  7. Process terminates.