Single-Element Functions : List of Functions : stm_r_xx_labels

stm_r_xx_labels
Returns a list of strings that consists of all the labels of the specified compound transition or message. The labels appear on the transition segments that comprise the specified compound transition, or on the message. The syntax of these labels is trigger/action.
Note: To divide the labels into their trigger and action parts, use the utility routines stm_trigger_of_reaction and stm_action_of_reaction.
Function Type
stm_list
For Elements
Syntax
stm_r_xx_labels (tr_id, &status)
Arguments
 
Input/Output
Status Codes
Example
To extract all labels of messages exiting from state L1, use the following statements:

 

stm_id lifeline_id;
int status;
stm_list labels, ll_lst;
stm_list messages;
stm_id msg;
stm_expression lab;
.
.
lifeline_id = stm_r_ll ("L1", &status);

ll_lst = stm_list_create (lifeline_id, end_of_list,
&status);

messages = stm_r_msg_from_source_ll (ll_lst, &status);

for (msg = (stm_id) stm_list_first_element (messages,
&status);
status == stm_success;
msg = (stm_id) stm_list_next_element (messages,
&status))
{
labels = stm_r_msg_labels (msg, &status);
if (status == stm_success)

{
for (lab = (char*) stm_list_first_element
(labels, &status);
status == stm_success;
lab = (char*) stm_list_next_element
(labels, &status))
.
.
}
}