Unloads all charts from the current workarea and clears all database fields. It is one of the four utility functions (stm_load
,stm_save
,stm_unload
, andstm_unload_all)
that provide an interface between the workarea of the Rational Statemate user and external files.This function is not equivalent to calling thestm_unload
function for each chart in the database. The differences between these two functions are as follows:
●stm_unload
takes a fixed amount of time regardless of the number of charts in the database. It does not perform an unload of individual charts, but rather cleans all database data. Usually this function cleans the database much faster than by unloading individual charts one by one.
●stm_unload_all
clears the internal ID counter of charts in the database, whereas the
stm_unload
function does not. This counter starts from 0 when the workarea database is initially created and is incremented each time a chart is created or loaded into the database. It is not decremented when charts are unloaded (deleted). When this counter reaches the value of 1023, no more charts can be loaded or created in the database. There are two ways to reset this counter: calling thestm_unload_all
function from a program, or interactively via the Delete charts from the Workarea option of Rational Statemate with the Delete all and Without confirmation flags set.
Note: When using this function, you must work in the automatic transaction mode by specifyingautomatic_transaction
as the third argument (trans_mod
e) 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)
....
Input/Output A buffer that holds the error message, if an error occurs. This buffer can hold 127 characters.