Utility Functions : List of Utility Functions : stm_action_of_reaction

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

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.

Function Type
stm_expression
Syntax
stm_action_of_reaction (reaction, &status)
Arguments
Status Codes
Example
To list all actions that are triggered when S1 is in a static reactions (assume that S1 has several static reactions), include the following calls in your program:

 

stm_id st_id;
int status;
stm_list reactions;
stm_expression rct;

st_id = stm_r_st ("S1", status);
reactions = stm_r_st_reactions (st_id, status);
printf ("\n Actions of reactions in S1:");
for (rct = (string)
stm_list_first_element (reactions, &status);
status == stm_success;
rct = (string)
stm_list_next_element (reactions, &status))
printf ("\n %S", stm_action_of_reaction (
rct, &status));