Single-Element Functions : Overview of Dataport Single Element Functions : Calling Single-Element Functions : : Stage 2

Stage 2

Pass the element ID as a function argument to get the information requested. The function calling sequence is as follows:

stm_r_xx_info (inarg, ..., &status)
or
stm_r_info (inarg, ..., &status)

In this syntax:

stm_r_—Designates the function as a Rational Statemate database retrieval function.
xx—The two-character element type abbreviation. Note that in some functions, these two characters are omitted.
info—The type of information to be extracted from the database.
inarg—The required input arguments.
status—The return function status code.

For example:

stm_r_ac_description (a, &status)
or
stm_r_description (a, &status)

This function call retrieves the contents of the Description field for the activity whose ID is contained in the variable a.

There is one function whose calling sequence differs from that shown above. This function, stm_r_element_type, receives an element ID as input and returns the element type. The function returns an enumerated type value of the form stm_state, stm_activity, and so on.

Note: In addition to the Stage 1 functions, there are other ways to obtain an element’s ID. In Stage 2 functions, IDs are passed as arguments to identify elements in the database.