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
orstm_r_tr_label
s.
●
The function returns an empty string when the action is missing.
To list all actions that are triggered whenS1
is in a static reactions (assume thatS1
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));