![DAP Technology 1394 Operation Manual Download Page 195](http://html.mh-extra.com/html/dap-technology/1394/1394_operation-manual_509853195.webp)
Scriptor
195
Copyright © DapTechnology B.V., 2005-2019 - All Rights Reserved., 5/20/2019
updateButtonStates
On the control panel, a couple of buttons are used as so-called state buttons. This means that a button
should stay down when it is enabled and up when it is disabled. Normally, buttons on the control panel will
come back up as soon as they are released after pressing them. This process contains an infinite loop that
checks if a button is pressed. If it is, it will set the button to a down state. Also if an incorrect packet speed
is chosen, it will set the edit box back to its default value. To prevent the Analyzer from being occupied by
this loop all the time, the function "waitStartOfFrame" is called every iteration as an alternative for the
"sleep" command. (the sleep command will be implemented in one of the next versions of the software)
startButtonHandlers
This process monitors the start buttons and as soon as one is pressed, it will call one of "sendASync" and
"sendSync" functions. Control will be given to that function until it is done sending. If it is done, this
function will continue to monitor the start buttons.
sendAsync
This function will send the provided packet exactly the specified number of times on the specified
channel(s) in Asynchronous mode. Before it starts sending, the function "setPacketErrors" is called to set
whether the packet should contain an error or not. After sending each individual packet, it checks the state
of the stop button. If pressed, it will stop sending packets.
sendSync
This function will send the provided packet exactly the specified number of times on the specified channel
in Synchronous mode. It sends the packet at the specified frame offset time and it also sends a STOF
packet at frame offset time 0 for each frame. Before it starts sending, the function "setPacketErrors" is
called to set whether the packet should contain an error or not. After sending each individual packet, it
checks the state of the stop button. If pressed, it will stop sending packets.
createPacket
This function is called once when the script is started. It will use the data as defined on the Data Editor to
setup a basic packet. This packet will be used to send in both asynchronous and synchronous mode.
createSTOFPacket
This function is called once when the script is started. It creates an empty STOF packet to be used in
Sync mode.
setPacketErrors
This function is provided with a packet buffer. It reads the settings from the control panel and sets/resets
errors and header fields of the provided packet to the values as specified by the user.
//--------------------------------------------------------------------
void
updateButtonStates ()
entry
int
i
int
numButtons =
6
while
true
int
speed = getControlValue (
34
)
int
packets = getControlValue (
31
)
waitStartOfFrame ()
i =
0
while
i < numButtons
Summary of Contents for 1394
Page 1: ...1394 Analyzer Operation Manual Hardware and Software Guide Doc DT PRO134MAN700E ...
Page 11: ...1394AnalyzerOperationManual 11 456 The SCSI2 Connector 457 The SUBD connector ...
Page 187: ...Scriptor 187 Copyright DapTechnology B V 2005 2019 All Rights Reserved 5 20 2019 ...
Page 199: ...Scriptor 199 Copyright DapTechnology B V 2005 2019 All Rights Reserved 5 20 2019 ...
Page 363: ...FormatEditor 363 Copyright DapTechnology B V 2005 2019 All Rights Reserved 5 20 2019 ...