![DAP Technology 1394 Operation Manual Download Page 189](http://html.mh-extra.com/html/dap-technology/1394/1394_operation-manual_509853189.webp)
Scriptor
189
Copyright © DapTechnology B.V., 2005-2019 - All Rights Reserved., 5/20/2019
if
tcode == TCODE_READREQ
int
q1 = getPacketHeaderField ( req,
1
,
16
,
16
)
int
q2 = getPacketHeaderQuadlet ( req,
2
)
if
q1 ==
0xFFFF
&& ( q2 &
0xFFFFFC00
)==
0xF0000400
int
addr = ( q2 &
0x3FF
)>>
2
setPacketHeaderFields
( resp, RESPCODE_COMPLETE )
setPacketHeaderField
(
resp,
1
,
16
,
4
,
RESPCODE_COMPLETE
)
writePacketHeader ( resp,
3
,DATA_ID_1_FIRST ,addr,
1
)
sendPacket ( resp )
cnt = cnt +
1
setControlValue (
1
,cnt )
if
addr ==
3
setControlValue (
10
,
1
)
else
setPacketHeaderFields
( resp, RESPCODE_ADDR_ERROR )
setPacketHeaderField
(
resp,
1
,
16
,
4
,
RESPCODE_ADDR_ERROR
)
sendPacket ( resp )
cnt_addr_errors = cnt_addr_
1
setControlValue (
2
,cnt_addr_errors )
else
if
tcode >=
0
setPacketHeaderFields
( resp, RESPCODE_TYPE_ERROR )
setPacketHeaderField
(
resp,
1
,
16
,
4
,
RESPCODE_TYPE_ERROR
)
sendPacket ( resp )
cnt_type_errors = cnt_type_
1
setControlValue (
3
,cnt_type_errors )
11.6.2.2. Details
This script contains one data definition as can be seen by the only child of the "Data defines" node at the
top. The script again contains one function called main. This function starts by defining a couple of
constants by using "#define" statements. Then it declares and initializes a couple of integer variables of
which "req" and "resp" are initialized to id numbers of new packets. This is done with the "newPacket" API
function.
Now that two packets are setup, their header fields are set to some initial values by a couple of API calls.
(setPacketHeaderSize, setPacketHeaderQuadlet and setPacketHeaderField).
Then a couple of calls to the API function "setControlValue" are made to give the controls their initial
values. The control panel the controls belong to can be seen in the picture below.
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 ...