Supplementing the Model with Handwritten Code : Binding Callbacks : Callback Example

Callback Example

The following example illustrates the Rational Statemate callback utility by showing two subroutines that are bound to the callback DAR. Every time the DAR element changes, Rational Statemate runs both of these subroutines.

To create a subroutine, refer to the steps documented in Supplementing the Model with Subroutines

The next two figures show the code for the subroutines. The first one is the PRINT1INT procedure; the second one is the PRINT_NTH_INT procedure.