Loads a chart file (or any other configuration item file) into the current workarea. It is one of the four utility functions (stm_load
,stm_save
,stm_unload
, andstm_unload_all
) that provide an interface between the Rational Statemate user workarea and external files.
Note: You must work in automatic transaction mode when using this function by specifyingautomatic_transaction
as thetrans_mode
(third) argument of thestm_init_uad
function. Your program should contain lines similar to the following:int success, status;
...
success = stm_init_uad ("MY_PROJECT",
"/local/my_work_area", automatic_transaction,
&status);
if (!success)
...stm_load (file_name, item_name, version, mode, enforce,
message, &status)
Input/Output sch – Statechartach - Activity-chartsmch - Module-chartsfch – Flowchartsdic - Global Definition Set filesqch - Sequence-Diagramsuch - Use-Case-Diagramsvsm - Continuous Diagramspnl – Panel filesscp - Simulation SCL filescnf - Simulation status fileswpf - Waveform Profilesdyn_set - Simulation analysis profilesmon - Monitor fileschk_mdl_set - Check Model Profilesdgl - Documentor templatesinc - Documentor include filespnl - Prototype panelsconfig - Configuration filestv - Task View filesmak - Makefilesoil - OIL filescfg - CFG filesc - Source(c) filesh - Header (h) filesrgenset - Rapid Prototyper Profilestrg - Target filesrtrg - Rapid Target filescrd - Card filesrconfig - Rhapsody block Configuration filesccf - Component Configuration filesdat - VSM Data fileswav - VSM Wave filesmat - VSM Mat. filesm - VSM M. files The version number. The version contained in this string is recorded in the workarea. No lock files are created by this function, even whenmode
is u (update). If this is 1, it enforces the load - even in cases when the new or modified item with the same name already exists in the workarea. If this is 0, the load operation fails, in these cases, with the corresponding status code and error message. A buffer that holds the error message, if an error occurs. This buffer can hold 127 characters. To load the first version of a statechart namedMY_CHART
from the databank located at/local/
my_bank
in read mode and enforce the operation, use the following statement:#define ENFORCE 1
int status;
char mess[128];
.
.
stm_load ("/local/my_bank/chart/my_chart.sch.1",
"my_chart.sch", "1", ’r’, ENFORCE, message, &status);
if (status != stm_success)
.
.