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:

Table 1. Command types
Command Type Command
Breakpoint break <object> <op> <breakPointType> <data>
Call [Object name]->CALL([operation call] [signature])
Comments // the comment goes here
Display
  • display
  • watch
Generate event <instanceName>->GEN(<eventName>(<parameterName>
[, <parameterName>]*))

<instanceName>->GEN(<eventName>())

<instanceName>->GEN(<eventName>)

Go
  • go
  • go event
  • go idle
  • go step
Help
  • help
  • ?
I/O
  • input [+] <destination>
  • output <+/–> <destination>
Quit quit
Resume
  • resume threadName
  • resume #Thread threadName
Set focus
  • set focus <threadName>
  • set focus #Thread <threadName>
Show show <object> <interest-list>
Suspend
  • suspend threadName
  • suspend #Thread threadName
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