動畫 Script 指令類型

您可以建立 Script 以使用追蹤程式指令自動化動畫順序。

這些指令的語法在追蹤程式指令中進行了詳細說明。

註: 若要取得可用的 Scripting 指令清單,請在「動畫指令」列中鍵入 help?

Script 可以使用以下指令類型:

表 1. 指令類型
指令類型 指令
岔斷點 break <object> <op> <breakPointType> <data>
呼叫 [Object name]->CALL([operation call] [signature])
註解 // 這裡插入註解
顯示
  • display
  • watch
產生事件 <instanceName>->GEN(<eventName>(<parameterName>
[, <parameterName>]*))

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

<instanceName>->GEN(<eventName>)

執行
  • go
  • go event
  • go idle
  • go step
說明(H)
  • 說明
  • ?
I/O
  • input [+] <destination>
  • output <+/–> <destination>
退出 quit
回復
  • resume threadName
  • resume #Thread threadName
設定焦點
  • set focus <threadName>
  • set focus #Thread <threadName>
顯示 show <object> <interest-list>
暫停
  • suspend threadName
  • suspend #Thread threadName
時間戳記 timestamp <option>
追蹤 trace <object> <interest-list>

下列 Script 範例會在起搏器展示中測試腔室單元的行為:

//*******************************************************
// 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

回饋