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:
RCO ExtDec_api_init initializes the API's data structures.
Async ports are created to handle decision request messages.
Once initialized, the main program calls the event handler loop.
Event handler loop continuously checks for any message (read timeout = one second) on both main port and async port (through event flag).
The appropriate handlers are called (set two functions) through function pointers for these messages.
Once the main port receives TERM_SEG or Router dies, the main program calls CleanUp function to free the allocated memory.
External decision simulator.