Callbacks to Track Model Changes
The Code Generator provides a powerful mechanism that allows you to hook user-actions or procedures to any change in the specification during execution. This mechanism is very useful when you wish to tie your external environment to the behavior represented by the generated code.
For each type of Rational Statemate element, there is a callback routine. For instance,
set_state_cbk
orset_event_cbk.
Callbacks are called when the element changes. In general:
set_<element>_cbk(g_addr,el_p,callback_routine,
callback_param)
genptr g_addr;
genptr el_p;
void(*callback_routine) ();
int callback_param;