Path: SC/GUIPlugIn
% Create a command interface for a simulation.
The two actions you send to CommandPlugIn are:
tag = CommandPlugIn( 'initialize', modifier )
and
CommandPlugIn( 'set jd', tag, jD );
On initialization, modifier has the form
modifier.function String with name of function to receive commands
modifier.commandListDirectory String with path to command list directory
modifier.helpFile Help file
modifier.commandFile Command file
The function must accept commands using the format
Function( 'load command list', d );
where d is a data structure:
d.startTime
d.list
The command file is a text file with commands in the form
commandName # &
The # indicates the command has an index
The & indicates the command has data
Either may be omitted.
The data in the data field may be any Matlab string. An eval is
performed prior to sending the data to the function.
Three default commands are
'none'
'deactivate'
'activate'
How you handle commands is up to you. However, the default meaning for
the default commands should be:
'none' no command
'deactivate' deactivate command processing
'activate' activate command processing
Start time may by a string 'xx/xx/xxxx 00:00:00' or 'now'
--------------------------------------------------------------------------
Form:
x = CommandPlugIn( action, modifier, hFig, position, callback )
--------------------------------------------------------------------------
------
Inputs
------
action (1,:) Action 'initialize', 'update'
modifier (1,:) Modifier to the action or data structure if intialization
hFig (1,1) Handle to the figure or if 'update' radio button handles
position (1,4) [left bottom width height]
callback (1,:) Callback string when something has changed in this gui
-------
Outputs
-------
x (1,1) The tag if action is 'initialize'
--------------------------------------------------------------------------
See also CommandPlugInDemo
--------------------------------------------------------------------------
SC: GUIPlugIn/ParseCommand Common: General/CloseFigure Common: General/DeleteCell Common: General/GetListString Common: Help/HelpSystem Common: Time/DateStringToJD Common: Time/JDToDateString
Back to the SC Module page