Software Code Generator Overview : Hooks and Callbacks

Hooks and Callbacks

The Code Generator also 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.

Unlike stubs, which simply serve as placeholders for external code, hooks generate callback functions and actually communicate with external code. They become activated when there is a change in the selected element such as an event, condition, or state.