Set 1. Framework Functions (ExtDec_Sim

The framework functions include main program, event handler loop, and cleanup. The main program initializes IPC, registers itself with router, initializes data structures (decisions as read from file) through set two function calls, and initializes RCOExtDec API through RCOExtDec_api_init API call..)

The Framework function process is:

  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.

More information

External decision simulator.