Single-Element Functions : List of Functions : stm_r_xx

stm_r_xx
Retrieves the element ID of the specified element. This ID is an internal representation that Rational Statemate uses to identify each element in the database. Because Rational Statemate requires the ID to locate elements, this function is very often the first one called when using dataport functions.
Function Type
stm_id
For Elements
Syntax
stm_r_xx (name, &status)
Arguments
 
Input/Output
stm_element_name or stm_pathname
This can be an element name (path name) or synonym. Hierarchical elements must be identified uniquely by specifying a unique path name.
Status Codes
Example
Identify the ID of an event EV1. Once the ID has been determined, you can use it to retrieve information about EV1 from the database, as follows:

 

stm_id ev_id;
int status;
stm_short_name synonym;
.
.
ev_id = stm_r_ev ("EV1", &status);
IF (status == stm_success)
synonym = stm_r_ev_synonym (ev_id, &status);
.
.
.

The ID for EV1 is assigned to the variable ev_id.
Note:
ev_id is declared to be of type stm_id.