Utility Functions : List of Utility Functions : stm_action_of_reaction

stm_action_of_reaction

Function type: STRING

Description
Extracts the action part of the specified reaction (the label of the transition or static reaction). The syntax of a reaction is trigger/action.
Note the following:

The reaction is achieved by the single-element function stm_r_st_reactions or stm_r_tr_labels.

The function returns an empty string when the action is missing.

Syntax
stm_action_of_reaction (reaction, status)
Arguments
 
Input/Output

 

Status Codes
Example
Assume that S1 has several static reactions and you want to list all the actions that are triggered when in this state. Include the following statements in your template:

VARIABLE
STATE st_id;
INTEGER status;
LIST OF STRING reactions;
STRING rct;
st_id := stm_r_st (’S1’, status);
reactions := stm_r_st_reactions (st_id, status);
WRITE (’\n Actions of reactions in S1:’);
FOR rct IN reactions LOOP
WRITE (’\n’, stm_action_of_reaction (rct, status));
END FOR;