Animation script command types
You can create scripts to automate animation sequences using tracer commands.
The syntax of these commands is described in detail in Tracer commands.
Note: To get a list of available scripting commands, type
help
or
?
in the Animation Command bar.Scripts can use these command types:
Command Type | Command |
---|---|
Breakpoint | break <object> <op> <breakPointType> <data> |
Call | [Object name]->CALL([operation call] [signature]) |
Comments | // the comment goes here |
Display |
|
Generate event | <instanceName>->GEN(<eventName>(<parameterName>
|
Go |
|
Help |
|
I/O |
|
Quit | quit |
Resume |
|
Set focus |
|
Show | show <object>
<interest-list> |
Suspend |
|
Time stamp | timestamp <option> |
Trace | trace <object>
<interest-list> |
The following example of a script tests the behavior of a chamber unit in the pacemaker demo:
//*******************************************************
// file: utChamber.txt
// description: chamber unit test script
//*******************************************************// run until we
enter the sensing state
break ut2Chamber->theChamber stateEntered sensing
go
break ut2Chamber->theChamber -stateEntered sensing
// Trace ... and capture to file utChamber.log
trace #CallStack method
trace #CallStack +timeout
output +test.log
// give several heart beats
ut2Chamber->theChamber->GEN(evHeartBeat)
go idle
ut2Chamber->theChamber->GEN(evHeartBeat)
go idle
ut2Chamber->theChamber->GEN(evHeartBeat)
go idle
// absence of a heartbeat should cause a pace
go idle
break ut2Chamber->theChamber stateEntered sensing
go
break ut2Chamber->theChamber -stateEntered sensing
// regenerate heartbeats
ut2Chamber->theChamber->GEN(evHeartBeat)
go idle
ut2Chamber->theChamber->GEN(evHeartBeat)
go idle
ut2Chamber->theChamber->GEN(evHeartBeat)
go idle
// stop logging to file
output -test.log