Using Dataport Functions : Calling Conventions : Function Return Values

Function Return Values

Library function return values are assigned to data-types declared in the library definition file dataport.h. These data-types are defined in the C language. Refer Data Types for the maximum length of return values.

For example, a function that retrieves the name of a Rational Statemate element, returns a value of type stm_element_name (declared as char * in the library definition file), whereas a function that retrieves a state’s ID returns a value of type stm_id (declared as long int).

The return values of data-types declared as strings char *, such as stm_element_name, are usually limited in length.

The returned strings are defined as static in the functions. You should copy them if they are needed for later use.