Adding User-Written Code : Supplementing the Model with a Task

Supplementing the Model with a Task

This section explains how to add a handwritten task to your Rational Statemate model by showing the following:

Note: Rational Statemate also provides templates for functions and procedures. The subroutine’s template is a result of mapping the declarations into its C representation. This includes mapping the parameter types and, in the case of functions, the returned value.

Complete the following steps to add a handwritten task:

1.
Select File > New in the Properties Editor.
2.
Name the new element (in this example IO_RECEIVER), then select its Chart Name.
3.
Select Subroutine as the Element Type. The New Element window opens.

The Properties Editor window opens with the name of the new subroutine.

 

4.
Define the subroutine Type as a Task (refer to the following figure).
5.