Event Handler Functions

The Event Handler function process is:

  1. int DecEml_api_init (COR_STATUS*,int)
    Initializes data and RCOExtDec API.
    Calls DecEml_init_data for application data initialization and RCOExtDec_api_init API function for API initialization.

  1. int DecEml_api_main_init (DADDR*,COR_STATUS*)
    Initiates communication with RCO. When RCO sends an INIT_SEG to main port, this function calls RCOExtDec_api_init_comm API to send an INIT_SEG to RCO through async port; thereby enabling RCO to recognize async port and to send all subsequent decisions to async port.

  2. int DecEml_api_process (COR_STATUS*)
    When the event flag indicates a message's arrival at async port, this function is called; which in turn, calls DecEml_handle_decision_requests function.

  3. int DecEml_handle_decision_requests (COR_STATUS*)
    Forces ExtDec_api_get_msg to retrieve messages from async port. If it is a decision request, it calls DecEml_get_next_decision to obtain the number of decisions from the decision table, and sends these decisions to the requestor through ExtDec_api_send_decision API call.

  4. int DecEml_api_cleanup (COR_STATUS*)
    Calls DecEml_cleanup and ExtDec_api_term API call.

More information

ExtDec_Sim calls in relation to PDC_Sim/API_Caller calls.

Set 2. Data Management and Event Handler functions (ExtDec_SimData.cpp).