stm_r_attr_val (id, attr_name, status)
Ifattr_name
does not exist for the specified element,status
receives the valuestm_attribute_name_not_found
.
●
Attribute values might exist for attributes with no name. Therefore, if you supply contiguous apostrophes (
’’
) forattr_name
, you retrieve all values for unnamed attributes.
●
In most cases, attributes have only one value. However, there are some cases where more than one attribute value is simultaneously meaningful. For example, a module has an attribute
implementation
. The attributessoftware
andhardware
might both be meaningful for some modules. Therefore, Statemate provides the capability of assigning multiple values to attributes, and the function returns a list of these values. When there is a single value, the list consists of one component.VARIABLE
STATE st_id;
LIST OF STRING attr_list;
STRING attrib, value;
INTEGER status;
.
.
.
st_id := stm_r_st (’WAIT’, status);
attr_list :=stm_r_st_attr_name (st_id, status);
FOR attrib IN attr_list LOOP
FOR value IN stm_r_st_attr_val (st_id, attrib, status)
LOOP
WRITE (’\n’, attrib,’ is ’,value);
END LOOP;
END LOOP;
.
.
.attr_list
contains a list of attributes forWAIT
. Write the attribute values for each item in this list to the document.