Adding User-Written Code : Binding Callbacks : Callback Example

Callback Example

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

To create a subroutine, start with the steps shown in Supplementing the Model with Subroutines.

 

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