stm_r_xx_keywordRetrieves a portion of the element’s long description. An element’s long description is attached to its form.stm_r_keyword (id, begin_keyword, end_keyword, filename, &status)
Input/Output The beginning of the portion of the string in the long description to extract The end of the portion of the string in the long description to extract The name of the file to contain the long description
● The argumentsbegin_keyword
andend_keyword
are strings of text appearing in the element’s long description. The portion extracted from the database begins with the line followingbegin_keyword
and extends to the line precedingend_keyword
.
● If the value ofbegin_keyword
does not appear in the long description, the function creates an empty file;status
then receives the valuestm_starting_keyword_not_found
.
● If the value ofend_keyword
does not appear in the long description, the entire long description (from the line following the value ofbegin_keyword
) is retrieved;status
receives the valuestm_ending_keyword_not_found
.
● The values ofbegin_keyword
andend_keyword
must appear at the beginning of a line in the long description.
●filename
follows the conventions of the operating system. It returns the value of the argumentfilename
(when one is specified). If an empty string’’
(two contiguous quotation marks) is specified forfilename
, Rational Statemate creates a temporary file where it stores the text. The name of this temporary file is returned by this function.
● If no long description exists for the element,status
receives the valuestm_missing_long_description
.The long description for the stateWAIT
contains the following section:!BHV_DESCR
When the assembly process reaches the critical stage where all parts must be carefully selected, mounted and assembled, we wait for the interrupt signal to tell us that all the required parts are in place before continuing. This state acts as a synchronization point in the assembly process.
!END_DESCRTo extract the portion of the long description beginning with “When the ...
” and ending with “... assembly process
” using the following function call:stm_id state_id;
stm_filename descr_file;
int status;
.
.
.
state_id = stm_r_st ("WAIT", &status);
descr_file = stm_r_st_keyword (state_id, "!BHV_DESCR",
"!END_DESCR", "", &status);
.
.
.