S1F1R | Are You Online? |
Sent by Host and Equipment |
# S1F1R Tcl Receive message - add next line to setup
$spname whenever S1F1 [list recv_S1F1R $spname]
# receive procedure
proc recv_S1F1R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# no data expected
if {$send_reply} {
# TBD create reply data
$spname put S1F2 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S1F1R
S1F2 | On Line Data |
Different Host and Equipment Use |
Comment: Equipment sends the reply to indicate an online control state, otherwise an abort reply is seen.
Equipment Send Format:
Host Send Format:
# S1F2 Tcl Parse Equipment reply
set reply [secs_xact $spname S1F1R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 MDLN SOFTREV
# MDLN A:20 (always) equipment model type
# SOFTREV A:20 (always) software revision
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {MDLN SOFTREV}
if {[string first "A:" [lindex $MDLN 0]] != 0} {set ok 0; break}
set MDLN [lindex $MDLN 1]
if {[string first "A:" [lindex $SOFTREV 0]] != 0} {set ok 0; break}
set SOFTREV [lindex $SOFTREV 1]
return ;# finished ok
} ;# end while(ok)
# S1F2 Tcl Parse Host reply
set reply [secs_xact $spname S1F1R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:0
if {$TSN_data ne "L:0"} {set ok 0; break}
# single token data such as L:0 or U4:0 has been received as expected
return ;# finished ok
} ;# end while(ok)
S1F3R | Selected Equipment Status Request |
Sent by Host Only |
# S1F3R Tcl Receive message - add next line to setup
$spname whenever S1F3 [list recv_S1F3R $spname]
# receive procedure
proc recv_S1F3R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:n SVID
# SVID U4:1 (varies) status variable ID
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach SVID [lreplace $TSN_data 0 0] {
#vset [split [lindex $SVID 0] :] {typeSVID lengthSVID}
set SVID [lindex $SVID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S1F4 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S1F3R
S1F4 | Selected Equipment Status Data |
Sent by Equipment Only |
Comment: zero length value returned for unknown SVID
Format:
# S1F4 Tcl Parse reply
set reply [secs_xact $spname S1F3R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:n SV
# SV A:n (varies) status variable value
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach SV [lreplace $TSN_data 0 0] {
#vset [split [lindex $SV 0] :] {typeSV lengthSV}
set SV [lindex $SV 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S1F5R | Formatted Status Request |
Sent by Host Only |
# S1F5R Tcl Receive message - add next line to setup
$spname whenever S1F5 [list recv_S1F5R $spname]
# receive procedure
proc recv_S1F5R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect SFCD
# SFCD B:1 (always) status form code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set SFCD [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
if {$send_reply} {
# TBD create reply data
$spname put S1F6 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S1F5R
S1F6 | Formatted Status Data |
Sent by Equipment Only |
Comment: message structure varies, superseded by dynamic reports
Format:
# S1F6 Tcl Parse reply
set reply [secs_xact $spname S1F5R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:n SV
# SV A:n (varies) status variable value
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach SV [lreplace $TSN_data 0 0] {
#vset [split [lindex $SV 0] :] {typeSV lengthSV}
set SV [lindex $SV 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S1F7 | Fixed Form Request |
Sent by Host Only |
# S1F7 Tcl Receive message - add next line to setup
$spname whenever S1F7 [list recv_S1F7 $spname]
# receive procedure
proc recv_S1F7 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect SFCD
# SFCD B:1 (always) status form code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set SFCD [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
if {$send_reply} {
# TBD create reply data
$spname put S1F8 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S1F7
S1F8 | Fixed Form Data |
Sent by Equipment Only |
Comment: format varies, superseded by dynamic reports
Format:
# S1F8 Tcl Parse reply
set reply [secs_xact $spname S1F7R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:n {L:2 SVNAME SV0}
# SVNAME A:n (always) status variable name
# SV0 A:0 (varies) Zero length value used to convey format type
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach L2 [lreplace $TSN_data 0 0] {
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {SVNAME SV0}
if {[string first "A:" [lindex $SVNAME 0]] != 0} {set ok 0; break}
set SVNAME [lindex $SVNAME 1]
#vset [split [lindex $SV0 0] :] {typeSV0 lengthSV0}
set SV0 [lindex $SV0 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S1F9R | Material Transfer Status Request |
Sent by Host Only |
# S1F9R Tcl Receive message - add next line to setup
$spname whenever S1F9 [list recv_S1F9R $spname]
# receive procedure
proc recv_S1F9R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# no data expected
if {$send_reply} {
# TBD create reply data
$spname put S1F10 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S1F9R
S1F10 | Material Transfer Status Data |
Sent by Equipment Only |
Comment: An L:0 reply can be sent if there are no material ports
Format:
# S1F10 Tcl Parse reply
set reply [secs_xact $spname S1F9R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 TSIP TSOP
# TSIP (list)B:n (always) transfer status of input ports
# TSOP (list)B:n (always) transfer status of output ports
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TSIP TSOP}
if {[string first "B:" [lindex $TSIP 0]] != 0} {set ok 0; break}
# convert list of type B 0xhh to int using expr
set TSIP {}; foreach v [lreplace $TSIP 0 0] {lappend TSIP [expr {$v}]}
if {[string first "B:" [lindex $TSOP 0]] != 0} {set ok 0; break}
# convert list of type B 0xhh to int using expr
set TSOP {}; foreach v [lreplace $TSOP 0 0] {lappend TSOP [expr {$v}]}
return ;# finished ok
} ;# end while(ok)
S1F11R | Status Variable Namelist Request |
Sent by Host Only |
Comment: Host sends L:0 to request all SVIDs.
Format:
# S1F11R Tcl Receive message - add next line to setup
$spname whenever S1F11 [list recv_S1F11R $spname]
# receive procedure
proc recv_S1F11R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:n SVID
# SVID U4:1 (varies) status variable ID
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach SVID [lreplace $TSN_data 0 0] {
#vset [split [lindex $SVID 0] :] {typeSVID lengthSVID}
set SVID [lindex $SVID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S1F12 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S1F11R
S1F12 | Status Variable Namelist Reply |
Sent by Equipment Only |
Comment: A:0 for SVNAME and UNITS indicates unknown SVID
Format:
# S1F12 Tcl Parse reply
set reply [secs_xact $spname S1F11R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:n {L:3 SVID SVNAME UNITS}
# SVID U4:1 (varies) status variable ID
# SVNAME A:n (always) status variable name
# UNITS A:n (always) units identifier (see E5 Section 9)
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach L3 [lreplace $TSN_data 0 0] {
if { [lindex $L3 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3 0 0] {SVID SVNAME UNITS}
#vset [split [lindex $SVID 0] :] {typeSVID lengthSVID}
set SVID [lindex $SVID 1]
if {[string first "A:" [lindex $SVNAME 0]] != 0} {set ok 0; break}
set SVNAME [lindex $SVNAME 1]
if {[string first "A:" [lindex $UNITS 0]] != 0} {set ok 0; break}
set UNITS [lindex $UNITS 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S1F13R | Establish Communications Request |
Different Host and Equipment Use |
Equipment Send Format:
Host Send Format:
# S1F13R Tcl Receive Equipment message - add next line to setupn
$spname whenever S1F13 [list recv_S1F13R $spname]
# receive procedure
proc recv_S1F13R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 MDLN SOFTREV
# MDLN A:20 (always) equipment model type
# SOFTREV A:20 (always) software revision
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {MDLN SOFTREV}
if {[string first "A:" [lindex $MDLN 0]] != 0} {set ok 0; break}
set MDLN [lindex $MDLN 1]
if {[string first "A:" [lindex $SOFTREV 0]] != 0} {set ok 0; break}
set SOFTREV [lindex $SOFTREV 1]
if {$send_reply} {
# TBD create reply data
$spname put S1F14 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S1F13R
# S1F13R Tcl Receive Host message - add next line to setup
$spname whenever S1F13 [list recv_S1F13R $spname]
# receive procedure
proc recv_S1F13R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:0
if {$TSN_data ne "L:0"} {set ok 0; break}
# single token data such as L:0 or U4:0 has been received as expected
if {$send_reply} {
# TBD create reply data
$spname put S1F14 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S1F13R
S1F14 | Establish Communications Request Acknowledge |
Different Host and Equipment Use |
Comment: MDLN and SOFTREV may not be valid unless COMMACK value is 0
Equipment Send Format:
Host Send Format:
# S1F14 Tcl Parse Equipment reply
set reply [secs_xact $spname S1F13R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 COMMACK {L:2 MDLN SOFTREV}
# COMMACK B:1 (always) establish communications acknowledgement code
# MDLN A:20 (always) equipment model type
# SOFTREV A:20 (always) software revision
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {COMMACK L2}
if {[lindex $COMMACK 0] != "B:1"} {set ok 0; break}
set COMMACK [expr [lindex $COMMACK 1]] ;# expr converts 0xhh to int
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {MDLN SOFTREV}
if {[string first "A:" [lindex $MDLN 0]] != 0} {set ok 0; break}
set MDLN [lindex $MDLN 1]
if {[string first "A:" [lindex $SOFTREV 0]] != 0} {set ok 0; break}
set SOFTREV [lindex $SOFTREV 1]
return ;# finished ok
} ;# end while(ok)
# S1F14 Tcl Parse Host reply
set reply [secs_xact $spname S1F13R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 COMMACK L:0
# COMMACK B:1 (always) establish communications acknowledgement code
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {COMMACK L0}
if {[lindex $COMMACK 0] != "B:1"} {set ok 0; break}
set COMMACK [expr [lindex $COMMACK 1]] ;# expr converts 0xhh to int
if {$L0 ne "L:0"} {set ok 0; break}
# single token data such as L:0 or U4:0 has been received as expected
return ;# finished ok
} ;# end while(ok)
S1F15R | Request OFF-LINE |
Sent by Host Only |
# S1F15R Tcl Receive message - add next line to setup
$spname whenever S1F15 [list recv_S1F15R $spname]
# receive procedure
proc recv_S1F15R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# no data expected
if {$send_reply} {
# TBD create reply data
$spname put S1F16 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S1F15R
S1F16 | OFF-LINE Acknowledge |
Sent by Equipment Only |
# S1F16 Tcl Parse reply
set reply [secs_xact $spname S1F15R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect OFLACK
# OFLACK B:1 (always) offline acknowledge, 0 ok
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set OFLACK [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S1F17R | Request ON-LINE |
Sent by Host Only |
# S1F17R Tcl Receive message - add next line to setup
$spname whenever S1F17 [list recv_S1F17R $spname]
# receive procedure
proc recv_S1F17R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# no data expected
if {$send_reply} {
# TBD create reply data
$spname put S1F18 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S1F17R
S1F18 | ON-LINE Acknowledge |
Sent by Equipment Only |
# S1F18 Tcl Parse reply
set reply [secs_xact $spname S1F17R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ONLACK
# ONLACK B:1 (always) online acknowledge, 0 ok
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ONLACK [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S1F19R | Get Attribute |
Sent by Host and Equipment |
Comment: L:m = L:0 for all objects, L:n = L:0 for all attributes
Format:
# S1F19R Tcl Receive message - add next line to setup
$spname whenever S1F19 [list recv_S1F19R $spname]
# receive procedure
proc recv_S1F19R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 OBJTYPE {L:m OBJID} {L:n ATTRID}
# OBJTYPE A:40 (varies) object class name, chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OBJID A:80 (varies) E39 object identifier 1-80 chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# ATTRID A:40 (varies) identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~. Does not begin or end with space.
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJTYPE Lm Ln_n1}
#vset [split [lindex $OBJTYPE 0] :] {typeOBJTYPE lengthOBJTYPE}
set OBJTYPE [lindex $OBJTYPE 1]
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach OBJID [lreplace $Lm 0 0] {
#vset [split [lindex $OBJID 0] :] {typeOBJID lengthOBJID}
set OBJID [lindex $OBJID 1]
}
if {!$ok} break
if {[string first L: [lindex $Ln_n1 0]] != 0} {set ok 0; break}
foreach ATTRID [lreplace $Ln_n1 0 0] {
#vset [split [lindex $ATTRID 0] :] {typeATTRID lengthATTRID}
set ATTRID [lindex $ATTRID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S1F20 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S1F19R
S1F20 | Attribute Data |
Sent by Host and Equipment |
Comment: Ordered per request., m=0 means OBJTYPE unknown, n=0 means instance not found, error associations are problematic
Format:
# S1F20 Tcl Parse reply
set reply [secs_xact $spname S1F19R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 {L:m {L:n ATTRDATA}} {L:p {L:2 ERRCODE ERRTEXT}}
# ATTRDATA A:n (varies) a specific attribute value of any data type
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {Lm Lp_n1}
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach Ln_1 [lreplace $Lm 0 0] {
if {[string first L: [lindex $Ln_1 0]] != 0} {set ok 0; break}
foreach ATTRDATA [lreplace $Ln_1 0 0] {
#vset [split [lindex $ATTRDATA 0] :] {typeATTRDATA lengthATTRDATA}
set ATTRDATA [lindex $ATTRDATA 1]
}
if {!$ok} break
}
if {!$ok} break
if {[string first L: [lindex $Lp_n1 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lp_n1 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S1F21R | Data Variable Namelist Request |
Sent by Host Only |
Comment: Host sends L:0 to request all DVVALs. VIDs are limited to DVVAL variables only. (proposed ballot item 4824B, Oct 2011)
Format:
# S1F21R Tcl Receive message - add next line to setup
$spname whenever S1F21 [list recv_S1F21R $spname]
# receive procedure
proc recv_S1F21R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:n VID
# VID A:n (varies) A variable ID
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach VID [lreplace $TSN_data 0 0] {
#vset [split [lindex $VID 0] :] {typeVID lengthVID}
set VID [lindex $VID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S1F22 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S1F21R
S1F22 | Data Variable Namelist Reply |
Sent by Equipment Only |
Comment: A:0 for DVVALNAME and UNITS indicates unknown VID or that VID is not a DVVAL. (proposed ballot item 4824B, Oct 2011)
Format:
# S1F22 Tcl Parse reply
set reply [secs_xact $spname S1F21R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:n {L:3 VID DVVALNAME UNITS}
# VID A:n (varies) A variable ID
# DVVALNAME A:n (always) a descriptive name for a Data Value variable (DVVAL)
# UNITS A:n (always) units identifier (see E5 Section 9)
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach L3 [lreplace $TSN_data 0 0] {
if { [lindex $L3 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3 0 0] {VID DVVALNAME UNITS}
#vset [split [lindex $VID 0] :] {typeVID lengthVID}
set VID [lindex $VID 1]
if {[string first "A:" [lindex $DVVALNAME 0]] != 0} {set ok 0; break}
set DVVALNAME [lindex $DVVALNAME 1]
if {[string first "A:" [lindex $UNITS 0]] != 0} {set ok 0; break}
set UNITS [lindex $UNITS 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S1F23R | Collection Event Namelist Request |
Sent by Host Only |
Comment: Host sends L:0 to imply all CEIDs. (proposed ballot item 4824B, Oct 2011)
Format:
# S1F23R Tcl Receive message - add next line to setup
$spname whenever S1F23 [list recv_S1F23R $spname]
# receive procedure
proc recv_S1F23R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:n CEID
# CEID U4:1 (varies) collection event identifier, GEM requires type Un
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach CEID [lreplace $TSN_data 0 0] {
#vset [split [lindex $CEID 0] :] {typeCEID lengthCEID}
set CEID [lindex $CEID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S1F24 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S1F23R
S1F24 | Collection Event Namelist Reply |
Sent by Equipment Only |
Comment: Only associated DVVAL VIDs are listed. A:0 for CENAME and L:0 for L:a indicates non-existent CEID. (proposed ballot item 4824B, Oct 2011)
Format:
# S1F24 Tcl Parse reply
set reply [secs_xact $spname S1F23R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:n {L:3 CEID CENAME {L:a VID}}
# CEID U4:1 (varies) collection event identifier, GEM requires type Un
# CENAME A:n (always) a descriptive name for a Data Collection Event
# VID A:n (varies) A variable ID
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach L3 [lreplace $TSN_data 0 0] {
if { [lindex $L3 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3 0 0] {CEID CENAME La_1}
#vset [split [lindex $CEID 0] :] {typeCEID lengthCEID}
set CEID [lindex $CEID 1]
if {[string first "A:" [lindex $CENAME 0]] != 0} {set ok 0; break}
set CENAME [lindex $CENAME 1]
if {[string first L: [lindex $La_1 0]] != 0} {set ok 0; break}
foreach VID [lreplace $La_1 0 0] {
#vset [split [lindex $VID 0] :] {typeVID lengthVID}
set VID [lindex $VID 1]
}
if {!$ok} break
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S2F1 | Service Program Load Inquire |
Sent by Host and Equipment |
# S2F1 Tcl Receive message - add next line to setup
$spname whenever S2F1 [list recv_S2F1 $spname]
# receive procedure
proc recv_S2F1 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 SPID LENGTH
# SPID A:6 (always) service program identifier
# LENGTH U4:1 (always) program length in bytes
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {SPID LENGTH}
if {[string first "A:" [lindex $SPID 0]] != 0} {set ok 0; break}
set SPID [lindex $SPID 1]
if {[lindex $LENGTH 0] != "U4:1"} {set ok 0; break}
set LENGTH [lindex $LENGTH 1]
if {$send_reply} {
# TBD create reply data
$spname put S2F2 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S2F1
S2F2 | Service Program Load Grant |
Sent by Host and Equipment |
# S2F2 Tcl Parse reply
set reply [secs_xact $spname S2F1R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect GRANT
# GRANT B:1 (always) multiblock grant code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set GRANT [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S2F3 | Service Program Send |
Sent by Host and Equipment |
# S2F3 Tcl Receive message - add next line to setup
$spname whenever S2F3 [list recv_S2F3 $spname]
# receive procedure
proc recv_S2F3 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect SPD
# SPD (list)B:n (always) service program data
if {[string first "B:" [lindex $TSN_data 0]] != 0} {set ok 0; break}
# convert list of type B 0xhh to int using expr
set SPD {}; foreach v [lreplace $TSN_data 0 0] {lappend SPD [expr {$v}]}
if {$send_reply} {
# TBD create reply data
$spname put S2F4 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S2F3
S2F4 | Service Program Send Acknowledge |
Sent by Host and Equipment |
# S2F4 Tcl Parse reply
set reply [secs_xact $spname S2F3R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect SPAACK
# SPAACK U1:1 (always) service completion code
if {[lindex $TSN_data 0] != "U1:1"} {set ok 0; break}
set SPAACK [lindex $TSN_data 1]
return ;# finished ok
} ;# end while(ok)
S2F5 | Service Program Load Request |
Sent by Host and Equipment |
# S2F5 Tcl Receive message - add next line to setup
$spname whenever S2F5 [list recv_S2F5 $spname]
# receive procedure
proc recv_S2F5 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect SPID
# SPID A:6 (always) service program identifier
if {[string first "A:" [lindex $TSN_data 0]] != 0} {set ok 0; break}
set SPID [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S2F6 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S2F5
S2F6 | Service Program Load Data |
Sent by Host and Equipment |
# S2F6 Tcl Parse reply
set reply [secs_xact $spname S2F5R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect SPD
# SPD (list)B:n (always) service program data
if {[string first "B:" [lindex $TSN_data 0]] != 0} {set ok 0; break}
# convert list of type B 0xhh to int using expr
set SPD {}; foreach v [lreplace $TSN_data 0 0] {lappend SPD [expr {$v}]}
return ;# finished ok
} ;# end while(ok)
S2F7 | Service Program Run Send |
Sent by Host and Equipment |
# S2F7 Tcl Receive message - add next line to setup
$spname whenever S2F7 [list recv_S2F7 $spname]
# receive procedure
proc recv_S2F7 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect SPID
# SPID A:6 (always) service program identifier
if {[string first "A:" [lindex $TSN_data 0]] != 0} {set ok 0; break}
set SPID [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S2F8 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S2F7
S2F8 | Service Program Run Acknowledge |
Sent by Host and Equipment |
# S2F8 Tcl Parse reply
set reply [secs_xact $spname S2F7R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect CSAACK
# CSAACK U1:1 (always) equipment acknowledge code
if {[lindex $TSN_data 0] != "U1:1"} {set ok 0; break}
set CSAACK [lindex $TSN_data 1]
return ;# finished ok
} ;# end while(ok)
S2F9 | Service Program Results Request |
Sent by Host and Equipment |
# S2F9 Tcl Receive message - add next line to setup
$spname whenever S2F9 [list recv_S2F9 $spname]
# receive procedure
proc recv_S2F9 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect SPID
# SPID A:6 (always) service program identifier
if {[string first "A:" [lindex $TSN_data 0]] != 0} {set ok 0; break}
set SPID [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S2F10 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S2F9
S2F10 | Service Program Results Data |
Sent by Host and Equipment |
# S2F10 Tcl Parse reply
set reply [secs_xact $spname S2F9R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect SPR
# SPR A:n (varies) device dependent, any data type
#vset [split [lindex $TSN_data 0] :] {typeSPR lengthSPR}
set SPR [lindex $TSN_data 1]
return ;# finished ok
} ;# end while(ok)
S2F11 | Service Program Directory Request |
Sent by Host and Equipment |
# S2F11 Tcl Receive message - add next line to setup
$spname whenever S2F11 [list recv_S2F11 $spname]
# receive procedure
proc recv_S2F11 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# no data expected
if {$send_reply} {
# TBD create reply data
$spname put S2F12 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S2F11
S2F12 | Service Program Directory Data |
Sent by Host and Equipment |
# S2F12 Tcl Parse reply
set reply [secs_xact $spname S2F11R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:n SPID
# SPID A:6 (always) service program identifier
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach SPID [lreplace $TSN_data 0 0] {
if {[string first "A:" [lindex $SPID 0]] != 0} {set ok 0; break}
set SPID [lindex $SPID 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S2F13R | Equipment Constant Request |
Sent by Host Only |
Comment: Host sends L:0 to receive all in predefined order
Format:
# S2F13R Tcl Receive message - add next line to setup
$spname whenever S2F13 [list recv_S2F13R $spname]
# receive procedure
proc recv_S2F13R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:n ECID
# ECID U4:1 (varies) equipment constant ID, GEM requires U4
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach ECID [lreplace $TSN_data 0 0] {
#vset [split [lindex $ECID 0] :] {typeECID lengthECID}
set ECID [lindex $ECID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S2F14 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S2F13R
S2F14 | Equipment Constant Data |
Sent by Equipment Only |
Comment: An L:0 is substituted if an ECID does not exist, L format is not allowed for an ECV.
Format:
# S2F14 Tcl Parse reply
set reply [secs_xact $spname S2F13R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:n ECV
# ECV A:n (varies) equipment constant value, any scalar type (constant is a misnomer)
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach ECV [lreplace $TSN_data 0 0] {
#vset [split [lindex $ECV 0] :] {typeECV lengthECV}
set ECV [lindex $ECV 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S2F15R | New Equipment Constant Send |
Sent by Host Only |
Comment: Constant is a misnomer, they are settable parameters.
Format:
# S2F15R Tcl Receive message - add next line to setup
$spname whenever S2F15 [list recv_S2F15R $spname]
# receive procedure
proc recv_S2F15R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:n {L:2 ECID ECV}
# ECID U4:1 (varies) equipment constant ID, GEM requires U4
# ECV A:n (varies) equipment constant value, any scalar type (constant is a misnomer)
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach L2 [lreplace $TSN_data 0 0] {
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {ECID ECV}
#vset [split [lindex $ECID 0] :] {typeECID lengthECID}
set ECID [lindex $ECID 1]
#vset [split [lindex $ECV 0] :] {typeECV lengthECV}
set ECV [lindex $ECV 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S2F16 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S2F15R
S2F16 | New Equipment Constant Ack |
Sent by Equipment Only |
Comment: if any input value is not proper, none of the input values are set
Format:
# S2F16 Tcl Parse reply
set reply [secs_xact $spname S2F15R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect EAC
# EAC B:1 (always) equipment acknowledge code, 0 ok
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set EAC [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S2F17R | Date and Time Request |
Sent by Host and Equipment |
Comment: NTP servers should be used instead for better accuracy and to avoid lack of time zone specification.
Format:
# S2F17R Tcl Receive message - add next line to setup
$spname whenever S2F17 [list recv_S2F17R $spname]
# receive procedure
proc recv_S2F17R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# no data expected
if {$send_reply} {
# TBD create reply data
$spname put S2F18 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S2F17R
S2F18 | Date and Time Data |
Sent by Host and Equipment |
Comment: The value should not be used for system clock synchronization.
Format:
# S2F18 Tcl Parse reply
set reply [secs_xact $spname S2F17R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect TIME
# TIME A:32 (always) ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
if {[string first "A:" [lindex $TSN_data 0]] != 0} {set ok 0; break}
set TIME [lindex $TSN_data 1]
return ;# finished ok
} ;# end while(ok)
S2F19R | Reset/Initialize Send |
Sent by Host Only |
# S2F19R Tcl Receive message - add next line to setup
$spname whenever S2F19 [list recv_S2F19R $spname]
# receive procedure
proc recv_S2F19R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect RIC
# RIC U1:1 (varies) reset code, 1 means power up reset
#vset [split [lindex $TSN_data 0] :] {typeRIC lengthRIC}
set RIC [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S2F20 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S2F19R
S2F20 | Reset Acknowledge |
Sent by Equipment Only |
# S2F20 Tcl Parse reply
set reply [secs_xact $spname S2F19R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect RAC
# RAC U1:1 (varies) reset acknowledge
#vset [split [lindex $TSN_data 0] :] {typeRAC lengthRAC}
set RAC [lindex $TSN_data 1]
return ;# finished ok
} ;# end while(ok)
S2F21[R] | Remote Command Send |
Sent by Host Only |
Comment: Compare to S2F41R. Arguments can be passed as you would on a command line.
Format:
# S2F21 Tcl Receive message - add next line to setup
$spname whenever S2F21 [list recv_S2F21 $spname]
# receive procedure
proc recv_S2F21 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect RCMD
# RCMD A:n (varies) remote command, GEM requires a maximum length of 20 printable characters, taken from hex 21-7E (no spaces)
#vset [split [lindex $TSN_data 0] :] {typeRCMD lengthRCMD}
set RCMD [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S2F22 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S2F21
S2F22 | Remote Command Acknowledge |
Sent by Equipment Only |
# S2F22 Tcl Parse reply
set reply [secs_xact $spname S2F21R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect CMDA
# CMDA B:1 (always) command acknowledge code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set CMDA [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S2F23R | Trace Initialize Send |
Sent by Host Only |
Comment: Set TOTSMP=0 to terminate a trace. Set zero-length TRID to delete all traces.
Format:
# S2F23R Tcl Receive message - add next line to setup
$spname whenever S2F23 [list recv_S2F23R $spname]
# receive procedure
proc recv_S2F23R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:5 TRID DSPER TOTSMP REPGSZ {L:n SVID}
# TRID A:n (varies) trace request ID
# DSPER A:6 (varies) data sample period, hhmmss is always supported, A:8 hhmmsscc may be supported
# TOTSMP U4:1 (varies) total samples to be made, should be an even multiple of REPGSZ
# REPGSZ U4:1 (varies) reporting group size, TOTSMP modulo REPGSZ should be 0
# SVID U4:1 (varies) status variable ID
if { [lindex $TSN_data 0] != "L:5" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TRID DSPER TOTSMP REPGSZ Ln}
#vset [split [lindex $TRID 0] :] {typeTRID lengthTRID}
set TRID [lindex $TRID 1]
#vset [split [lindex $DSPER 0] :] {typeDSPER lengthDSPER}
set DSPER [lindex $DSPER 1]
#vset [split [lindex $TOTSMP 0] :] {typeTOTSMP lengthTOTSMP}
set TOTSMP [lindex $TOTSMP 1]
#vset [split [lindex $REPGSZ 0] :] {typeREPGSZ lengthREPGSZ}
set REPGSZ [lindex $REPGSZ 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach SVID [lreplace $Ln 0 0] {
#vset [split [lindex $SVID 0] :] {typeSVID lengthSVID}
set SVID [lindex $SVID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S2F24 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S2F23R
S2F24 | Trace Initialize Acknowledge |
Sent by Equipment Only |
# S2F24 Tcl Parse reply
set reply [secs_xact $spname S2F23R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect TIAACK
# TIAACK B:1 (always) trace acknowledgement code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set TIAACK [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S2F25R | Loopback Diagnostic Request |
Sent by Host and Equipment |
Comment: it is useful to test the telnet escape sequence
Format:
# S2F25R Tcl Receive message - add next line to setup
$spname whenever S2F25 [list recv_S2F25R $spname]
# receive procedure
proc recv_S2F25R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect ABS
# ABS (list)B:n (always) any binary string
if {[string first "B:" [lindex $TSN_data 0]] != 0} {set ok 0; break}
# convert list of type B 0xhh to int using expr
set ABS {}; foreach v [lreplace $TSN_data 0 0] {lappend ABS [expr {$v}]}
if {$send_reply} {
# TBD create reply data
$spname put S2F26 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S2F25R
S2F26 | Loopback Diagnostic Data |
Sent by Host and Equipment |
# S2F26 Tcl Parse reply
set reply [secs_xact $spname S2F25R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ABS
# ABS (list)B:n (always) any binary string
if {[string first "B:" [lindex $TSN_data 0]] != 0} {set ok 0; break}
# convert list of type B 0xhh to int using expr
set ABS {}; foreach v [lreplace $TSN_data 0 0] {lappend ABS [expr {$v}]}
return ;# finished ok
} ;# end while(ok)
S2F27R | Initiate Processing Request |
Sent by Host Only |
Comment: made obsolete by S2F41R ?
Format:
# S2F27R Tcl Receive message - add next line to setup
$spname whenever S2F27 [list recv_S2F27R $spname]
# receive procedure
proc recv_S2F27R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 LOC PPID {L:n MID}
# LOC B:1 (always) material location code
# PPID A:80 (varies) process program ID
# MID A:16 (varies) material ID, E40 restricts to A:n
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {LOC PPID Ln}
if {[lindex $LOC 0] != "B:1"} {set ok 0; break}
set LOC [expr [lindex $LOC 1]] ;# expr converts 0xhh to int
#vset [split [lindex $PPID 0] :] {typePPID lengthPPID}
set PPID [lindex $PPID 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach MID [lreplace $Ln 0 0] {
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S2F28 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S2F27R
S2F28 | Initiate Processing Acknowledge |
Sent by Equipment Only |
# S2F28 Tcl Parse reply
set reply [secs_xact $spname S2F27R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect CMDA
# CMDA B:1 (always) command acknowledge code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set CMDA [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S2F29R | Equipment Constant Namelist Request |
Sent by Host Only |
Comment: Host sends L:0 for all ECIDs
Format:
# S2F29R Tcl Receive message - add next line to setup
$spname whenever S2F29 [list recv_S2F29R $spname]
# receive procedure
proc recv_S2F29R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:n ECID
# ECID U4:1 (varies) equipment constant ID, GEM requires U4
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach ECID [lreplace $TSN_data 0 0] {
#vset [split [lindex $ECID 0] :] {typeECID lengthECID}
set ECID [lindex $ECID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S2F30 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S2F29R
S2F30 | Equipment Constant Namelist |
Sent by Equipment Only |
# S2F30 Tcl Parse reply
set reply [secs_xact $spname S2F29R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:n {L:6 ECID ECNAME ECMIN ECMAX ECDEF UNITS}
# ECID U4:1 (varies) equipment constant ID, GEM requires U4
# ECNAME A:n (always) equipment constant name
# ECMIN A:n (varies) equipment constant minimum value, any scalar type
# ECMAX A:n (varies) equipment constant maximum value, any scalar type
# ECDEF A:n (varies) equipment constant default value
# UNITS A:n (always) units identifier (see E5 Section 9)
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach L6 [lreplace $TSN_data 0 0] {
if { [lindex $L6 0] != "L:6" } {set ok 0; break}
vset [lreplace $L6 0 0] {ECID ECNAME ECMIN ECMAX ECDEF UNITS}
#vset [split [lindex $ECID 0] :] {typeECID lengthECID}
set ECID [lindex $ECID 1]
if {[string first "A:" [lindex $ECNAME 0]] != 0} {set ok 0; break}
set ECNAME [lindex $ECNAME 1]
#vset [split [lindex $ECMIN 0] :] {typeECMIN lengthECMIN}
set ECMIN [lindex $ECMIN 1]
#vset [split [lindex $ECMAX 0] :] {typeECMAX lengthECMAX}
set ECMAX [lindex $ECMAX 1]
#vset [split [lindex $ECDEF 0] :] {typeECDEF lengthECDEF}
set ECDEF [lindex $ECDEF 1]
if {[string first "A:" [lindex $UNITS 0]] != 0} {set ok 0; break}
set UNITS [lindex $UNITS 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S2F31R | Date and Time Set Request |
Sent by Host Only |
Comment: Modern equipment should use NTP servers to synchronize the system clock. SECS is inaccurate and does not include timezone info.
Format:
# S2F31R Tcl Receive message - add next line to setup
$spname whenever S2F31 [list recv_S2F31R $spname]
# receive procedure
proc recv_S2F31R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect TIME
# TIME A:32 (always) ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
if {[string first "A:" [lindex $TSN_data 0]] != 0} {set ok 0; break}
set TIME [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S2F32 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S2F31R
S2F32 | Date and Time Set Acknowledge |
Sent by Equipment Only |
# S2F32 Tcl Parse reply
set reply [secs_xact $spname S2F31R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect TIACK
# TIACK B:1 (always) time set acknowledge
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set TIACK [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S2F33R | Define Report |
Sent by Host Only |
Comment: a=0 means delete all reports and event links, b=0 means delete the RPTID type and its event links
Format:
# S2F33R Tcl Receive message - add next line to setup
$spname whenever S2F33 [list recv_S2F33R $spname]
# receive procedure
proc recv_S2F33R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 DATAID {L:a {L:2 RPTID {L:b VID}}}
# DATAID U4:1 (varies) an identifier to correlate related messages
# RPTID U4:1 (varies) report ID
# VID A:n (varies) A variable ID
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID La}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
if {[string first L: [lindex $La 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $La 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {RPTID Lb_2}
#vset [split [lindex $RPTID 0] :] {typeRPTID lengthRPTID}
set RPTID [lindex $RPTID 1]
if {[string first L: [lindex $Lb_2 0]] != 0} {set ok 0; break}
foreach VID [lreplace $Lb_2 0 0] {
#vset [split [lindex $VID 0] :] {typeVID lengthVID}
set VID [lindex $VID 1]
}
if {!$ok} break
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S2F34 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S2F33R
S2F34 | Define Report Acknowledge |
Sent by Equipment Only |
# S2F34 Tcl Parse reply
set reply [secs_xact $spname S2F33R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect DRACK
# DRACK B:1 (always) define report acknowledge
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set DRACK [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S2F35R | Link Event Report |
Sent by Host Only |
Comment: b=0 disassociates the CEID from all report links. The message links reports to an event, it does not imply a particular output sequence in the event report.
Format:
# S2F35R Tcl Receive message - add next line to setup
$spname whenever S2F35 [list recv_S2F35R $spname]
# receive procedure
proc recv_S2F35R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 DATAID {L:a {L:2 CEID {L:b RPTID}}}
# DATAID U4:1 (varies) an identifier to correlate related messages
# CEID U4:1 (varies) collection event identifier, GEM requires type Un
# RPTID U4:1 (varies) report ID
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID La}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
if {[string first L: [lindex $La 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $La 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {CEID Lb_2}
#vset [split [lindex $CEID 0] :] {typeCEID lengthCEID}
set CEID [lindex $CEID 1]
if {[string first L: [lindex $Lb_2 0]] != 0} {set ok 0; break}
foreach RPTID [lreplace $Lb_2 0 0] {
#vset [split [lindex $RPTID 0] :] {typeRPTID lengthRPTID}
set RPTID [lindex $RPTID 1]
}
if {!$ok} break
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S2F36 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S2F35R
S2F36 | Link Event Report Acknowledge |
Sent by Equipment Only |
# S2F36 Tcl Parse reply
set reply [secs_xact $spname S2F35R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect LRACK
# LRACK B:1 (always) link report acknowledge
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set LRACK [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S2F37R | Enable/Disable Event Report |
Sent by Host Only |
Comment: n=0 means all CEIDs
Format:
# S2F37R Tcl Receive message - add next line to setup
$spname whenever S2F37 [list recv_S2F37R $spname]
# receive procedure
proc recv_S2F37R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 CEED {L:n CEID}
# CEED TF:1 (always) collection event or trace enablement, true is enabled
# CEID U4:1 (varies) collection event identifier, GEM requires type Un
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {CEED Ln}
if {[lindex $CEED 0] != "TF:1"} {set ok 0; break}
set CEED [lindex $CEED 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach CEID [lreplace $Ln 0 0] {
#vset [split [lindex $CEID 0] :] {typeCEID lengthCEID}
set CEID [lindex $CEID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S2F38 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S2F37R
S2F38 | Enable/Disable Event Report Acknowledge |
Sent by Equipment Only |
# S2F38 Tcl Parse reply
set reply [secs_xact $spname S2F37R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ERACK
# ERACK B:1 (always) enable/disable event report acknowledge
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ERACK [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S2F39R | Multi-block Inquire |
Sent by Host Only |
Comment: for SECS-I mullti-block S2F23 F33, F35, F45, or F49, not required for HSMS
Format:
# S2F39R Tcl Receive message - add next line to setup
$spname whenever S2F39 [list recv_S2F39R $spname]
# receive procedure
proc recv_S2F39R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 DATAID DATALENGTH
# DATAID U4:1 (varies) an identifier to correlate related messages
# DATALENGTH U4:1 (varies) total bytes of the message body
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID DATALENGTH}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $DATALENGTH 0] :] {typeDATALENGTH lengthDATALENGTH}
set DATALENGTH [lindex $DATALENGTH 1]
if {$send_reply} {
# TBD create reply data
$spname put S2F40 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S2F39R
S2F40 | Multi-block Grant |
Sent by Equipment Only |
# S2F40 Tcl Parse reply
set reply [secs_xact $spname S2F39R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect GRANT
# GRANT B:1 (always) multiblock grant code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set GRANT [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S2F41R | Host Command Send |
Sent by Host Only |
# S2F41R Tcl Receive message - add next line to setup
$spname whenever S2F41 [list recv_S2F41R $spname]
# receive procedure
proc recv_S2F41R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 RCMD {L:n {L:2 CPNAME CPVAL}}
# RCMD A:n (varies) remote command, GEM requires a maximum length of 20 printable characters, taken from hex 21-7E (no spaces)
# CPNAME A:n (varies) command parameter name
# CPVAL A:n (varies) command parameter value, any scalar type
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RCMD Ln}
#vset [split [lindex $RCMD 0] :] {typeRCMD lengthRCMD}
set RCMD [lindex $RCMD 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {CPNAME CPVAL}
#vset [split [lindex $CPNAME 0] :] {typeCPNAME lengthCPNAME}
set CPNAME [lindex $CPNAME 1]
#vset [split [lindex $CPVAL 0] :] {typeCPVAL lengthCPVAL}
set CPVAL [lindex $CPVAL 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S2F42 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S2F41R
S2F42 | Host Command Acknowledge |
Sent by Equipment Only |
Comment: n is equal to the number of parameters having errors
Format:
# S2F42 Tcl Parse reply
set reply [secs_xact $spname S2F41R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 HCACK {L:n {L:2 CPNAME CPACK}}
# HCACK B:1 (always) remote command acknowledge
# CPNAME A:n (varies) command parameter name
# CPACK B:1 (always) remote command parameter acknowledge, only received if error
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {HCACK Ln}
if {[lindex $HCACK 0] != "B:1"} {set ok 0; break}
set HCACK [expr [lindex $HCACK 1]] ;# expr converts 0xhh to int
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {CPNAME CPACK}
#vset [split [lindex $CPNAME 0] :] {typeCPNAME lengthCPNAME}
set CPNAME [lindex $CPNAME 1]
if {[lindex $CPACK 0] != "B:1"} {set ok 0; break}
set CPACK [expr [lindex $CPACK 1]] ;# expr converts 0xhh to int
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S2F43R | Configure Spooling |
Sent by Host Only |
Comment: m=0 turns off all streams and fns, n=0 turns on all functions in the stream, stream 1 is not spooled
Format:
# S2F43R Tcl Receive message - add next line to setup
$spname whenever S2F43 [list recv_S2F43R $spname]
# receive procedure
proc recv_S2F43R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:m {L:2 STRID {L:n FCNID}}
# STRID U1:1 (always) stream value
# FCNID U1:1 (always) message type function value
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach L2 [lreplace $TSN_data 0 0] {
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {STRID Ln_1}
if {[lindex $STRID 0] != "U1:1"} {set ok 0; break}
set STRID [lindex $STRID 1]
if {[string first L: [lindex $Ln_1 0]] != 0} {set ok 0; break}
foreach FCNID [lreplace $Ln_1 0 0] {
if {[lindex $FCNID 0] != "U1:1"} {set ok 0; break}
set FCNID [lindex $FCNID 1]
}
if {!$ok} break
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S2F44 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S2F43R
S2F44 | Configure Spooling Acknowledge |
Sent by Equipment Only |
Comment: m=0 when there are no errors; n is the number of functions in error in a stream
Format:
# S2F44 Tcl Parse reply
set reply [secs_xact $spname S2F43R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 RSPACK {L:m {L:3 STRID STRACK {L:n FCNID}}}
# RSPACK B:1 (always) spooling response
# STRID U1:1 (always) stream value
# STRACK B:1 (always) spooling stream acknowledge
# FCNID U1:1 (always) message type function value
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RSPACK Lm}
if {[lindex $RSPACK 0] != "B:1"} {set ok 0; break}
set RSPACK [expr [lindex $RSPACK 1]] ;# expr converts 0xhh to int
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach L3_1 [lreplace $Lm 0 0] {
if { [lindex $L3_1 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3_1 0 0] {STRID STRACK Ln_2}
if {[lindex $STRID 0] != "U1:1"} {set ok 0; break}
set STRID [lindex $STRID 1]
if {[lindex $STRACK 0] != "B:1"} {set ok 0; break}
set STRACK [expr [lindex $STRACK 1]] ;# expr converts 0xhh to int
if {[string first L: [lindex $Ln_2 0]] != 0} {set ok 0; break}
foreach FCNID [lreplace $Ln_2 0 0] {
if {[lindex $FCNID 0] != "U1:1"} {set ok 0; break}
set FCNID [lindex $FCNID 1]
}
if {!$ok} break
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S2F45R | Define Variable Limit Attributes |
Sent by Host Only |
Comment: L:2* can be L:2 or L:0
Format:
# S2F45R Tcl Receive message - add next line to setup
$spname whenever S2F45 [list recv_S2F45R $spname]
# receive procedure
proc recv_S2F45R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 DATAID {L:m {L:2 VID {L:n {L:2 LIMITID {L:2* UPPERDB LOWERDB}}}}}
# DATAID U4:1 (varies) an identifier to correlate related messages
# VID A:n (varies) A variable ID
# LIMITID B:1 (always) identifies a specific limit
# UPPERDB F4:1 (varies) the upper bound of a deadband limit
# LOWERDB F4:1 (varies) the lower bound of a deadband limit
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID Lm}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lm 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {VID Ln_2}
#vset [split [lindex $VID 0] :] {typeVID lengthVID}
set VID [lindex $VID 1]
if {[string first L: [lindex $Ln_2 0]] != 0} {set ok 0; break}
foreach L2_3 [lreplace $Ln_2 0 0] {
if { [lindex $L2_3 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_3 0 0] {LIMITID L2opt_4}
if {[lindex $LIMITID 0] != "B:1"} {set ok 0; break}
set LIMITID [expr [lindex $LIMITID 1]] ;# expr converts 0xhh to int
if { [lindex $L2opt_4 0] == "L:2" } { ;# 2 optional items found
vset [lreplace $L2opt_4 0 0] {UPPERDB LOWERDB}
#vset [split [lindex $UPPERDB 0] :] {typeUPPERDB lengthUPPERDB}
set UPPERDB [lindex $UPPERDB 1]
#vset [split [lindex $LOWERDB 0] :] {typeLOWERDB lengthLOWERDB}
set LOWERDB [lindex $LOWERDB 1]
}
}
if {!$ok} break
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S2F46 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S2F45R
S2F46 | Define Variable Limit Attributes Acknowledge |
Sent by Equipment Only |
Comment: L:2* can be L:2 or L:0, varies with VID
Format:
# S2F46 Tcl Parse reply
set reply [secs_xact $spname S2F45R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 VLAACK {L:m {L:3 VID LVACK {L:2* LIMITID LIMITACK}}}
# VLAACK B:1 (always) variable limit attribute acknowledge
# VID A:n (varies) A variable ID
# LVACK B:1 (always) variable limit error code
# LIMITID B:1 (always) identifies a specific limit
# LIMITACK B:1 (always) variable limit value error code
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {VLAACK Lm}
if {[lindex $VLAACK 0] != "B:1"} {set ok 0; break}
set VLAACK [expr [lindex $VLAACK 1]] ;# expr converts 0xhh to int
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach L3_1 [lreplace $Lm 0 0] {
if { [lindex $L3_1 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3_1 0 0] {VID LVACK L2opt_2}
#vset [split [lindex $VID 0] :] {typeVID lengthVID}
set VID [lindex $VID 1]
if {[lindex $LVACK 0] != "B:1"} {set ok 0; break}
set LVACK [expr [lindex $LVACK 1]] ;# expr converts 0xhh to int
if { [lindex $L2opt_2 0] == "L:2" } { ;# 2 optional items found
vset [lreplace $L2opt_2 0 0] {LIMITID LIMITACK}
if {[lindex $LIMITID 0] != "B:1"} {set ok 0; break}
set LIMITID [expr [lindex $LIMITID 1]] ;# expr converts 0xhh to int
if {[lindex $LIMITACK 0] != "B:1"} {set ok 0; break}
set LIMITACK [expr [lindex $LIMITACK 1]] ;# expr converts 0xhh to int
}
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S2F47R | Variable Limit Attribute Request |
Sent by Host Only |
Comment: Host sends L:0 to discover VIDs that support limits
Format:
# S2F47R Tcl Receive message - add next line to setup
$spname whenever S2F47 [list recv_S2F47R $spname]
# receive procedure
proc recv_S2F47R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:m VID
# VID A:n (varies) A variable ID
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach VID [lreplace $TSN_data 0 0] {
#vset [split [lindex $VID 0] :] {typeVID lengthVID}
set VID [lindex $VID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S2F48 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S2F47R
S2F48 | Variable Limit Attribute Send |
Sent by Equipment Only |
Comment: L:4* can be L:4 or L:0
Format:
# S2F48 Tcl Parse reply
set reply [secs_xact $spname S2F47R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:m {L:2 VID {L:4* UNITS LIMITMIN LIMITMAX {L:n {L:3 LIMITID UPPERDB LOWERDB}}}}
# VID A:n (varies) A variable ID
# UNITS A:n (always) units identifier (see E5 Section 9)
# LIMITMIN F4:1 (varies) The minimum value allowed for the lower dead band limit
# LIMITMAX F4:1 (varies) The maximum value allowed for the upper dead band limit
# LIMITID B:1 (always) identifies a specific limit
# UPPERDB F4:1 (varies) the upper bound of a deadband limit
# LOWERDB F4:1 (varies) the lower bound of a deadband limit
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach L2 [lreplace $TSN_data 0 0] {
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {VID L4opt_1}
#vset [split [lindex $VID 0] :] {typeVID lengthVID}
set VID [lindex $VID 1]
if { [lindex $L4opt_1 0] == "L:4" } { ;# 4 optional items found
vset [lreplace $L4opt_1 0 0] {UNITS LIMITMIN LIMITMAX Ln_2}
if {[string first "A:" [lindex $UNITS 0]] != 0} {set ok 0; break}
set UNITS [lindex $UNITS 1]
#vset [split [lindex $LIMITMIN 0] :] {typeLIMITMIN lengthLIMITMIN}
set LIMITMIN [lindex $LIMITMIN 1]
#vset [split [lindex $LIMITMAX 0] :] {typeLIMITMAX lengthLIMITMAX}
set LIMITMAX [lindex $LIMITMAX 1]
if {[string first L: [lindex $Ln_2 0]] != 0} {set ok 0; break}
foreach L3_3 [lreplace $Ln_2 0 0] {
if { [lindex $L3_3 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3_3 0 0] {LIMITID UPPERDB LOWERDB}
if {[lindex $LIMITID 0] != "B:1"} {set ok 0; break}
set LIMITID [expr [lindex $LIMITID 1]] ;# expr converts 0xhh to int
#vset [split [lindex $UPPERDB 0] :] {typeUPPERDB lengthUPPERDB}
set UPPERDB [lindex $UPPERDB 1]
#vset [split [lindex $LOWERDB 0] :] {typeLOWERDB lengthLOWERDB}
set LOWERDB [lindex $LOWERDB 1]
}
if {!$ok} break
}
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S2F49R | Enhanced Remote Command |
Sent by Host Only |
Comment: the standard fails to show the message is sent with reply requested; CEPVAL can be a list of same format values or CPNAME CEPVAL pairs, possible nested list inclusion is implied
Format:
# S2F49R Tcl Receive message - add next line to setup
$spname whenever S2F49 [list recv_S2F49R $spname]
# receive procedure
proc recv_S2F49R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 DATAID OBJSPEC RCMD {L:m {L:2 CPNAME CEPVAL}}
# DATAID U4:1 (varies) an identifier to correlate related messages
# OBJSPEC A:n (varies) E39 structured text identifying an object, [object type:object id>]+
# RCMD A:n (varies) remote command, GEM requires a maximum length of 20 printable characters, taken from hex 21-7E (no spaces)
# CPNAME A:n (varies) command parameter name
# CEPVAL A:n (varies) an enhanced parameter value, may be a scalar of any type, a list of values of the same type, or a list of possibly nested {L:2 CPNAME CEPVAL}
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID OBJSPEC RCMD Lm}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $OBJSPEC 0] :] {typeOBJSPEC lengthOBJSPEC}
set OBJSPEC [lindex $OBJSPEC 1]
#vset [split [lindex $RCMD 0] :] {typeRCMD lengthRCMD}
set RCMD [lindex $RCMD 1]
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lm 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {CPNAME CEPVAL}
#vset [split [lindex $CPNAME 0] :] {typeCPNAME lengthCPNAME}
set CPNAME [lindex $CPNAME 1]
#vset [split [lindex $CEPVAL 0] :] {typeCEPVAL lengthCEPVAL}
set CEPVAL [lindex $CEPVAL 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S2F50 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S2F49R
S2F50 | Enhanced Remote Command Acknowledge |
Sent by Equipment Only |
Comment: CEPACK can be a list structure with possible nesting of additional list structures
Format:
# S2F50 Tcl Parse reply
set reply [secs_xact $spname S2F49R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 HCACK {L:n {L:2 CPNAME CEPACK}}
# HCACK B:1 (always) remote command acknowledge
# CPNAME A:n (varies) command parameter name
# CEPACK B:1 (always) command enhanced parameter acknowledge, may be a list or nested list structure to mirror the input structure of a CEPVAL
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {HCACK Ln}
if {[lindex $HCACK 0] != "B:1"} {set ok 0; break}
set HCACK [expr [lindex $HCACK 1]] ;# expr converts 0xhh to int
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {CPNAME CEPACK}
#vset [split [lindex $CPNAME 0] :] {typeCPNAME lengthCPNAME}
set CPNAME [lindex $CPNAME 1]
if {[lindex $CEPACK 0] != "B:1"} {set ok 0; break}
set CEPACK [expr [lindex $CEPACK 1]] ;# expr converts 0xhh to int
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S2F51R | Request Report Identifiers |
Sent by Host Only |
Comment: Host sends S2F51R to discover defined RPTIDs, new 8/2021
Format:
# S2F51R Tcl Receive message - add next line to setup
$spname whenever S2F51 [list recv_S2F51R $spname]
# receive procedure
proc recv_S2F51R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# no data expected
if {$send_reply} {
# TBD create reply data
$spname put S2F52 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S2F51R
S2F52 | Return Report Identifiers |
Sent by Equipment Only |
# S2F52 Tcl Parse reply
set reply [secs_xact $spname S2F51R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:n RPTID
# RPTID U4:1 (varies) report ID
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach RPTID [lreplace $TSN_data 0 0] {
#vset [split [lindex $RPTID 0] :] {typeRPTID lengthRPTID}
set RPTID [lindex $RPTID 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S2F53R | Request Report Definitions |
Sent by Host Only |
Comment: Host sends L:0 for all defined reports, new 8/2021
Format:
# S2F53R Tcl Receive message - add next line to setup
$spname whenever S2F53 [list recv_S2F53R $spname]
# receive procedure
proc recv_S2F53R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:n RPTID
# RPTID U4:1 (varies) report ID
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach RPTID [lreplace $TSN_data 0 0] {
#vset [split [lindex $RPTID 0] :] {typeRPTID lengthRPTID}
set RPTID [lindex $RPTID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S2F54 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S2F53R
S2F54 | Return Report Definitions |
Sent by Equipment Only |
Comment: a is 0 for unknown RPTID, n is 0 for no reports defined and L:0 request, new 8/2021
Format:
# S2F54 Tcl Parse reply
set reply [secs_xact $spname S2F53R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:n {L:2 RPTID {L:a VID}}
# RPTID U4:1 (varies) report ID
# VID A:n (varies) A variable ID
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach L2 [lreplace $TSN_data 0 0] {
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {RPTID La_1}
#vset [split [lindex $RPTID 0] :] {typeRPTID lengthRPTID}
set RPTID [lindex $RPTID 1]
if {[string first L: [lindex $La_1 0]] != 0} {set ok 0; break}
foreach VID [lreplace $La_1 0 0] {
#vset [split [lindex $VID 0] :] {typeVID lengthVID}
set VID [lindex $VID 1]
}
if {!$ok} break
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S2F55R | Request Event Report Links |
Sent by Host Only |
Comment: Host sends L:0 to discover linked events and links, new 8/2021
Format:
# S2F55R Tcl Receive message - add next line to setup
$spname whenever S2F55 [list recv_S2F55R $spname]
# receive procedure
proc recv_S2F55R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:n CEID
# CEID U4:1 (varies) collection event identifier, GEM requires type Un
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach CEID [lreplace $TSN_data 0 0] {
#vset [split [lindex $CEID 0] :] {typeCEID lengthCEID}
set CEID [lindex $CEID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S2F56 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S2F55R
S2F56 | Return Event Report Links |
Sent by Equipment Only |
Comment: CENAME is A:0 for unknown CEID, a is 0 for no linked reports, L:0 reply to L:0 if no links defined, new 8/2021
Format:
# S2F56 Tcl Parse reply
set reply [secs_xact $spname S2F55R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:n {L:3 CEID CENAME {L:a RPTID}}
# CEID U4:1 (varies) collection event identifier, GEM requires type Un
# CENAME A:n (always) a descriptive name for a Data Collection Event
# RPTID U4:1 (varies) report ID
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach L3 [lreplace $TSN_data 0 0] {
if { [lindex $L3 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3 0 0] {CEID CENAME La_1}
#vset [split [lindex $CEID 0] :] {typeCEID lengthCEID}
set CEID [lindex $CEID 1]
if {[string first "A:" [lindex $CENAME 0]] != 0} {set ok 0; break}
set CENAME [lindex $CENAME 1]
if {[string first L: [lindex $La_1 0]] != 0} {set ok 0; break}
foreach RPTID [lreplace $La_1 0 0] {
#vset [split [lindex $RPTID 0] :] {typeRPTID lengthRPTID}
set RPTID [lindex $RPTID 1]
}
if {!$ok} break
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S2F57R | Request Enabled Events |
Sent by Host Only |
Comment: Host sends header-only to discover events that are enabled for reporting, new 8/2021
Format:
# S2F57R Tcl Receive message - add next line to setup
$spname whenever S2F57 [list recv_S2F57R $spname]
# receive procedure
proc recv_S2F57R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# no data expected
if {$send_reply} {
# TBD create reply data
$spname put S2F58 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S2F57R
S2F58 | Return Enabled Events |
Sent by Equipment Only |
# S2F58 Tcl Parse reply
set reply [secs_xact $spname S2F57R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:n CEID
# CEID U4:1 (varies) collection event identifier, GEM requires type Un
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach CEID [lreplace $TSN_data 0 0] {
#vset [split [lindex $CEID 0] :] {typeCEID lengthCEID}
set CEID [lindex $CEID 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S2F59R | Request Spool Streams and Functions |
Sent by Host Only |
Comment: Host sends header-only to discover SFs configured for spooling, new 8/2021
Format:
# S2F59R Tcl Receive message - add next line to setup
$spname whenever S2F59 [list recv_S2F59R $spname]
# receive procedure
proc recv_S2F59R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# no data expected
if {$send_reply} {
# TBD create reply data
$spname put S2F60 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S2F59R
S2F60 | Return Spool Streams and Functions |
Sent by Equipment Only |
Comment: n=0 indicates spooling disabled, b=0 implies all Fs in stream, new 8/2021
Format:
# S2F60 Tcl Parse reply
set reply [secs_xact $spname S2F59R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:n {L:2 STRID {L:a FCNID}}
# STRID U1:1 (always) stream value
# FCNID U1:1 (always) message type function value
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach L2 [lreplace $TSN_data 0 0] {
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {STRID La_1}
if {[lindex $STRID 0] != "U1:1"} {set ok 0; break}
set STRID [lindex $STRID 1]
if {[string first L: [lindex $La_1 0]] != 0} {set ok 0; break}
foreach FCNID [lreplace $La_1 0 0] {
if {[lindex $FCNID 0] != "U1:1"} {set ok 0; break}
set FCNID [lindex $FCNID 1]
}
if {!$ok} break
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S2F61R | Request Trace Identifiers |
Sent by Host Only |
Comment: Host sends header-only to discover S2F23 trace reports, new 8/2021
Format:
# S2F61R Tcl Receive message - add next line to setup
$spname whenever S2F61 [list recv_S2F61R $spname]
# receive procedure
proc recv_S2F61R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# no data expected
if {$send_reply} {
# TBD create reply data
$spname put S2F62 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S2F61R
S2F62 | Return Trace Identifiers |
Sent by Equipment Only |
Comment: Host configures traces with S2F23, new message 8/2021
Format:
# S2F62 Tcl Parse reply
set reply [secs_xact $spname S2F61R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:n TRID
# TRID A:n (varies) trace request ID
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach TRID [lreplace $TSN_data 0 0] {
#vset [split [lindex $TRID 0] :] {typeTRID lengthTRID}
set TRID [lindex $TRID 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S2F63R | Request Trace Definitions |
Sent by Host Only |
Comment: Host sends L:0 for all traces setup with S2F23, new 8/2021
Format:
# S2F63R Tcl Receive message - add next line to setup
$spname whenever S2F63 [list recv_S2F63R $spname]
# receive procedure
proc recv_S2F63R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:n TRID
# TRID A:n (varies) trace request ID
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach TRID [lreplace $TSN_data 0 0] {
#vset [split [lindex $TRID 0] :] {typeTRID lengthTRID}
set TRID [lindex $TRID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S2F64 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S2F63R
S2F64 | Return Trace Definitions |
Sent by Equipment Only |
Comment: zero-length items sent for unknown TRID, n=0 for no traces defined and L:0 query, new 8/2021
Format:
# S2F64 Tcl Parse reply
set reply [secs_xact $spname S2F63R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:n {L:5 TRID DSPER TOTSMP REPGSZ {L:a SVID}}
# TRID A:n (varies) trace request ID
# DSPER A:6 (varies) data sample period, hhmmss is always supported, A:8 hhmmsscc may be supported
# TOTSMP U4:1 (varies) total samples to be made, should be an even multiple of REPGSZ
# REPGSZ U4:1 (varies) reporting group size, TOTSMP modulo REPGSZ should be 0
# SVID U4:1 (varies) status variable ID
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach L5 [lreplace $TSN_data 0 0] {
if { [lindex $L5 0] != "L:5" } {set ok 0; break}
vset [lreplace $L5 0 0] {TRID DSPER TOTSMP REPGSZ La_1}
#vset [split [lindex $TRID 0] :] {typeTRID lengthTRID}
set TRID [lindex $TRID 1]
#vset [split [lindex $DSPER 0] :] {typeDSPER lengthDSPER}
set DSPER [lindex $DSPER 1]
#vset [split [lindex $TOTSMP 0] :] {typeTOTSMP lengthTOTSMP}
set TOTSMP [lindex $TOTSMP 1]
#vset [split [lindex $REPGSZ 0] :] {typeREPGSZ lengthREPGSZ}
set REPGSZ [lindex $REPGSZ 1]
if {[string first L: [lindex $La_1 0]] != 0} {set ok 0; break}
foreach SVID [lreplace $La_1 0 0] {
#vset [split [lindex $SVID 0] :] {typeSVID lengthSVID}
set SVID [lindex $SVID 1]
}
if {!$ok} break
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S3F1R | Material Status Request |
Sent by Host Only |
# S3F1R Tcl Receive message - add next line to setup
$spname whenever S3F1 [list recv_S3F1R $spname]
# receive procedure
proc recv_S3F1R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# no data expected
if {$send_reply} {
# TBD create reply data
$spname put S3F2 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S3F1R
S3F2 | Material Status Data |
Sent by Equipment Only |
# S3F2 Tcl Parse reply
set reply [secs_xact $spname S3F1R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 MF {L:m {L:3 LOC QUA MID}}
# MF B:1 (varies) material format code, ASCII indicates generic units, E40 restricts to B:1
# LOC B:1 (always) material location code
# QUA B:1 (always) quantity (format limits max to 255!)
# MID A:16 (varies) material ID, E40 restricts to A:n
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {MF Lm}
#vset [split [lindex $MF 0] :] {typeMF lengthMF}
set MF [lindex $MF 1]
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach L3_1 [lreplace $Lm 0 0] {
if { [lindex $L3_1 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3_1 0 0] {LOC QUA MID}
if {[lindex $LOC 0] != "B:1"} {set ok 0; break}
set LOC [expr [lindex $LOC 1]] ;# expr converts 0xhh to int
if {[lindex $QUA 0] != "B:1"} {set ok 0; break}
set QUA [expr [lindex $QUA 1]] ;# expr converts 0xhh to int
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S3F3R | Time to Completion Data |
Sent by Host Only |
# S3F3R Tcl Receive message - add next line to setup
$spname whenever S3F3 [list recv_S3F3R $spname]
# receive procedure
proc recv_S3F3R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# no data expected
if {$send_reply} {
# TBD create reply data
$spname put S3F4 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S3F3R
S3F4 | Time to Completion Data |
Sent by Equipment Only |
# S3F4 Tcl Parse reply
set reply [secs_xact $spname S3F3R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 MF {L:m {L:3 TTC QUA MID}}
# MF B:1 (varies) material format code, ASCII indicates generic units, E40 restricts to B:1
# TTC U4:1 (varies) time to completion, standard does not specify units, in seconds??
# QUA B:1 (always) quantity (format limits max to 255!)
# MID A:16 (varies) material ID, E40 restricts to A:n
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {MF Lm}
#vset [split [lindex $MF 0] :] {typeMF lengthMF}
set MF [lindex $MF 1]
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach L3_1 [lreplace $Lm 0 0] {
if { [lindex $L3_1 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3_1 0 0] {TTC QUA MID}
#vset [split [lindex $TTC 0] :] {typeTTC lengthTTC}
set TTC [lindex $TTC 1]
if {[lindex $QUA 0] != "B:1"} {set ok 0; break}
set QUA [expr [lindex $QUA 1]] ;# expr converts 0xhh to int
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S3F5[R] | Material Found Send |
Sent by Equipment Only |
# S3F5 Tcl Receive message - add next line to setup
$spname whenever S3F5 [list recv_S3F5 $spname]
# receive procedure
proc recv_S3F5 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 MF QUA
# MF B:1 (varies) material format code, ASCII indicates generic units, E40 restricts to B:1
# QUA B:1 (always) quantity (format limits max to 255!)
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {MF QUA}
#vset [split [lindex $MF 0] :] {typeMF lengthMF}
set MF [lindex $MF 1]
if {[lindex $QUA 0] != "B:1"} {set ok 0; break}
set QUA [expr [lindex $QUA 1]] ;# expr converts 0xhh to int
if {$send_reply} {
# TBD create reply data
$spname put S3F6 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S3F5
S3F6 | Material Found Acknowledge |
Sent by Host Only |
# S3F6 Tcl Parse reply
set reply [secs_xact $spname S3F5R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC3
# ACKC3 B:1 (always) acknowledge code, 0 ok
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC3 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S3F7[R] | Material Lost Send |
Sent by Equipment Only |
# S3F7 Tcl Receive message - add next line to setup
$spname whenever S3F7 [list recv_S3F7 $spname]
# receive procedure
proc recv_S3F7 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 MF QUA MID
# MF B:1 (varies) material format code, ASCII indicates generic units, E40 restricts to B:1
# QUA B:1 (always) quantity (format limits max to 255!)
# MID A:16 (varies) material ID, E40 restricts to A:n
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {MF QUA MID}
#vset [split [lindex $MF 0] :] {typeMF lengthMF}
set MF [lindex $MF 1]
if {[lindex $QUA 0] != "B:1"} {set ok 0; break}
set QUA [expr [lindex $QUA 1]] ;# expr converts 0xhh to int
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
if {$send_reply} {
# TBD create reply data
$spname put S3F8 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S3F7
S3F8 | Material Lost Ack |
Sent by Host Only |
# S3F8 Tcl Parse reply
set reply [secs_xact $spname S3F7R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC3
# ACKC3 B:1 (always) acknowledge code, 0 ok
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC3 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S3F9R | Matl ID Equate Send |
Sent by Equipment Only |
# S3F9R Tcl Receive message - add next line to setup
$spname whenever S3F9 [list recv_S3F9R $spname]
# receive procedure
proc recv_S3F9R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 MID EMID
# MID A:16 (varies) material ID, E40 restricts to A:n
# EMID A:16 (varies) equivalent material ID
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {MID EMID}
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
#vset [split [lindex $EMID 0] :] {typeEMID lengthEMID}
set EMID [lindex $EMID 1]
if {$send_reply} {
# TBD create reply data
$spname put S3F10 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S3F9R
S3F10 | Matl ID Equate Ack |
Sent by Host Only |
# S3F10 Tcl Parse reply
set reply [secs_xact $spname S3F9R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC3
# ACKC3 B:1 (always) acknowledge code, 0 ok
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC3 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S3F11R | Matl ID Request |
Sent by Equipment Only |
# S3F11R Tcl Receive message - add next line to setup
$spname whenever S3F11 [list recv_S3F11R $spname]
# receive procedure
proc recv_S3F11R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect PTN
# PTN U1:1 (varies) material port number, E87 shows type U1:1 with data 1-255
#vset [split [lindex $TSN_data 0] :] {typePTN lengthPTN}
set PTN [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S3F12 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S3F11R
S3F12 | Matl ID Request Ack |
Sent by Host Only |
# S3F12 Tcl Parse reply
set reply [secs_xact $spname S3F11R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:3 PTN MIDRA MID
# PTN U1:1 (varies) material port number, E87 shows type U1:1 with data 1-255
# MIDRA B:1 (always) material ID Ack code
# MID A:16 (varies) material ID, E40 restricts to A:n
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PTN MIDRA MID}
#vset [split [lindex $PTN 0] :] {typePTN lengthPTN}
set PTN [lindex $PTN 1]
if {[lindex $MIDRA 0] != "B:1"} {set ok 0; break}
set MIDRA [expr [lindex $MIDRA 1]] ;# expr converts 0xhh to int
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
return ;# finished ok
} ;# end while(ok)
S3F13R | Matl ID Send |
Sent by Host Only |
# S3F13R Tcl Receive message - add next line to setup
$spname whenever S3F13 [list recv_S3F13R $spname]
# receive procedure
proc recv_S3F13R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 PTN MID
# PTN U1:1 (varies) material port number, E87 shows type U1:1 with data 1-255
# MID A:16 (varies) material ID, E40 restricts to A:n
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PTN MID}
#vset [split [lindex $PTN 0] :] {typePTN lengthPTN}
set PTN [lindex $PTN 1]
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
if {$send_reply} {
# TBD create reply data
$spname put S3F14 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S3F13R
S3F14 | Matl ID Ack |
Sent by Equipment Only |
# S3F14 Tcl Parse reply
set reply [secs_xact $spname S3F13R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect MIDAC
# MIDAC B:1 (always) material ID ack
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set MIDAC [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S3F15R | SECS-I Matls Multi-block Inquire, not required for HSMS |
Sent by Host Only |
# S3F15R Tcl Receive message - add next line to setup
$spname whenever S3F15 [list recv_S3F15R $spname]
# receive procedure
proc recv_S3F15R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 DATAID DATALENGTH
# DATAID U4:1 (varies) an identifier to correlate related messages
# DATALENGTH U4:1 (varies) total bytes of the message body
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID DATALENGTH}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $DATALENGTH 0] :] {typeDATALENGTH lengthDATALENGTH}
set DATALENGTH [lindex $DATALENGTH 1]
if {$send_reply} {
# TBD create reply data
$spname put S3F16 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S3F15R
S3F16 | Matls Multi-block Grant |
Sent by Equipment Only |
# S3F16 Tcl Parse reply
set reply [secs_xact $spname S3F15R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect GRANT
# GRANT B:1 (always) multiblock grant code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set GRANT [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S3F17R | Carrier Action Request |
Sent by Host Only |
# S3F17R Tcl Receive message - add next line to setup
$spname whenever S3F17 [list recv_S3F17R $spname]
# receive procedure
proc recv_S3F17R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:5 DATAID CARRIERACTION CARRIERID PTN {L:n {L:2 CATTRID CATTRDATA}}
# DATAID U4:1 (varies) an identifier to correlate related messages
# CARRIERACTION A:n (always) carrier action request
# CARRIERID A:n (always) carrier ID
# PTN U1:1 (varies) material port number, E87 shows type U1:1 with data 1-255
# CATTRID A:n (varies) carrier attribute identifier, E87 requires text per E39.1, Sec 6
# CATTRDATA A:n (varies) carrier attribute value (any data type)
if { [lindex $TSN_data 0] != "L:5" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID CARRIERACTION CARRIERID PTN Ln}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
if {[string first "A:" [lindex $CARRIERACTION 0]] != 0} {set ok 0; break}
set CARRIERACTION [lindex $CARRIERACTION 1]
if {[string first "A:" [lindex $CARRIERID 0]] != 0} {set ok 0; break}
set CARRIERID [lindex $CARRIERID 1]
#vset [split [lindex $PTN 0] :] {typePTN lengthPTN}
set PTN [lindex $PTN 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {CATTRID CATTRDATA}
#vset [split [lindex $CATTRID 0] :] {typeCATTRID lengthCATTRID}
set CATTRID [lindex $CATTRID 1]
#vset [split [lindex $CATTRDATA 0] :] {typeCATTRDATA lengthCATTRDATA}
set CATTRDATA [lindex $CATTRDATA 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S3F18 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S3F17R
S3F18 | Carrier Action Ack |
Sent by Equipment Only |
# S3F18 Tcl Parse reply
set reply [secs_xact $spname S3F17R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 CAACK {L:n {L:2 ERRCODE ERRTEXT}}
# CAACK U1:1 (always) carrier action acknowledge
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {CAACK Ln}
if {[lindex $CAACK 0] != "U1:1"} {set ok 0; break}
set CAACK [lindex $CAACK 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S3F19R | Cancel All Carrier Out Req |
Sent by Host Only |
# S3F19R Tcl Receive message - add next line to setup
$spname whenever S3F19 [list recv_S3F19R $spname]
# receive procedure
proc recv_S3F19R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# no data expected
if {$send_reply} {
# TBD create reply data
$spname put S3F20 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S3F19R
S3F20 | Cancel All Carrier Out Ack |
Sent by Equipment Only |
# S3F20 Tcl Parse reply
set reply [secs_xact $spname S3F19R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 CAACK {L:n {L:2 ERRCODE ERRTEXT}}
# CAACK U1:1 (always) carrier action acknowledge
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {CAACK Ln}
if {[lindex $CAACK 0] != "U1:1"} {set ok 0; break}
set CAACK [lindex $CAACK 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S3F21R | Port Group Defn |
Sent by Host Only |
Comment: E87 used to refer to PORTACCESS but E5 defines ACCESSMODE
Format:
# S3F21R Tcl Receive message - add next line to setup
$spname whenever S3F21 [list recv_S3F21R $spname]
# receive procedure
proc recv_S3F21R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 PORTGRPNAME ACCESSMODE {L:n PTN}
# PORTGRPNAME A:n (always) name of a group of ports
# ACCESSMODE U1:1 (always) load port access mode
# PTN U1:1 (varies) material port number, E87 shows type U1:1 with data 1-255
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PORTGRPNAME ACCESSMODE Ln}
if {[string first "A:" [lindex $PORTGRPNAME 0]] != 0} {set ok 0; break}
set PORTGRPNAME [lindex $PORTGRPNAME 1]
if {[lindex $ACCESSMODE 0] != "U1:1"} {set ok 0; break}
set ACCESSMODE [lindex $ACCESSMODE 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach PTN [lreplace $Ln 0 0] {
#vset [split [lindex $PTN 0] :] {typePTN lengthPTN}
set PTN [lindex $PTN 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S3F22 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S3F21R
S3F22 | Port Group Defn Ack |
Sent by Equipment Only |
# S3F22 Tcl Parse reply
set reply [secs_xact $spname S3F21R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 CAACK {L:n {L:2 ERRCODE ERRTEXT}}
# CAACK U1:1 (always) carrier action acknowledge
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {CAACK Ln}
if {[lindex $CAACK 0] != "U1:1"} {set ok 0; break}
set CAACK [lindex $CAACK 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S3F23R | Port Group Action Req |
Sent by Host Only |
Comment: not documented in E87, port group names - is this vendor specific?
Format:
# S3F23R Tcl Receive message - add next line to setup
$spname whenever S3F23 [list recv_S3F23R $spname]
# receive procedure
proc recv_S3F23R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 PGRPACTION PORTGRPNAME {L:m {L:2 PARAMNAME PARAMVAL}}
# PGRPACTION A:n (always) port group command, an alias for PORTACTION?
# PORTGRPNAME A:n (always) name of a group of ports
# PARAMNAME A:n (always) argument name
# PARAMVAL U1:1 (varies) argument value, only defined use is ServiceStatus, 0 = OUT OF SERVICE, 1 = IN SERVICE
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PGRPACTION PORTGRPNAME Lm}
if {[string first "A:" [lindex $PGRPACTION 0]] != 0} {set ok 0; break}
set PGRPACTION [lindex $PGRPACTION 1]
if {[string first "A:" [lindex $PORTGRPNAME 0]] != 0} {set ok 0; break}
set PORTGRPNAME [lindex $PORTGRPNAME 1]
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lm 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {PARAMNAME PARAMVAL}
if {[string first "A:" [lindex $PARAMNAME 0]] != 0} {set ok 0; break}
set PARAMNAME [lindex $PARAMNAME 1]
#vset [split [lindex $PARAMVAL 0] :] {typePARAMVAL lengthPARAMVAL}
set PARAMVAL [lindex $PARAMVAL 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S3F24 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S3F23R
S3F24 | Port Group Action Ack |
Sent by Equipment Only |
# S3F24 Tcl Parse reply
set reply [secs_xact $spname S3F23R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 CAACK {L:n {L:2 ERRCODE ERRTEXT}}
# CAACK U1:1 (always) carrier action acknowledge
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {CAACK Ln}
if {[lindex $CAACK 0] != "U1:1"} {set ok 0; break}
set CAACK [lindex $CAACK 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S3F25R | Port Action Req |
Sent by Host Only |
# S3F25R Tcl Receive message - add next line to setup
$spname whenever S3F25 [list recv_S3F25R $spname]
# receive procedure
proc recv_S3F25R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 PORTACTION PTN {L:m {L:2 PARAMNAME PARAMVAL}}
# PORTACTION A:n (always) ChangeServiceStatus, CancelReservationAtPort or ReserveAtPort
# PTN U1:1 (varies) material port number, E87 shows type U1:1 with data 1-255
# PARAMNAME A:n (always) argument name
# PARAMVAL U1:1 (varies) argument value, only defined use is ServiceStatus, 0 = OUT OF SERVICE, 1 = IN SERVICE
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PORTACTION PTN Lm}
if {[string first "A:" [lindex $PORTACTION 0]] != 0} {set ok 0; break}
set PORTACTION [lindex $PORTACTION 1]
#vset [split [lindex $PTN 0] :] {typePTN lengthPTN}
set PTN [lindex $PTN 1]
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lm 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {PARAMNAME PARAMVAL}
if {[string first "A:" [lindex $PARAMNAME 0]] != 0} {set ok 0; break}
set PARAMNAME [lindex $PARAMNAME 1]
#vset [split [lindex $PARAMVAL 0] :] {typePARAMVAL lengthPARAMVAL}
set PARAMVAL [lindex $PARAMVAL 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S3F26 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S3F25R
S3F26 | Port Action Ack |
Sent by Equipment Only |
# S3F26 Tcl Parse reply
set reply [secs_xact $spname S3F25R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 CAACK {L:n {L:2 ERRCODE ERRTEXT}}
# CAACK U1:1 (always) carrier action acknowledge
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {CAACK Ln}
if {[lindex $CAACK 0] != "U1:1"} {set ok 0; break}
set CAACK [lindex $CAACK 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S3F27R | Change Access |
Sent by Host Only |
# S3F27R Tcl Receive message - add next line to setup
$spname whenever S3F27 [list recv_S3F27R $spname]
# receive procedure
proc recv_S3F27R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 ACCESSMODE {L:n PTN}
# ACCESSMODE U1:1 (always) load port access mode
# PTN U1:1 (varies) material port number, E87 shows type U1:1 with data 1-255
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {ACCESSMODE Ln}
if {[lindex $ACCESSMODE 0] != "U1:1"} {set ok 0; break}
set ACCESSMODE [lindex $ACCESSMODE 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach PTN [lreplace $Ln 0 0] {
#vset [split [lindex $PTN 0] :] {typePTN lengthPTN}
set PTN [lindex $PTN 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S3F28 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S3F27R
S3F28 | Change Access Ack |
Sent by Equipment Only |
# S3F28 Tcl Parse reply
set reply [secs_xact $spname S3F27R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 CAACK {L:n {L:3 PTN ERRCODE ERRTEXT}}
# CAACK U1:1 (always) carrier action acknowledge
# PTN U1:1 (varies) material port number, E87 shows type U1:1 with data 1-255
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {CAACK Ln}
if {[lindex $CAACK 0] != "U1:1"} {set ok 0; break}
set CAACK [lindex $CAACK 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L3_1 [lreplace $Ln 0 0] {
if { [lindex $L3_1 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3_1 0 0] {PTN ERRCODE ERRTEXT}
#vset [split [lindex $PTN 0] :] {typePTN lengthPTN}
set PTN [lindex $PTN 1]
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S3F29R | Carrier Tag Read Req |
Sent by Host Only |
# S3F29R Tcl Receive message - add next line to setup
$spname whenever S3F29 [list recv_S3F29R $spname]
# receive procedure
proc recv_S3F29R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 LOCID CARRIERSPEC DATASEG DATALENGTH
# LOCID A:n (varies) logical ID of carrier location, E87 requires text
# CARRIERSPEC A:n (always) carrier object specifier (OBJSPEC)
# DATASEG A:n (varies) identifies data requested, E87 requires text
# DATALENGTH U4:1 (varies) total bytes of the message body
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {LOCID CARRIERSPEC DATASEG DATALENGTH}
#vset [split [lindex $LOCID 0] :] {typeLOCID lengthLOCID}
set LOCID [lindex $LOCID 1]
if {[string first "A:" [lindex $CARRIERSPEC 0]] != 0} {set ok 0; break}
set CARRIERSPEC [lindex $CARRIERSPEC 1]
#vset [split [lindex $DATASEG 0] :] {typeDATASEG lengthDATASEG}
set DATASEG [lindex $DATASEG 1]
#vset [split [lindex $DATALENGTH 0] :] {typeDATALENGTH lengthDATALENGTH}
set DATALENGTH [lindex $DATALENGTH 1]
if {$send_reply} {
# TBD create reply data
$spname put S3F30 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S3F29R
S3F30 | Carrier Tag Read Data |
Sent by Equipment Only |
# S3F30 Tcl Parse reply
set reply [secs_xact $spname S3F29R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 DATA {L:2 CAACK {L:s {L:2 ERRCODE ERRTEXT}}}
# DATA A:n (varies) unformatted data
# CAACK U1:1 (always) carrier action acknowledge
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATA L2}
#vset [split [lindex $DATA 0] :] {typeDATA lengthDATA}
set DATA [lindex $DATA 1]
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {CAACK Ls_1}
if {[lindex $CAACK 0] != "U1:1"} {set ok 0; break}
set CAACK [lindex $CAACK 1]
if {[string first L: [lindex $Ls_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Ls_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S3F31R | Carrier Tag Write Data |
Sent by Host Only |
# S3F31R Tcl Receive message - add next line to setup
$spname whenever S3F31 [list recv_S3F31R $spname]
# receive procedure
proc recv_S3F31R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:5 LOCID CARRIERSPEC DATASEG DATALENGTH DATA
# LOCID A:n (varies) logical ID of carrier location, E87 requires text
# CARRIERSPEC A:n (always) carrier object specifier (OBJSPEC)
# DATASEG A:n (varies) identifies data requested, E87 requires text
# DATALENGTH U4:1 (varies) total bytes of the message body
# DATA A:n (varies) unformatted data
if { [lindex $TSN_data 0] != "L:5" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {LOCID CARRIERSPEC DATASEG DATALENGTH DATA}
#vset [split [lindex $LOCID 0] :] {typeLOCID lengthLOCID}
set LOCID [lindex $LOCID 1]
if {[string first "A:" [lindex $CARRIERSPEC 0]] != 0} {set ok 0; break}
set CARRIERSPEC [lindex $CARRIERSPEC 1]
#vset [split [lindex $DATASEG 0] :] {typeDATASEG lengthDATASEG}
set DATASEG [lindex $DATASEG 1]
#vset [split [lindex $DATALENGTH 0] :] {typeDATALENGTH lengthDATALENGTH}
set DATALENGTH [lindex $DATALENGTH 1]
#vset [split [lindex $DATA 0] :] {typeDATA lengthDATA}
set DATA [lindex $DATA 1]
if {$send_reply} {
# TBD create reply data
$spname put S3F32 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S3F31R
S3F32 | Carrier Tag Write Ack |
Sent by Equipment Only |
# S3F32 Tcl Parse reply
set reply [secs_xact $spname S3F31R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 CAACK {L:s {L:2 ERRCODE ERRTEXT}}
# CAACK U1:1 (always) carrier action acknowledge
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {CAACK Ls}
if {[lindex $CAACK 0] != "U1:1"} {set ok 0; break}
set CAACK [lindex $CAACK 1]
if {[string first L: [lindex $Ls 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ls 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S3F33 | Cancel All Pod Out Req |
Sent by Host and Equipment |
# S3F33 Tcl Receive message - add next line to setup
$spname whenever S3F33 [list recv_S3F33 $spname]
# receive procedure
proc recv_S3F33 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# no data expected
if {$send_reply} {
# TBD create reply data
$spname put S3F34 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S3F33
S3F34 | Cancel All Pod Out Ack |
Sent by Host and Equipment |
# S3F34 Tcl Parse reply
set reply [secs_xact $spname S3F33R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 CAACK {L:n {L:2 ERRCODE ERRTEXT}}
# CAACK U1:1 (always) carrier action acknowledge
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {CAACK Ln}
if {[lindex $CAACK 0] != "U1:1"} {set ok 0; break}
set CAACK [lindex $CAACK 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S3F35 | Reticle Transfer Job Req |
Sent by Host and Equipment |
Comment: earlier standard descriptions have errors and undefined data items
Format:
# S3F35 Tcl Receive message - add next line to setup
$spname whenever S3F35 [list recv_S3F35 $spname]
# receive procedure
proc recv_S3F35 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:7 JOBACTION PODID INPTN OUTPTN {L:n {L:2 ATTRID ATTRDATA}} {L:m {L:3 RETICLEID RETREMOVEINSTR {L:r {L:2 ATTRID ATTRDATA}}}} {L:k {L:2 RETICLEID2 RETPLACEINSTR}}
# JOBACTION A:n (always) reticle transfer command
# PODID A:n (always) OBJSPEC for a Pod instance
# INPTN B:1 (always) input material port number
# OUTPTN B:1 (varies) output port (PTN)
# ATTRID A:40 (varies) identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~. Does not begin or end with space.
# ATTRDATA A:n (varies) a specific attribute value of any data type
# RETICLEID A:n (always) OBJSPEC value for a reticle
# RETREMOVEINSTR U1:1 (always) pod slot reticle remove instruction
# ATTRID A:40 (varies) identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~. Does not begin or end with space.
# ATTRDATA A:n (varies) a specific attribute value of any data type
# RETICLEID2 A:n (always) OBJSPEC value for a second reticle
# RETPLACEINSTR U1:1 (always) pod slot reticle place instruction
if { [lindex $TSN_data 0] != "L:7" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {JOBACTION PODID INPTN OUTPTN Ln Lm_n1 Lk_n2}
if {[string first "A:" [lindex $JOBACTION 0]] != 0} {set ok 0; break}
set JOBACTION [lindex $JOBACTION 1]
if {[string first "A:" [lindex $PODID 0]] != 0} {set ok 0; break}
set PODID [lindex $PODID 1]
if {[lindex $INPTN 0] != "B:1"} {set ok 0; break}
set INPTN [expr [lindex $INPTN 1]] ;# expr converts 0xhh to int
#vset [split [lindex $OUTPTN 0] :] {typeOUTPTN lengthOUTPTN}
set OUTPTN [lindex $OUTPTN 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ATTRID ATTRDATA}
#vset [split [lindex $ATTRID 0] :] {typeATTRID lengthATTRID}
set ATTRID [lindex $ATTRID 1]
#vset [split [lindex $ATTRDATA 0] :] {typeATTRDATA lengthATTRDATA}
set ATTRDATA [lindex $ATTRDATA 1]
}
if {!$ok} break
if {[string first L: [lindex $Lm_n1 0]] != 0} {set ok 0; break}
foreach L3_1 [lreplace $Lm_n1 0 0] {
if { [lindex $L3_1 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3_1 0 0] {RETICLEID RETREMOVEINSTR Lr_2}
if {[string first "A:" [lindex $RETICLEID 0]] != 0} {set ok 0; break}
set RETICLEID [lindex $RETICLEID 1]
if {[lindex $RETREMOVEINSTR 0] != "U1:1"} {set ok 0; break}
set RETREMOVEINSTR [lindex $RETREMOVEINSTR 1]
if {[string first L: [lindex $Lr_2 0]] != 0} {set ok 0; break}
foreach L2_3 [lreplace $Lr_2 0 0] {
if { [lindex $L2_3 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_3 0 0] {ATTRID ATTRDATA}
#vset [split [lindex $ATTRID 0] :] {typeATTRID lengthATTRID}
set ATTRID [lindex $ATTRID 1]
#vset [split [lindex $ATTRDATA 0] :] {typeATTRDATA lengthATTRDATA}
set ATTRDATA [lindex $ATTRDATA 1]
}
if {!$ok} break
}
if {!$ok} break
if {[string first L: [lindex $Lk_n2 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lk_n2 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {RETICLEID2 RETPLACEINSTR}
if {[string first "A:" [lindex $RETICLEID2 0]] != 0} {set ok 0; break}
set RETICLEID2 [lindex $RETICLEID2 1]
if {[lindex $RETPLACEINSTR 0] != "U1:1"} {set ok 0; break}
set RETPLACEINSTR [lindex $RETPLACEINSTR 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S3F36 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S3F35
S3F36 | Reticle Transfer Job Ack |
Sent by Host and Equipment |
# S3F36 Tcl Parse reply
set reply [secs_xact $spname S3F35R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 RPMACK {L:n {L:2 ERRCODE ERRTEXT}}
# RPMACK U1:1 (always) reticle pod management ack code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RPMACK Ln}
if {[lindex $RPMACK 0] != "U1:1"} {set ok 0; break}
set RPMACK [lindex $RPMACK 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S4F1R | Ready to Send Materials |
Sent by Host and Equipment |
# S4F1R Tcl Receive message - add next line to setup
$spname whenever S4F1 [list recv_S4F1R $spname]
# receive procedure
proc recv_S4F1R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 PTN MID
# PTN U1:1 (varies) material port number, E87 shows type U1:1 with data 1-255
# MID A:16 (varies) material ID, E40 restricts to A:n
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PTN MID}
#vset [split [lindex $PTN 0] :] {typePTN lengthPTN}
set PTN [lindex $PTN 1]
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
if {$send_reply} {
# TBD create reply data
$spname put S4F2 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S4F1R
S4F2 | Ready to Send Ack |
Sent by Host and Equipment |
# S4F2 Tcl Parse reply
set reply [secs_xact $spname S4F1R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect RSACK
# RSACK B:1 (always) ready to send acknowledge
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set RSACK [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S4F3 | Send Material |
Sent by Host and Equipment |
# S4F3 Tcl Receive message - add next line to setup
$spname whenever S4F3 [list recv_S4F3 $spname]
# receive procedure
proc recv_S4F3 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 PTN MID
# PTN U1:1 (varies) material port number, E87 shows type U1:1 with data 1-255
# MID A:16 (varies) material ID, E40 restricts to A:n
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PTN MID}
#vset [split [lindex $PTN 0] :] {typePTN lengthPTN}
set PTN [lindex $PTN 1]
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
if {$send_reply} {
# TBD create reply data
$spname put S4F4 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S4F3
S4F5 | Handshake Complete |
Sent by Host and Equipment |
# S4F5 Tcl Receive message - add next line to setup
$spname whenever S4F5 [list recv_S4F5 $spname]
# receive procedure
proc recv_S4F5 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 PTN MID
# PTN U1:1 (varies) material port number, E87 shows type U1:1 with data 1-255
# MID A:16 (varies) material ID, E40 restricts to A:n
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PTN MID}
#vset [split [lindex $PTN 0] :] {typePTN lengthPTN}
set PTN [lindex $PTN 1]
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
if {$send_reply} {
# TBD create reply data
$spname put S4F6 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S4F5
S4F7 | Not Ready to Send |
Sent by Host and Equipment |
# S4F7 Tcl Receive message - add next line to setup
$spname whenever S4F7 [list recv_S4F7 $spname]
# receive procedure
proc recv_S4F7 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 PTN MID
# PTN U1:1 (varies) material port number, E87 shows type U1:1 with data 1-255
# MID A:16 (varies) material ID, E40 restricts to A:n
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PTN MID}
#vset [split [lindex $PTN 0] :] {typePTN lengthPTN}
set PTN [lindex $PTN 1]
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
if {$send_reply} {
# TBD create reply data
$spname put S4F8 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S4F7
S4F9 | Stuck in Sender |
Sent by Host and Equipment |
Comment: standard does not show as bidirectional
Format:
# S4F9 Tcl Receive message - add next line to setup
$spname whenever S4F9 [list recv_S4F9 $spname]
# receive procedure
proc recv_S4F9 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 PTN MID
# PTN U1:1 (varies) material port number, E87 shows type U1:1 with data 1-255
# MID A:16 (varies) material ID, E40 restricts to A:n
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PTN MID}
#vset [split [lindex $PTN 0] :] {typePTN lengthPTN}
set PTN [lindex $PTN 1]
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
if {$send_reply} {
# TBD create reply data
$spname put S4F10 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S4F9
S4F11 | Stuck in Receiver |
Sent by Host and Equipment |
Comment: standard does not show as bidirectional
Format:
# S4F11 Tcl Receive message - add next line to setup
$spname whenever S4F11 [list recv_S4F11 $spname]
# receive procedure
proc recv_S4F11 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 PTN MID
# PTN U1:1 (varies) material port number, E87 shows type U1:1 with data 1-255
# MID A:16 (varies) material ID, E40 restricts to A:n
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PTN MID}
#vset [split [lindex $PTN 0] :] {typePTN lengthPTN}
set PTN [lindex $PTN 1]
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
if {$send_reply} {
# TBD create reply data
$spname put S4F12 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S4F11
S4F13 | Send Incomplete Timeout |
Sent by Host and Equipment |
# S4F13 Tcl Receive message - add next line to setup
$spname whenever S4F13 [list recv_S4F13 $spname]
# receive procedure
proc recv_S4F13 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 PTN MID
# PTN U1:1 (varies) material port number, E87 shows type U1:1 with data 1-255
# MID A:16 (varies) material ID, E40 restricts to A:n
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PTN MID}
#vset [split [lindex $PTN 0] :] {typePTN lengthPTN}
set PTN [lindex $PTN 1]
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
if {$send_reply} {
# TBD create reply data
$spname put S4F14 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S4F13
S4F15 | Material Received |
Sent by Host and Equipment |
# S4F15 Tcl Receive message - add next line to setup
$spname whenever S4F15 [list recv_S4F15 $spname]
# receive procedure
proc recv_S4F15 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 PTN MID
# PTN U1:1 (varies) material port number, E87 shows type U1:1 with data 1-255
# MID A:16 (varies) material ID, E40 restricts to A:n
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PTN MID}
#vset [split [lindex $PTN 0] :] {typePTN lengthPTN}
set PTN [lindex $PTN 1]
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
if {$send_reply} {
# TBD create reply data
$spname put S4F16 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S4F15
S4F17R | Request to Receive |
Sent by Host and Equipment |
# S4F17R Tcl Receive message - add next line to setup
$spname whenever S4F17 [list recv_S4F17R $spname]
# receive procedure
proc recv_S4F17R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 PTN MID
# PTN U1:1 (varies) material port number, E87 shows type U1:1 with data 1-255
# MID A:16 (varies) material ID, E40 restricts to A:n
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PTN MID}
#vset [split [lindex $PTN 0] :] {typePTN lengthPTN}
set PTN [lindex $PTN 1]
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
if {$send_reply} {
# TBD create reply data
$spname put S4F18 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S4F17R
S4F18 | Request to Receive Ack |
Sent by Host and Equipment |
# S4F18 Tcl Parse reply
set reply [secs_xact $spname S4F17R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect RRACK
# RRACK B:1 (always) request to receive acknowledge
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set RRACK [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S4F19R | Transfer Job Create |
Sent by Host Only |
# S4F19R Tcl Receive message - add next line to setup
$spname whenever S4F19 [list recv_S4F19R $spname]
# receive procedure
proc recv_S4F19R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 DATAID {L:2 TRJOBNAME {L:n {L:12 TRLINK TRPORT TROBJNAME TROBJTYPE TRROLE TRRCP TRPTNR TRPTPORT TRDIR TRTYPE TRLOCATION TRAUTOSTART}}}
# DATAID U4:1 (varies) an identifier to correlate related messages
# TRJOBNAME A:80 (always) host assigned id for transfer job
# TRLINK U4:1 (varies) task identifier correlation value
# TRPORT U4:1 (varies) port identifier
# TROBJNAME A:n (varies) identifies material to be transferred
# TROBJTYPE U4:1 (varies) identifies type of object to be transferred
# TRROLE U1:1 (always) indicates equipment transfer role
# TRRCP A:80 (always) name of transfer recipe for this handoff
# TRPTNR A:n (always) EQNAME of transfer partner equipment
# TRPTPORT U4:1 (varies) transfer partner port
# TRDIR U1:1 (always) transfer direction
# TRTYPE U1:1 (always) equipment is active or passive transfer participant
# TRLOCATION U4:1 (varies) material transfer location
# TRAUTOSTART TF:1 (always) if true material transfer is initiated by the primary when ready
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID L2}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {TRJOBNAME Ln_1}
if {[string first "A:" [lindex $TRJOBNAME 0]] != 0} {set ok 0; break}
set TRJOBNAME [lindex $TRJOBNAME 1]
if {[string first L: [lindex $Ln_1 0]] != 0} {set ok 0; break}
foreach L12_2 [lreplace $Ln_1 0 0] {
if { [lindex $L12_2 0] != "L:12" } {set ok 0; break}
vset [lreplace $L12_2 0 0] {TRLINK TRPORT TROBJNAME TROBJTYPE TRROLE TRRCP TRPTNR TRPTPORT TRDIR TRTYPE TRLOCATION TRAUTOSTART}
#vset [split [lindex $TRLINK 0] :] {typeTRLINK lengthTRLINK}
set TRLINK [lindex $TRLINK 1]
#vset [split [lindex $TRPORT 0] :] {typeTRPORT lengthTRPORT}
set TRPORT [lindex $TRPORT 1]
#vset [split [lindex $TROBJNAME 0] :] {typeTROBJNAME lengthTROBJNAME}
set TROBJNAME [lindex $TROBJNAME 1]
#vset [split [lindex $TROBJTYPE 0] :] {typeTROBJTYPE lengthTROBJTYPE}
set TROBJTYPE [lindex $TROBJTYPE 1]
if {[lindex $TRROLE 0] != "U1:1"} {set ok 0; break}
set TRROLE [lindex $TRROLE 1]
if {[string first "A:" [lindex $TRRCP 0]] != 0} {set ok 0; break}
set TRRCP [lindex $TRRCP 1]
if {[string first "A:" [lindex $TRPTNR 0]] != 0} {set ok 0; break}
set TRPTNR [lindex $TRPTNR 1]
#vset [split [lindex $TRPTPORT 0] :] {typeTRPTPORT lengthTRPTPORT}
set TRPTPORT [lindex $TRPTPORT 1]
if {[lindex $TRDIR 0] != "U1:1"} {set ok 0; break}
set TRDIR [lindex $TRDIR 1]
if {[lindex $TRTYPE 0] != "U1:1"} {set ok 0; break}
set TRTYPE [lindex $TRTYPE 1]
#vset [split [lindex $TRLOCATION 0] :] {typeTRLOCATION lengthTRLOCATION}
set TRLOCATION [lindex $TRLOCATION 1]
if {[lindex $TRAUTOSTART 0] != "TF:1"} {set ok 0; break}
set TRAUTOSTART [lindex $TRAUTOSTART 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S4F20 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S4F19R
S4F20 | Transfer Job Acknowledge |
Sent by Equipment Only |
# S4F20 Tcl Parse reply
set reply [secs_xact $spname S4F19R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:3 TRJOBID {L:m TRATOMCID} {L:2 TRACK {L:n {L:2 ERRCODE ERRTEXT}}}
# TRJOBID B:1 (always) assigned identifier for transfer job
# TRATOMCID U4:1 (varies) assigned identifier for atomic transfer
# TRACK TF:1 (always) transfer activity success flag
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TRJOBID Lm L2_n1}
if {[lindex $TRJOBID 0] != "B:1"} {set ok 0; break}
set TRJOBID [expr [lindex $TRJOBID 1]] ;# expr converts 0xhh to int
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach TRATOMCID [lreplace $Lm 0 0] {
#vset [split [lindex $TRATOMCID 0] :] {typeTRATOMCID lengthTRATOMCID}
set TRATOMCID [lindex $TRATOMCID 1]
}
if {!$ok} break
if { [lindex $L2_n1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_n1 0 0] {TRACK Ln_1}
if {[lindex $TRACK 0] != "TF:1"} {set ok 0; break}
set TRACK [lindex $TRACK 1]
if {[string first L: [lindex $Ln_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Ln_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S4F21R | Transfer Job Command |
Sent by Host Only |
# S4F21R Tcl Receive message - add next line to setup
$spname whenever S4F21 [list recv_S4F21R $spname]
# receive procedure
proc recv_S4F21R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 TRJOBID TRCMDNAME {L:n {L:2 CPNAME CPVAL}}
# TRJOBID B:1 (always) assigned identifier for transfer job
# TRCMDNAME A:n (always) text enum, CANCEL, PAUSE, RESUME, ABORT, STOP, STARTHANDOFF
# CPNAME A:n (varies) command parameter name
# CPVAL A:n (varies) command parameter value, any scalar type
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TRJOBID TRCMDNAME Ln}
if {[lindex $TRJOBID 0] != "B:1"} {set ok 0; break}
set TRJOBID [expr [lindex $TRJOBID 1]] ;# expr converts 0xhh to int
if {[string first "A:" [lindex $TRCMDNAME 0]] != 0} {set ok 0; break}
set TRCMDNAME [lindex $TRCMDNAME 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {CPNAME CPVAL}
#vset [split [lindex $CPNAME 0] :] {typeCPNAME lengthCPNAME}
set CPNAME [lindex $CPNAME 1]
#vset [split [lindex $CPVAL 0] :] {typeCPVAL lengthCPVAL}
set CPVAL [lindex $CPVAL 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S4F22 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S4F21R
S4F22 | Transfer Job Command Ack |
Sent by Equipment Only |
# S4F22 Tcl Parse reply
set reply [secs_xact $spname S4F21R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 TRACK {L:n {L:2 ERRCODE ERRTEXT}}
# TRACK TF:1 (always) transfer activity success flag
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TRACK Ln}
if {[lindex $TRACK 0] != "TF:1"} {set ok 0; break}
set TRACK [lindex $TRACK 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S4F23[R] | Transfer Command Alert |
Sent by Equipment Only |
# S4F23 Tcl Receive message - add next line to setup
$spname whenever S4F23 [list recv_S4F23 $spname]
# receive procedure
proc recv_S4F23 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 TRJOBID TRJOBNAME TRJOBMS {L:2 TRACK {L:n {L:2 ERRCODE ERRTEXT}}}
# TRJOBID B:1 (always) assigned identifier for transfer job
# TRJOBNAME A:80 (always) host assigned id for transfer job
# TRJOBMS U1:1 (always) transfer job milestone
# TRACK TF:1 (always) transfer activity success flag
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TRJOBID TRJOBNAME TRJOBMS L2}
if {[lindex $TRJOBID 0] != "B:1"} {set ok 0; break}
set TRJOBID [expr [lindex $TRJOBID 1]] ;# expr converts 0xhh to int
if {[string first "A:" [lindex $TRJOBNAME 0]] != 0} {set ok 0; break}
set TRJOBNAME [lindex $TRJOBNAME 1]
if {[lindex $TRJOBMS 0] != "U1:1"} {set ok 0; break}
set TRJOBMS [lindex $TRJOBMS 1]
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {TRACK Ln_1}
if {[lindex $TRACK 0] != "TF:1"} {set ok 0; break}
set TRACK [lindex $TRACK 1]
if {[string first L: [lindex $Ln_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Ln_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S4F24 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S4F23
S4F24 | Transfer Alert Ack |
Sent by Host Only |
# S4F24 Tcl Parse reply
set reply [secs_xact $spname S4F23R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# no data expected
return ;# finished ok
} ;# end while(ok)
S4F25R | Multi-block Inquire |
Sent by Host Only |
Comment: for SECS-I, not required for HSMS
Format:
# S4F25R Tcl Receive message - add next line to setup
$spname whenever S4F25 [list recv_S4F25R $spname]
# receive procedure
proc recv_S4F25R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 DATAID DATALENGTH
# DATAID U4:1 (varies) an identifier to correlate related messages
# DATALENGTH U4:1 (varies) total bytes of the message body
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID DATALENGTH}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $DATALENGTH 0] :] {typeDATALENGTH lengthDATALENGTH}
set DATALENGTH [lindex $DATALENGTH 1]
if {$send_reply} {
# TBD create reply data
$spname put S4F26 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S4F25R
S4F26 | Multi-block Grant |
Sent by Equipment Only |
# S4F26 Tcl Parse reply
set reply [secs_xact $spname S4F25R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect GRANT
# GRANT B:1 (always) multiblock grant code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set GRANT [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S4F27 | Handoff Ready |
Sent by Host and Equipment |
# S4F27 Tcl Receive message - add next line to setup
$spname whenever S4F27 [list recv_S4F27 $spname]
# receive procedure
proc recv_S4F27 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 EQNAME {L:11 TRLINK TRPORT TROBJNAME TROBJTYPE TRROLE TRPTNR TRPTPORT TRDIR TRTYPE TRLOCATION}
# EQNAME A:80 (always) factory assigned equipment identifier
# TRLINK U4:1 (varies) task identifier correlation value
# TRPORT U4:1 (varies) port identifier
# TROBJNAME A:n (varies) identifies material to be transferred
# TROBJTYPE U4:1 (varies) identifies type of object to be transferred
# TRROLE U1:1 (always) indicates equipment transfer role
# TRPTNR A:n (always) EQNAME of transfer partner equipment
# TRPTPORT U4:1 (varies) transfer partner port
# TRDIR U1:1 (always) transfer direction
# TRTYPE U1:1 (always) equipment is active or passive transfer participant
# TRLOCATION U4:1 (varies) material transfer location
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {EQNAME L11}
if {[string first "A:" [lindex $EQNAME 0]] != 0} {set ok 0; break}
set EQNAME [lindex $EQNAME 1]
if { [lindex $L11 0] != "L:11" } {set ok 0; break}
vset [lreplace $L11 0 0] {TRLINK TRPORT TROBJNAME TROBJTYPE TRROLE TRPTNR TRPTPORT TRDIR TRTYPE TRLOCATION}
#vset [split [lindex $TRLINK 0] :] {typeTRLINK lengthTRLINK}
set TRLINK [lindex $TRLINK 1]
#vset [split [lindex $TRPORT 0] :] {typeTRPORT lengthTRPORT}
set TRPORT [lindex $TRPORT 1]
#vset [split [lindex $TROBJNAME 0] :] {typeTROBJNAME lengthTROBJNAME}
set TROBJNAME [lindex $TROBJNAME 1]
#vset [split [lindex $TROBJTYPE 0] :] {typeTROBJTYPE lengthTROBJTYPE}
set TROBJTYPE [lindex $TROBJTYPE 1]
if {[lindex $TRROLE 0] != "U1:1"} {set ok 0; break}
set TRROLE [lindex $TRROLE 1]
if {[string first "A:" [lindex $TRPTNR 0]] != 0} {set ok 0; break}
set TRPTNR [lindex $TRPTNR 1]
#vset [split [lindex $TRPTPORT 0] :] {typeTRPTPORT lengthTRPTPORT}
set TRPTPORT [lindex $TRPTPORT 1]
if {[lindex $TRDIR 0] != "U1:1"} {set ok 0; break}
set TRDIR [lindex $TRDIR 1]
if {[lindex $TRTYPE 0] != "U1:1"} {set ok 0; break}
set TRTYPE [lindex $TRTYPE 1]
#vset [split [lindex $TRLOCATION 0] :] {typeTRLOCATION lengthTRLOCATION}
set TRLOCATION [lindex $TRLOCATION 1]
if {$send_reply} {
# TBD create reply data
$spname put S4F28 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S4F27
S4F29 | Handoff Command |
Sent by Host and Equipment |
# S4F29 Tcl Receive message - add next line to setup
$spname whenever S4F29 [list recv_S4F29 $spname]
# receive procedure
proc recv_S4F29 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 TRLINK MCINDEX HOCMDNAME {L:n {L:2 CPNAME CPVAL}}
# TRLINK U4:1 (varies) task identifier correlation value
# MCINDEX U4:1 (varies) correlation value for handoff command
# HOCMDNAME A:n (varies) handoff command identifier
# CPNAME A:n (varies) command parameter name
# CPVAL A:n (varies) command parameter value, any scalar type
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TRLINK MCINDEX HOCMDNAME Ln}
#vset [split [lindex $TRLINK 0] :] {typeTRLINK lengthTRLINK}
set TRLINK [lindex $TRLINK 1]
#vset [split [lindex $MCINDEX 0] :] {typeMCINDEX lengthMCINDEX}
set MCINDEX [lindex $MCINDEX 1]
#vset [split [lindex $HOCMDNAME 0] :] {typeHOCMDNAME lengthHOCMDNAME}
set HOCMDNAME [lindex $HOCMDNAME 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {CPNAME CPVAL}
#vset [split [lindex $CPNAME 0] :] {typeCPNAME lengthCPNAME}
set CPNAME [lindex $CPNAME 1]
#vset [split [lindex $CPVAL 0] :] {typeCPVAL lengthCPVAL}
set CPVAL [lindex $CPVAL 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S4F30 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S4F29
S4F31 | Handoff Command Complete |
Sent by Host and Equipment |
# S4F31 Tcl Receive message - add next line to setup
$spname whenever S4F31 [list recv_S4F31 $spname]
# receive procedure
proc recv_S4F31 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 TRLINK MCINDEX {L:2 HOACK {L:n {L:2 ERRCODE ERRTEXT}}}
# TRLINK U4:1 (varies) task identifier correlation value
# MCINDEX U4:1 (varies) correlation value for handoff command
# HOACK TF:1 (always) handoff success flag
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TRLINK MCINDEX L2}
#vset [split [lindex $TRLINK 0] :] {typeTRLINK lengthTRLINK}
set TRLINK [lindex $TRLINK 1]
#vset [split [lindex $MCINDEX 0] :] {typeMCINDEX lengthMCINDEX}
set MCINDEX [lindex $MCINDEX 1]
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {HOACK Ln_1}
if {[lindex $HOACK 0] != "TF:1"} {set ok 0; break}
set HOACK [lindex $HOACK 1]
if {[string first L: [lindex $Ln_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Ln_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S4F32 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S4F31
S4F33 | Handoff Verified |
Sent by Host and Equipment |
# S4F33 Tcl Receive message - add next line to setup
$spname whenever S4F33 [list recv_S4F33 $spname]
# receive procedure
proc recv_S4F33 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 TRLINK {L:2 HOACK {L:n ERRCODE ERRTEXT}}
# TRLINK U4:1 (varies) task identifier correlation value
# HOACK TF:1 (always) handoff success flag
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TRLINK L2}
#vset [split [lindex $TRLINK 0] :] {typeTRLINK lengthTRLINK}
set TRLINK [lindex $TRLINK 1]
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {HOACK Ln_1}
if {[lindex $HOACK 0] != "TF:1"} {set ok 0; break}
set HOACK [lindex $HOACK 1]
if {[string first L: [lindex $Ln_1 0]] != 0} {set ok 0; break}
foreach {ERRCODE ERRTEXT} [lreplace $Ln_1 0 0] {
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S4F34 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S4F33
S4F35 | Handoff Cancel Ready |
Sent by Host and Equipment |
# S4F35 Tcl Receive message - add next line to setup
$spname whenever S4F35 [list recv_S4F35 $spname]
# receive procedure
proc recv_S4F35 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect TRLINK
# TRLINK U4:1 (varies) task identifier correlation value
#vset [split [lindex $TSN_data 0] :] {typeTRLINK lengthTRLINK}
set TRLINK [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S4F36 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S4F35
S4F37 | Handoff Cancel Ready Ack |
Sent by Host and Equipment |
# S4F37 Tcl Receive message - add next line to setup
$spname whenever S4F37 [list recv_S4F37 $spname]
# receive procedure
proc recv_S4F37 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 TRLINK HOCANCELACK
# TRLINK U4:1 (varies) task identifier correlation value
# HOCANCELACK U1:1 (always) hand off cancel ack
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TRLINK HOCANCELACK}
#vset [split [lindex $TRLINK 0] :] {typeTRLINK lengthTRLINK}
set TRLINK [lindex $TRLINK 1]
if {[lindex $HOCANCELACK 0] != "U1:1"} {set ok 0; break}
set HOCANCELACK [lindex $HOCANCELACK 1]
if {$send_reply} {
# TBD create reply data
$spname put S4F38 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S4F37
S4F39 | Handoff Halt |
Sent by Host and Equipment |
# S4F39 Tcl Receive message - add next line to setup
$spname whenever S4F39 [list recv_S4F39 $spname]
# receive procedure
proc recv_S4F39 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect TRLINK
# TRLINK U4:1 (varies) task identifier correlation value
#vset [split [lindex $TSN_data 0] :] {typeTRLINK lengthTRLINK}
set TRLINK [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S4F40 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S4F39
S4F41 | Handoff Halt Ack |
Sent by Host and Equipment |
# S4F41 Tcl Receive message - add next line to setup
$spname whenever S4F41 [list recv_S4F41 $spname]
# receive procedure
proc recv_S4F41 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 TRLINK HOHALTACK
# TRLINK U4:1 (varies) task identifier correlation value
# HOHALTACK U1:1 (always) hand off halt ack
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TRLINK HOHALTACK}
#vset [split [lindex $TRLINK 0] :] {typeTRLINK lengthTRLINK}
set TRLINK [lindex $TRLINK 1]
if {[lindex $HOHALTACK 0] != "U1:1"} {set ok 0; break}
set HOHALTACK [lindex $HOHALTACK 1]
if {$send_reply} {
# TBD create reply data
$spname put S4F42 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S4F41
S5F1[R] | Alarm Report Send |
Sent by Equipment Only |
# S5F1 Tcl Receive message - add next line to setup
$spname whenever S5F1 [list recv_S5F1 $spname]
# receive procedure
proc recv_S5F1 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 ALCD ALID ALTX
# ALCD B:1 (always) alarm code byte, >= 128 alarm is set, bit field use is deprecated
# ALID U4:1 (varies) Alarm type ID
# ALTX A:120 (always) alarm text, the length limit was recently raised from 40
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {ALCD ALID ALTX}
if {[lindex $ALCD 0] != "B:1"} {set ok 0; break}
set ALCD [expr [lindex $ALCD 1]] ;# expr converts 0xhh to int
#vset [split [lindex $ALID 0] :] {typeALID lengthALID}
set ALID [lindex $ALID 1]
if {[string first "A:" [lindex $ALTX 0]] != 0} {set ok 0; break}
set ALTX [lindex $ALTX 1]
if {$send_reply} {
# TBD create reply data
$spname put S5F2 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S5F1
S5F2 | Alarm Report Ack |
Sent by Host Only |
# S5F2 Tcl Parse reply
set reply [secs_xact $spname S5F1R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC5
# ACKC5 B:1 (always) acknowledge code, 0 ok
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC5 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S5F3[R] | Enable/Disable Alarm Send |
Sent by Host Only |
# S5F3 Tcl Receive message - add next line to setup
$spname whenever S5F3 [list recv_S5F3 $spname]
# receive procedure
proc recv_S5F3 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 ALED ALID
# ALED B:1 (always) enable/disable alarm, 128 means enable, 0 disable
# ALID U4:1 (varies) Alarm type ID
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {ALED ALID}
if {[lindex $ALED 0] != "B:1"} {set ok 0; break}
set ALED [expr [lindex $ALED 1]] ;# expr converts 0xhh to int
#vset [split [lindex $ALID 0] :] {typeALID lengthALID}
set ALID [lindex $ALID 1]
if {$send_reply} {
# TBD create reply data
$spname put S5F4 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S5F3
S5F4 | Enable/Disable Alarm Ack |
Sent by Equipment Only |
# S5F4 Tcl Parse reply
set reply [secs_xact $spname S5F3R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC5
# ACKC5 B:1 (always) acknowledge code, 0 ok
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC5 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S5F5R | List Alarms Request |
Sent by Host Only |
Comment: Host sends zero length item for all, otherwise ALID vector
Format:
# S5F5R Tcl Receive message - add next line to setup
$spname whenever S5F5 [list recv_S5F5R $spname]
# receive procedure
proc recv_S5F5R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect ALIDVECTOR
# ALIDVECTOR (list)U4:n (varies) alarm ID vector
#vset [split [lindex $TSN_data 0] :] {typeALIDVECTOR lengthALIDVECTOR}
set ALIDVECTOR [lreplace $TSN_data 0 0]
if {$send_reply} {
# TBD create reply data
$spname put S5F6 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S5F5R
S5F6 | List Alarm Data |
Sent by Equipment Only |
# S5F6 Tcl Parse reply
set reply [secs_xact $spname S5F5R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:n {L:3 ALCD ALID ALTX}
# ALCD B:1 (always) alarm code byte, >= 128 alarm is set, bit field use is deprecated
# ALID U4:1 (varies) Alarm type ID
# ALTX A:120 (always) alarm text, the length limit was recently raised from 40
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach L3 [lreplace $TSN_data 0 0] {
if { [lindex $L3 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3 0 0] {ALCD ALID ALTX}
if {[lindex $ALCD 0] != "B:1"} {set ok 0; break}
set ALCD [expr [lindex $ALCD 1]] ;# expr converts 0xhh to int
#vset [split [lindex $ALID 0] :] {typeALID lengthALID}
set ALID [lindex $ALID 1]
if {[string first "A:" [lindex $ALTX 0]] != 0} {set ok 0; break}
set ALTX [lindex $ALTX 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S5F7R | List Enabled Alarm Request |
Sent by Host Only |
# S5F7R Tcl Receive message - add next line to setup
$spname whenever S5F7 [list recv_S5F7R $spname]
# receive procedure
proc recv_S5F7R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# no data expected
if {$send_reply} {
# TBD create reply data
$spname put S5F8 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S5F7R
S5F8 | List Enabled Alarm Data |
Sent by Equipment Only |
# S5F8 Tcl Parse reply
set reply [secs_xact $spname S5F7R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:n {L:3 ALCD ALID ALTX}
# ALCD B:1 (always) alarm code byte, >= 128 alarm is set, bit field use is deprecated
# ALID U4:1 (varies) Alarm type ID
# ALTX A:120 (always) alarm text, the length limit was recently raised from 40
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach L3 [lreplace $TSN_data 0 0] {
if { [lindex $L3 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3 0 0] {ALCD ALID ALTX}
if {[lindex $ALCD 0] != "B:1"} {set ok 0; break}
set ALCD [expr [lindex $ALCD 1]] ;# expr converts 0xhh to int
#vset [split [lindex $ALID 0] :] {typeALID lengthALID}
set ALID [lindex $ALID 1]
if {[string first "A:" [lindex $ALTX 0]] != 0} {set ok 0; break}
set ALTX [lindex $ALTX 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S5F9[R] | Exception Post Notify |
Sent by Equipment Only |
# S5F9 Tcl Receive message - add next line to setup
$spname whenever S5F9 [list recv_S5F9 $spname]
# receive procedure
proc recv_S5F9 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:5 TIMESTAMP EXID EXTYPE EXMESSAGE {L:n EXRECVRA}
# TIMESTAMP A:32 (always) ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
# EXID A:20 (always) exception identifier
# EXTYPE A:5 (always) exception type, "ALARM" or "ERROR"
# EXMESSAGE A:n (always) exception description
# EXRECVRA A:40 (always) exception recovery action description
if { [lindex $TSN_data 0] != "L:5" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TIMESTAMP EXID EXTYPE EXMESSAGE Ln}
if {[string first "A:" [lindex $TIMESTAMP 0]] != 0} {set ok 0; break}
set TIMESTAMP [lindex $TIMESTAMP 1]
if {[string first "A:" [lindex $EXID 0]] != 0} {set ok 0; break}
set EXID [lindex $EXID 1]
if {[string first "A:" [lindex $EXTYPE 0]] != 0} {set ok 0; break}
set EXTYPE [lindex $EXTYPE 1]
if {[string first "A:" [lindex $EXMESSAGE 0]] != 0} {set ok 0; break}
set EXMESSAGE [lindex $EXMESSAGE 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach EXRECVRA [lreplace $Ln 0 0] {
if {[string first "A:" [lindex $EXRECVRA 0]] != 0} {set ok 0; break}
set EXRECVRA [lindex $EXRECVRA 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S5F10 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S5F9
S5F10 | Exception Post Confirm |
Sent by Host Only |
# S5F10 Tcl Parse reply
set reply [secs_xact $spname S5F9R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# no data expected
return ;# finished ok
} ;# end while(ok)
S5F11[R] | Exception Clear Notify |
Sent by Equipment Only |
# S5F11 Tcl Receive message - add next line to setup
$spname whenever S5F11 [list recv_S5F11 $spname]
# receive procedure
proc recv_S5F11 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 TIMESTAMP EXID EXTYPE EXMESSAGE
# TIMESTAMP A:32 (always) ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
# EXID A:20 (always) exception identifier
# EXTYPE A:5 (always) exception type, "ALARM" or "ERROR"
# EXMESSAGE A:n (always) exception description
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TIMESTAMP EXID EXTYPE EXMESSAGE}
if {[string first "A:" [lindex $TIMESTAMP 0]] != 0} {set ok 0; break}
set TIMESTAMP [lindex $TIMESTAMP 1]
if {[string first "A:" [lindex $EXID 0]] != 0} {set ok 0; break}
set EXID [lindex $EXID 1]
if {[string first "A:" [lindex $EXTYPE 0]] != 0} {set ok 0; break}
set EXTYPE [lindex $EXTYPE 1]
if {[string first "A:" [lindex $EXMESSAGE 0]] != 0} {set ok 0; break}
set EXMESSAGE [lindex $EXMESSAGE 1]
if {$send_reply} {
# TBD create reply data
$spname put S5F12 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S5F11
S5F12 | Exception Clear Confirm |
Sent by Host Only |
# S5F12 Tcl Parse reply
set reply [secs_xact $spname S5F11R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# no data expected
return ;# finished ok
} ;# end while(ok)
S5F13R | Exception Recover Request |
Sent by Host Only |
# S5F13R Tcl Receive message - add next line to setup
$spname whenever S5F13 [list recv_S5F13R $spname]
# receive procedure
proc recv_S5F13R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 EXID EXRECVRA
# EXID A:20 (always) exception identifier
# EXRECVRA A:40 (always) exception recovery action description
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {EXID EXRECVRA}
if {[string first "A:" [lindex $EXID 0]] != 0} {set ok 0; break}
set EXID [lindex $EXID 1]
if {[string first "A:" [lindex $EXRECVRA 0]] != 0} {set ok 0; break}
set EXRECVRA [lindex $EXRECVRA 1]
if {$send_reply} {
# TBD create reply data
$spname put S5F14 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S5F13R
S5F14 | Exception Recover Acknowledge |
Sent by Equipment Only |
Comment: L:2* can be L:2 or L:0
Format:
# S5F14 Tcl Parse reply
set reply [secs_xact $spname S5F13R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 EXID {L:2 ACKA {L:2* ERRCODE ERRTEXT}}
# EXID A:20 (always) exception identifier
# ACKA TF:1 (always) request success
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {EXID L2}
if {[string first "A:" [lindex $EXID 0]] != 0} {set ok 0; break}
set EXID [lindex $EXID 1]
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {ACKA L2opt_1}
if {[lindex $ACKA 0] != "TF:1"} {set ok 0; break}
set ACKA [lindex $ACKA 1]
if { [lindex $L2opt_1 0] == "L:2" } { ;# 2 optional items found
vset [lreplace $L2opt_1 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
return ;# finished ok
} ;# end while(ok)
S5F15[R] | Exception Recovery Complete Notify |
Sent by Equipment Only |
Comment: L:2* can be L:2 or L:0; see E41
Format:
# S5F15 Tcl Receive message - add next line to setup
$spname whenever S5F15 [list recv_S5F15 $spname]
# receive procedure
proc recv_S5F15 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 TIMESTAMP EXID {L:2 ACKA {L:2* ERRCODE ERRTEXT}}
# TIMESTAMP A:32 (always) ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
# EXID A:20 (always) exception identifier
# ACKA TF:1 (always) request success
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TIMESTAMP EXID L2}
if {[string first "A:" [lindex $TIMESTAMP 0]] != 0} {set ok 0; break}
set TIMESTAMP [lindex $TIMESTAMP 1]
if {[string first "A:" [lindex $EXID 0]] != 0} {set ok 0; break}
set EXID [lindex $EXID 1]
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {ACKA L2opt_1}
if {[lindex $ACKA 0] != "TF:1"} {set ok 0; break}
set ACKA [lindex $ACKA 1]
if { [lindex $L2opt_1 0] == "L:2" } { ;# 2 optional items found
vset [lreplace $L2opt_1 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {$send_reply} {
# TBD create reply data
$spname put S5F16 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S5F15
S5F16 | Exception Recovery Complete Confirm |
Sent by Host Only |
# S5F16 Tcl Parse reply
set reply [secs_xact $spname S5F15R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# no data expected
return ;# finished ok
} ;# end while(ok)
S5F17R | Exception Recovery Abort Request |
Sent by Host Only |
# S5F17R Tcl Receive message - add next line to setup
$spname whenever S5F17 [list recv_S5F17R $spname]
# receive procedure
proc recv_S5F17R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect EXID
# EXID A:20 (always) exception identifier
if {[string first "A:" [lindex $TSN_data 0]] != 0} {set ok 0; break}
set EXID [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S5F18 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S5F17R
S5F18 | Exception Recovery Abort Ack |
Sent by Equipment Only |
Comment: L:2* can be L:2 or L:0
Format:
# S5F18 Tcl Parse reply
set reply [secs_xact $spname S5F17R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 EXID {L:2 ACKA {L:2* ERRCODE ERRTEXT}}
# EXID A:20 (always) exception identifier
# ACKA TF:1 (always) request success
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {EXID L2}
if {[string first "A:" [lindex $EXID 0]] != 0} {set ok 0; break}
set EXID [lindex $EXID 1]
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {ACKA L2opt_1}
if {[lindex $ACKA 0] != "TF:1"} {set ok 0; break}
set ACKA [lindex $ACKA 1]
if { [lindex $L2opt_1 0] == "L:2" } { ;# 2 optional items found
vset [lreplace $L2opt_1 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
return ;# finished ok
} ;# end while(ok)
S6F1[R] | Trace Data Send |
Sent by Equipment Only |
# S6F1 Tcl Receive message - add next line to setup
$spname whenever S6F1 [list recv_S6F1 $spname]
# receive procedure
proc recv_S6F1 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 TRID SMPLN STIME {L:n SV}
# TRID A:n (varies) trace request ID
# SMPLN U4:1 (varies) sample number
# STIME A:32 (always) ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
# SV A:n (varies) status variable value
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TRID SMPLN STIME Ln}
#vset [split [lindex $TRID 0] :] {typeTRID lengthTRID}
set TRID [lindex $TRID 1]
#vset [split [lindex $SMPLN 0] :] {typeSMPLN lengthSMPLN}
set SMPLN [lindex $SMPLN 1]
if {[string first "A:" [lindex $STIME 0]] != 0} {set ok 0; break}
set STIME [lindex $STIME 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach SV [lreplace $Ln 0 0] {
#vset [split [lindex $SV 0] :] {typeSV lengthSV}
set SV [lindex $SV 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S6F2 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S6F1
S6F2 | Trace Data Ack |
Sent by Host Only |
# S6F2 Tcl Parse reply
set reply [secs_xact $spname S6F1R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC6
# ACKC6 B:1 (always) acknowledge code, 0 ok
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC6 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S6F3[R] | Discrete Variable Data Send |
Sent by Equipment Only |
Comment: Discrete implies event-based such as analysis completion. Use S2F15 to choose supported events.
Format:
# S6F3 Tcl Receive message - add next line to setup
$spname whenever S6F3 [list recv_S6F3 $spname]
# receive procedure
proc recv_S6F3 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 DATAID CEID {L:n {L:2 DSID {L:m {L:2 DVNAME DVVAL}}}}
# DATAID U4:1 (varies) an identifier to correlate related messages
# CEID U4:1 (varies) collection event identifier, GEM requires type Un
# DSID A:n (varies) data set ID, akin to a report type
# DVNAME U4:1 (varies) data value name, generically a VID, therefore GEM requires Un type
# DVVAL A:n (varies) data value, any format including list
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID CEID Ln}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $CEID 0] :] {typeCEID lengthCEID}
set CEID [lindex $CEID 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {DSID Lm_2}
#vset [split [lindex $DSID 0] :] {typeDSID lengthDSID}
set DSID [lindex $DSID 1]
if {[string first L: [lindex $Lm_2 0]] != 0} {set ok 0; break}
foreach L2_3 [lreplace $Lm_2 0 0] {
if { [lindex $L2_3 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_3 0 0] {DVNAME DVVAL}
#vset [split [lindex $DVNAME 0] :] {typeDVNAME lengthDVNAME}
set DVNAME [lindex $DVNAME 1]
#vset [split [lindex $DVVAL 0] :] {typeDVVAL lengthDVVAL}
set DVVAL [lindex $DVVAL 1]
}
if {!$ok} break
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S6F4 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S6F3
S6F4 | Discrete Variable Data Send Ack |
Sent by Host Only |
# S6F4 Tcl Parse reply
set reply [secs_xact $spname S6F3R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC6
# ACKC6 B:1 (always) acknowledge code, 0 ok
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC6 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S6F5R | Multi-block Data Send Inquire |
Sent by Equipment Only |
Comment: for SECS-I and S6F3 F9 F11 and F13, not required for HSMS
Format:
# S6F5R Tcl Receive message - add next line to setup
$spname whenever S6F5 [list recv_S6F5R $spname]
# receive procedure
proc recv_S6F5R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 DATAID DATALENGTH
# DATAID U4:1 (varies) an identifier to correlate related messages
# DATALENGTH U4:1 (varies) total bytes of the message body
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID DATALENGTH}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $DATALENGTH 0] :] {typeDATALENGTH lengthDATALENGTH}
set DATALENGTH [lindex $DATALENGTH 1]
if {$send_reply} {
# TBD create reply data
$spname put S6F6 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S6F5R
S6F6 | Multi-block Grant |
Sent by Host Only |
# S6F6 Tcl Parse reply
set reply [secs_xact $spname S6F5R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect GRANT6
# GRANT6 B:1 (always) multblock permission grant
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set GRANT6 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S6F7R | Data Transfer Request |
Sent by Host Only |
# S6F7R Tcl Receive message - add next line to setup
$spname whenever S6F7 [list recv_S6F7R $spname]
# receive procedure
proc recv_S6F7R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect DATAID
# DATAID U4:1 (varies) an identifier to correlate related messages
#vset [split [lindex $TSN_data 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S6F8 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S6F7R
S6F8 | Data Transfer Data |
Sent by Equipment Only |
# S6F8 Tcl Parse reply
set reply [secs_xact $spname S6F7R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:3 DATAID CEID {L:n DSID {L:m {L:2 DVNAME DVVAL}}}
# DATAID U4:1 (varies) an identifier to correlate related messages
# CEID U4:1 (varies) collection event identifier, GEM requires type Un
# DSID A:n (varies) data set ID, akin to a report type
# DVNAME U4:1 (varies) data value name, generically a VID, therefore GEM requires Un type
# DVVAL A:n (varies) data value, any format including list
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID CEID Ln}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $CEID 0] :] {typeCEID lengthCEID}
set CEID [lindex $CEID 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach {DSID Lm_1} [lreplace $Ln 0 0] {
#vset [split [lindex $DSID 0] :] {typeDSID lengthDSID}
set DSID [lindex $DSID 1]
if {[string first L: [lindex $Lm_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lm_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {DVNAME DVVAL}
#vset [split [lindex $DVNAME 0] :] {typeDVNAME lengthDVNAME}
set DVNAME [lindex $DVNAME 1]
#vset [split [lindex $DVVAL 0] :] {typeDVVAL lengthDVVAL}
set DVVAL [lindex $DVVAL 1]
}
if {!$ok} break
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S6F9[R] | Formatted Variable Send |
Sent by Equipment Only |
Comment: like S6F3 without names
Format:
# S6F9 Tcl Receive message - add next line to setup
$spname whenever S6F9 [list recv_S6F9 $spname]
# receive procedure
proc recv_S6F9 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 PFCD DATAID CEID {L:n {L:2 DSID {L:m DVVAL}}}
# PFCD B:1 (always) predefined form selector
# DATAID U4:1 (varies) an identifier to correlate related messages
# CEID U4:1 (varies) collection event identifier, GEM requires type Un
# DSID A:n (varies) data set ID, akin to a report type
# DVVAL A:n (varies) data value, any format including list
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PFCD DATAID CEID Ln}
if {[lindex $PFCD 0] != "B:1"} {set ok 0; break}
set PFCD [expr [lindex $PFCD 1]] ;# expr converts 0xhh to int
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $CEID 0] :] {typeCEID lengthCEID}
set CEID [lindex $CEID 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {DSID Lm_2}
#vset [split [lindex $DSID 0] :] {typeDSID lengthDSID}
set DSID [lindex $DSID 1]
if {[string first L: [lindex $Lm_2 0]] != 0} {set ok 0; break}
foreach DVVAL [lreplace $Lm_2 0 0] {
#vset [split [lindex $DVVAL 0] :] {typeDVVAL lengthDVVAL}
set DVVAL [lindex $DVVAL 1]
}
if {!$ok} break
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S6F10 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S6F9
S6F10 | Formatted Variable Ack |
Sent by Host Only |
# S6F10 Tcl Parse reply
set reply [secs_xact $spname S6F9R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC6
# ACKC6 B:1 (always) acknowledge code, 0 ok
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC6 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S6F11R | Event Report Send |
Sent by Equipment Only |
# S6F11R Tcl Receive message - add next line to setup
$spname whenever S6F11 [list recv_S6F11R $spname]
# receive procedure
proc recv_S6F11R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 DATAID CEID {L:a {L:2 RPTID {L:b V}}}
# DATAID U4:1 (varies) an identifier to correlate related messages
# CEID U4:1 (varies) collection event identifier, GEM requires type Un
# RPTID U4:1 (varies) report ID
# V A:n (varies) variable value, any type including list
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID CEID La}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $CEID 0] :] {typeCEID lengthCEID}
set CEID [lindex $CEID 1]
if {[string first L: [lindex $La 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $La 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {RPTID Lb_2}
#vset [split [lindex $RPTID 0] :] {typeRPTID lengthRPTID}
set RPTID [lindex $RPTID 1]
if {[string first L: [lindex $Lb_2 0]] != 0} {set ok 0; break}
foreach V [lreplace $Lb_2 0 0] {
#vset [split [lindex $V 0] :] {typeV lengthV}
set V [lindex $V 1]
}
if {!$ok} break
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S6F12 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S6F11R
S6F12 | Event Report Ack |
Sent by Host Only |
# S6F12 Tcl Parse reply
set reply [secs_xact $spname S6F11R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC6
# ACKC6 B:1 (always) acknowledge code, 0 ok
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC6 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S6F13R | Annotated Event Report Send |
Sent by Equipment Only |
# S6F13R Tcl Receive message - add next line to setup
$spname whenever S6F13 [list recv_S6F13R $spname]
# receive procedure
proc recv_S6F13R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 DATAID CEID {L:a {L:2 RPTID {L:b {L:2 VID V}}}}
# DATAID U4:1 (varies) an identifier to correlate related messages
# CEID U4:1 (varies) collection event identifier, GEM requires type Un
# RPTID U4:1 (varies) report ID
# VID A:n (varies) A variable ID
# V A:n (varies) variable value, any type including list
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID CEID La}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $CEID 0] :] {typeCEID lengthCEID}
set CEID [lindex $CEID 1]
if {[string first L: [lindex $La 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $La 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {RPTID Lb_2}
#vset [split [lindex $RPTID 0] :] {typeRPTID lengthRPTID}
set RPTID [lindex $RPTID 1]
if {[string first L: [lindex $Lb_2 0]] != 0} {set ok 0; break}
foreach L2_3 [lreplace $Lb_2 0 0] {
if { [lindex $L2_3 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_3 0 0] {VID V}
#vset [split [lindex $VID 0] :] {typeVID lengthVID}
set VID [lindex $VID 1]
#vset [split [lindex $V 0] :] {typeV lengthV}
set V [lindex $V 1]
}
if {!$ok} break
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S6F14 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S6F13R
S6F14 | Annotated Event Report Ack |
Sent by Host Only |
# S6F14 Tcl Parse reply
set reply [secs_xact $spname S6F13R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC6
# ACKC6 B:1 (always) acknowledge code, 0 ok
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC6 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S6F15R | Event Report Request |
Sent by Host Only |
# S6F15R Tcl Receive message - add next line to setup
$spname whenever S6F15 [list recv_S6F15R $spname]
# receive procedure
proc recv_S6F15R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect CEID
# CEID U4:1 (varies) collection event identifier, GEM requires type Un
#vset [split [lindex $TSN_data 0] :] {typeCEID lengthCEID}
set CEID [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S6F16 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S6F15R
S6F16 | Event Report Data |
Sent by Equipment Only |
# S6F16 Tcl Parse reply
set reply [secs_xact $spname S6F15R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:3 DATAID CEID {L:a {L:2 RPTID {L:b V}}}
# DATAID U4:1 (varies) an identifier to correlate related messages
# CEID U4:1 (varies) collection event identifier, GEM requires type Un
# RPTID U4:1 (varies) report ID
# V A:n (varies) variable value, any type including list
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID CEID La}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $CEID 0] :] {typeCEID lengthCEID}
set CEID [lindex $CEID 1]
if {[string first L: [lindex $La 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $La 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {RPTID Lb_2}
#vset [split [lindex $RPTID 0] :] {typeRPTID lengthRPTID}
set RPTID [lindex $RPTID 1]
if {[string first L: [lindex $Lb_2 0]] != 0} {set ok 0; break}
foreach V [lreplace $Lb_2 0 0] {
#vset [split [lindex $V 0] :] {typeV lengthV}
set V [lindex $V 1]
}
if {!$ok} break
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S6F17R | Annotated Event Report Request |
Sent by Host Only |
# S6F17R Tcl Receive message - add next line to setup
$spname whenever S6F17 [list recv_S6F17R $spname]
# receive procedure
proc recv_S6F17R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect CEID
# CEID U4:1 (varies) collection event identifier, GEM requires type Un
#vset [split [lindex $TSN_data 0] :] {typeCEID lengthCEID}
set CEID [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S6F18 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S6F17R
S6F18 | Annotated Event Report Data |
Sent by Equipment Only |
# S6F18 Tcl Parse reply
set reply [secs_xact $spname S6F17R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:3 DATAID CEID {L:a {L:2 RPTID {L:b {L:2 VID V}}}}
# DATAID U4:1 (varies) an identifier to correlate related messages
# CEID U4:1 (varies) collection event identifier, GEM requires type Un
# RPTID U4:1 (varies) report ID
# VID A:n (varies) A variable ID
# V A:n (varies) variable value, any type including list
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID CEID La}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $CEID 0] :] {typeCEID lengthCEID}
set CEID [lindex $CEID 1]
if {[string first L: [lindex $La 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $La 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {RPTID Lb_2}
#vset [split [lindex $RPTID 0] :] {typeRPTID lengthRPTID}
set RPTID [lindex $RPTID 1]
if {[string first L: [lindex $Lb_2 0]] != 0} {set ok 0; break}
foreach L2_3 [lreplace $Lb_2 0 0] {
if { [lindex $L2_3 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_3 0 0] {VID V}
#vset [split [lindex $VID 0] :] {typeVID lengthVID}
set VID [lindex $VID 1]
#vset [split [lindex $V 0] :] {typeV lengthV}
set V [lindex $V 1]
}
if {!$ok} break
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S6F19R | Individual Report Request |
Sent by Host Only |
# S6F19R Tcl Receive message - add next line to setup
$spname whenever S6F19 [list recv_S6F19R $spname]
# receive procedure
proc recv_S6F19R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect RPTID
# RPTID U4:1 (varies) report ID
#vset [split [lindex $TSN_data 0] :] {typeRPTID lengthRPTID}
set RPTID [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S6F20 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S6F19R
S6F20 | Individual Report Data |
Sent by Equipment Only |
# S6F20 Tcl Parse reply
set reply [secs_xact $spname S6F19R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:n V
# V A:n (varies) variable value, any type including list
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach V [lreplace $TSN_data 0 0] {
#vset [split [lindex $V 0] :] {typeV lengthV}
set V [lindex $V 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S6F21R | Annotated Individual Report Request |
Sent by Host Only |
# S6F21R Tcl Receive message - add next line to setup
$spname whenever S6F21 [list recv_S6F21R $spname]
# receive procedure
proc recv_S6F21R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect RPTID
# RPTID U4:1 (varies) report ID
#vset [split [lindex $TSN_data 0] :] {typeRPTID lengthRPTID}
set RPTID [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S6F22 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S6F21R
S6F22 | Annotated Individual Report Data |
Sent by Equipment Only |
# S6F22 Tcl Parse reply
set reply [secs_xact $spname S6F21R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:n {L:2 VID V}
# VID A:n (varies) A variable ID
# V A:n (varies) variable value, any type including list
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach L2 [lreplace $TSN_data 0 0] {
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {VID V}
#vset [split [lindex $VID 0] :] {typeVID lengthVID}
set VID [lindex $VID 1]
#vset [split [lindex $V 0] :] {typeV lengthV}
set V [lindex $V 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S6F23R | Request or Purge Spooled Data |
Sent by Host Only |
# S6F23R Tcl Receive message - add next line to setup
$spname whenever S6F23 [list recv_S6F23R $spname]
# receive procedure
proc recv_S6F23R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect RSDC
# RSDC U1:1 (always) spool request code
if {[lindex $TSN_data 0] != "U1:1"} {set ok 0; break}
set RSDC [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S6F24 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S6F23R
S6F24 | Request or Purge Spooled Data Ack |
Sent by Equipment Only |
# S6F24 Tcl Parse reply
set reply [secs_xact $spname S6F23R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect RSDA
# RSDA B:1 (always) spool request reply
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set RSDA [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S6F25[R] | Notification Report Send |
Sent by Host and Equipment |
# S6F25 Tcl Receive message - add next line to setup
$spname whenever S6F25 [list recv_S6F25 $spname]
# receive procedure
proc recv_S6F25 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:7 DATAID OPID LINKID RCPSPEC RMCHGSTAT {L:m {L:2 RCPATTRID RCPATTRDATA}} {L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}}
# DATAID U4:1 (varies) an identifier to correlate related messages
# OPID U4:1 (varies) operation identifier
# LINKID U4:1 (always) correlates the RMOPID value in a request to a completion report
# RCPSPEC A:n (always) recipe specifier
# RMCHGSTAT U4:1 (varies) object change type
# RCPATTRID A:n (always) the name of a recipe attribute, but not used to indicate the recipe identifier
# RCPATTRDATA A:n (varies) the value of a recipe attribute, any type of data including list
# RMACK U1:1 (always) recipe managment completion code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:7" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID OPID LINKID RCPSPEC RMCHGSTAT Lm L2_n1}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $OPID 0] :] {typeOPID lengthOPID}
set OPID [lindex $OPID 1]
if {[lindex $LINKID 0] != "U4:1"} {set ok 0; break}
set LINKID [lindex $LINKID 1]
if {[string first "A:" [lindex $RCPSPEC 0]] != 0} {set ok 0; break}
set RCPSPEC [lindex $RCPSPEC 1]
#vset [split [lindex $RMCHGSTAT 0] :] {typeRMCHGSTAT lengthRMCHGSTAT}
set RMCHGSTAT [lindex $RMCHGSTAT 1]
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lm 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {RCPATTRID RCPATTRDATA}
if {[string first "A:" [lindex $RCPATTRID 0]] != 0} {set ok 0; break}
set RCPATTRID [lindex $RCPATTRID 1]
#vset [split [lindex $RCPATTRDATA 0] :] {typeRCPATTRDATA lengthRCPATTRDATA}
set RCPATTRDATA [lindex $RCPATTRDATA 1]
}
if {!$ok} break
if { [lindex $L2_n1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_n1 0 0] {RMACK Lp_1}
if {[lindex $RMACK 0] != "U1:1"} {set ok 0; break}
set RMACK [lindex $RMACK 1]
if {[string first L: [lindex $Lp_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lp_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S6F26 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S6F25
S6F26 | Notification Report Send Ack |
Sent by Host and Equipment |
# S6F26 Tcl Parse reply
set reply [secs_xact $spname S6F25R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC6
# ACKC6 B:1 (always) acknowledge code, 0 ok
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC6 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S6F27[R] | Trace Report Send |
Sent by Equipment Only |
# S6F27 Tcl Receive message - add next line to setup
$spname whenever S6F27 [list recv_S6F27 $spname]
# receive procedure
proc recv_S6F27 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 DATAID TRID {L:n {L:p {L:2 RPTID {L:m V}}}}
# DATAID U4:1 (varies) an identifier to correlate related messages
# TRID A:n (varies) trace request ID
# RPTID U4:1 (varies) report ID
# V A:n (varies) variable value, any type including list
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID TRID Ln}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $TRID 0] :] {typeTRID lengthTRID}
set TRID [lindex $TRID 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach Lp_1 [lreplace $Ln 0 0] {
if {[string first L: [lindex $Lp_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lp_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {RPTID Lm_3}
#vset [split [lindex $RPTID 0] :] {typeRPTID lengthRPTID}
set RPTID [lindex $RPTID 1]
if {[string first L: [lindex $Lm_3 0]] != 0} {set ok 0; break}
foreach V [lreplace $Lm_3 0 0] {
#vset [split [lindex $V 0] :] {typeV lengthV}
set V [lindex $V 1]
}
if {!$ok} break
}
if {!$ok} break
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S6F28 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S6F27
S6F28 | Trace Report Send Ack |
Sent by Host Only |
# S6F28 Tcl Parse reply
set reply [secs_xact $spname S6F27R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect TRID
# TRID A:n (varies) trace request ID
#vset [split [lindex $TSN_data 0] :] {typeTRID lengthTRID}
set TRID [lindex $TSN_data 1]
return ;# finished ok
} ;# end while(ok)
S6F29R | Trace Report Request |
Sent by Host Only |
# S6F29R Tcl Receive message - add next line to setup
$spname whenever S6F29 [list recv_S6F29R $spname]
# receive procedure
proc recv_S6F29R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect TRID
# TRID A:n (varies) trace request ID
#vset [split [lindex $TSN_data 0] :] {typeTRID lengthTRID}
set TRID [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S6F30 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S6F29R
S6F30 | Trace Report Data |
Sent by Equipment Only |
Comment: ERRCODE is set to zero length when there is no error.
Format:
# S6F30 Tcl Parse reply
set reply [secs_xact $spname S6F29R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:3 TRID {L:n {L:2 RPTID {L:m V}}} ERRCODE
# TRID A:n (varies) trace request ID
# RPTID U4:1 (varies) report ID
# V A:n (varies) variable value, any type including list
# ERRCODE U4:1 (varies) error code
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TRID Ln ERRCODE}
#vset [split [lindex $TRID 0] :] {typeTRID lengthTRID}
set TRID [lindex $TRID 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {RPTID Lm_2}
#vset [split [lindex $RPTID 0] :] {typeRPTID lengthRPTID}
set RPTID [lindex $RPTID 1]
if {[string first L: [lindex $Lm_2 0]] != 0} {set ok 0; break}
foreach V [lreplace $Lm_2 0 0] {
#vset [split [lindex $V 0] :] {typeV lengthV}
set V [lindex $V 1]
}
if {!$ok} break
}
if {!$ok} break
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
return ;# finished ok
} ;# end while(ok)
S7F1R | Process Program Load Inquire |
Sent by Host and Equipment |
# S7F1R Tcl Receive message - add next line to setup
$spname whenever S7F1 [list recv_S7F1R $spname]
# receive procedure
proc recv_S7F1R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 PPID LENGTH
# PPID A:80 (varies) process program ID
# LENGTH U4:1 (always) program length in bytes
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PPID LENGTH}
#vset [split [lindex $PPID 0] :] {typePPID lengthPPID}
set PPID [lindex $PPID 1]
if {[lindex $LENGTH 0] != "U4:1"} {set ok 0; break}
set LENGTH [lindex $LENGTH 1]
if {$send_reply} {
# TBD create reply data
$spname put S7F2 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S7F1R
S7F2 | Process Program Load Grant |
Sent by Host and Equipment |
# S7F2 Tcl Parse reply
set reply [secs_xact $spname S7F1R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect PPGNT
# PPGNT B:1 (always) process program transfer grant status
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set PPGNT [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S7F3R | Process Program Send |
Sent by Host and Equipment |
# S7F3R Tcl Receive message - add next line to setup
$spname whenever S7F3 [list recv_S7F3R $spname]
# receive procedure
proc recv_S7F3R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 PPID PPBODY
# PPID A:80 (varies) process program ID
# PPBODY (list)B:n (varies) process program data, any non-list type
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PPID PPBODY}
#vset [split [lindex $PPID 0] :] {typePPID lengthPPID}
set PPID [lindex $PPID 1]
#vset [split [lindex $PPBODY 0] :] {typePPBODY lengthPPBODY}
# convert list of type B 0xhh to int using expr
set PPBODY {}; foreach v [lreplace $PPBODY 0 0] {lappend PPBODY [expr {$v}]}
if {$send_reply} {
# TBD create reply data
$spname put S7F4 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S7F3R
S7F4 | Process Program Send Acknowledge |
Sent by Host and Equipment |
# S7F4 Tcl Parse reply
set reply [secs_xact $spname S7F3R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC7
# ACKC7 B:1 (always) S7 acknowledge code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC7 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S7F5R | Process Program Request |
Sent by Host and Equipment |
# S7F5R Tcl Receive message - add next line to setup
$spname whenever S7F5 [list recv_S7F5R $spname]
# receive procedure
proc recv_S7F5R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect PPID
# PPID A:80 (varies) process program ID
#vset [split [lindex $TSN_data 0] :] {typePPID lengthPPID}
set PPID [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S7F6 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S7F5R
S7F6 | Process Program Data |
Sent by Host and Equipment |
# S7F6 Tcl Parse reply
set reply [secs_xact $spname S7F5R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 PPID PPBODY
# PPID A:80 (varies) process program ID
# PPBODY (list)B:n (varies) process program data, any non-list type
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PPID PPBODY}
#vset [split [lindex $PPID 0] :] {typePPID lengthPPID}
set PPID [lindex $PPID 1]
#vset [split [lindex $PPBODY 0] :] {typePPBODY lengthPPBODY}
# convert list of type B 0xhh to int using expr
set PPBODY {}; foreach v [lreplace $PPBODY 0 0] {lappend PPBODY [expr {$v}]}
return ;# finished ok
} ;# end while(ok)
S7F7R | Process Program ID Request |
Sent by Equipment Only |
# S7F7R Tcl Receive message - add next line to setup
$spname whenever S7F7 [list recv_S7F7R $spname]
# receive procedure
proc recv_S7F7R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect MID
# MID A:16 (varies) material ID, E40 restricts to A:n
#vset [split [lindex $TSN_data 0] :] {typeMID lengthMID}
set MID [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S7F8 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S7F7R
S7F8 | Process Program ID Data |
Sent by Host Only |
# S7F8 Tcl Parse reply
set reply [secs_xact $spname S7F7R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 PPID MID
# PPID A:80 (varies) process program ID
# MID A:16 (varies) material ID, E40 restricts to A:n
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PPID MID}
#vset [split [lindex $PPID 0] :] {typePPID lengthPPID}
set PPID [lindex $PPID 1]
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
return ;# finished ok
} ;# end while(ok)
S7F9R | Matl/Process Matrix Request |
Sent by Host and Equipment |
# S7F9R Tcl Receive message - add next line to setup
$spname whenever S7F9 [list recv_S7F9R $spname]
# receive procedure
proc recv_S7F9R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# no data expected
if {$send_reply} {
# TBD create reply data
$spname put S7F10 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S7F9R
S7F10 | Matl/Process Matrix Data |
Sent by Host and Equipment |
# S7F10 Tcl Parse reply
set reply [secs_xact $spname S7F9R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:n {L:2 PPID {L:a MID}}
# PPID A:80 (varies) process program ID
# MID A:16 (varies) material ID, E40 restricts to A:n
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach L2 [lreplace $TSN_data 0 0] {
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {PPID La_1}
#vset [split [lindex $PPID 0] :] {typePPID lengthPPID}
set PPID [lindex $PPID 1]
if {[string first L: [lindex $La_1 0]] != 0} {set ok 0; break}
foreach MID [lreplace $La_1 0 0] {
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
}
if {!$ok} break
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S7F11[R] | Matl/Process Matrix Update Send |
Sent by Host Only |
# S7F11 Tcl Receive message - add next line to setup
$spname whenever S7F11 [list recv_S7F11 $spname]
# receive procedure
proc recv_S7F11 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:n {L:2 PPID {L:a MID}}
# PPID A:80 (varies) process program ID
# MID A:16 (varies) material ID, E40 restricts to A:n
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach L2 [lreplace $TSN_data 0 0] {
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {PPID La_1}
#vset [split [lindex $PPID 0] :] {typePPID lengthPPID}
set PPID [lindex $PPID 1]
if {[string first L: [lindex $La_1 0]] != 0} {set ok 0; break}
foreach MID [lreplace $La_1 0 0] {
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
}
if {!$ok} break
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S7F12 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S7F11
S7F12 | Matl/Process Matrix Update Ack |
Sent by Equipment Only |
# S7F12 Tcl Parse reply
set reply [secs_xact $spname S7F11R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC7
# ACKC7 B:1 (always) S7 acknowledge code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC7 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S7F13[R] | Matl/Process Matrix Delete Entry Send |
Sent by Host Only |
# S7F13 Tcl Receive message - add next line to setup
$spname whenever S7F13 [list recv_S7F13 $spname]
# receive procedure
proc recv_S7F13 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:n {L:2 PPID {L:a MID}}
# PPID A:80 (varies) process program ID
# MID A:16 (varies) material ID, E40 restricts to A:n
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach L2 [lreplace $TSN_data 0 0] {
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {PPID La_1}
#vset [split [lindex $PPID 0] :] {typePPID lengthPPID}
set PPID [lindex $PPID 1]
if {[string first L: [lindex $La_1 0]] != 0} {set ok 0; break}
foreach MID [lreplace $La_1 0 0] {
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
}
if {!$ok} break
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S7F14 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S7F13
S7F14 | Delete Matl/Process Matrix Entry Acknowledge |
Sent by Equipment Only |
# S7F14 Tcl Parse reply
set reply [secs_xact $spname S7F13R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC7
# ACKC7 B:1 (always) S7 acknowledge code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC7 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S7F15R | Matrix Mode Select Send |
Sent by Host Only |
# S7F15R Tcl Receive message - add next line to setup
$spname whenever S7F15 [list recv_S7F15R $spname]
# receive procedure
proc recv_S7F15R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect MMODE
# MMODE B:1 (always) matrix mode selection
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set MMODE [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
if {$send_reply} {
# TBD create reply data
$spname put S7F16 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S7F15R
S7F16 | Matrix Mode Select Ack |
Sent by Equipment Only |
# S7F16 Tcl Parse reply
set reply [secs_xact $spname S7F15R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC7
# ACKC7 B:1 (always) S7 acknowledge code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC7 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S7F17R | Delete Process Program Send |
Sent by Host Only |
Comment: Host can send L:0 to delete all.
Format:
# S7F17R Tcl Receive message - add next line to setup
$spname whenever S7F17 [list recv_S7F17R $spname]
# receive procedure
proc recv_S7F17R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:n PPID
# PPID A:80 (varies) process program ID
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach PPID [lreplace $TSN_data 0 0] {
#vset [split [lindex $PPID 0] :] {typePPID lengthPPID}
set PPID [lindex $PPID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S7F18 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S7F17R
S7F18 | Delete Process Program Acknowledge |
Sent by Equipment Only |
# S7F18 Tcl Parse reply
set reply [secs_xact $spname S7F17R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC7
# ACKC7 B:1 (always) S7 acknowledge code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC7 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S7F19R | Current Process Program Dir Request |
Sent by Host Only |
# S7F19R Tcl Receive message - add next line to setup
$spname whenever S7F19 [list recv_S7F19R $spname]
# receive procedure
proc recv_S7F19R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# no data expected
if {$send_reply} {
# TBD create reply data
$spname put S7F20 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S7F19R
S7F20 | Current Process Program Data |
Sent by Equipment Only |
# S7F20 Tcl Parse reply
set reply [secs_xact $spname S7F19R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:n PPID
# PPID A:80 (varies) process program ID
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach PPID [lreplace $TSN_data 0 0] {
#vset [split [lindex $PPID 0] :] {typePPID lengthPPID}
set PPID [lindex $PPID 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S7F21 | Process Capabilities Request |
Sent by Host Only |
# S7F21 Tcl Receive message - add next line to setup
$spname whenever S7F21 [list recv_S7F21 $spname]
# receive procedure
proc recv_S7F21 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# no data expected
if {$send_reply} {
# TBD create reply data
$spname put S7F22 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S7F21
S7F22 | Process Capabilities Data |
Sent by Equipment Only |
Comment: L:x can be L:9, L:5, or L:4 with different data items
Format:
# S7F22 Tcl Parse reply
set reply [secs_xact $spname S7F21R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:5 MDLN SOFTREV CMDMAX BYTMAX {L:c {L:11 CCODE CNAME RQCMD BLKDEF BCDS IBCDS NBCDS ACDS IACDS NACDS {L:p L:x}}}
# MDLN A:20 (always) equipment model type
# SOFTREV A:20 (always) software revision
# CMDMAX U1:1 (varies) maximum number of commands allowed, 0=unlimited
# BYTMAX U4:1 (varies) process program maximum byte length, 0 means no limit
# CCODE A:n (varies) process operation command code
# CNAME A:16 (always) text name for a CCODE
# RQCMD TF:1 (always) flag that command is required
# BLKDEF I1:1 (always) command definition block relationship, standard incorrectly says type U1 is possible
# BCDS (list)U2:n (varies) before command code vector
# IBCDS (list)U2:n (varies) vector of immediately before command codes
# NBCDS (list)U2:n (varies) vector of not before command codes
# ACDS U2:1 (varies) after command codes
# IACDS (list)U2:n (varies) vector of immediately after command codes
# NACDS (list)U2:n (varies) vector of not after command codes
if { [lindex $TSN_data 0] != "L:5" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {MDLN SOFTREV CMDMAX BYTMAX Lc}
if {[string first "A:" [lindex $MDLN 0]] != 0} {set ok 0; break}
set MDLN [lindex $MDLN 1]
if {[string first "A:" [lindex $SOFTREV 0]] != 0} {set ok 0; break}
set SOFTREV [lindex $SOFTREV 1]
#vset [split [lindex $CMDMAX 0] :] {typeCMDMAX lengthCMDMAX}
set CMDMAX [lindex $CMDMAX 1]
#vset [split [lindex $BYTMAX 0] :] {typeBYTMAX lengthBYTMAX}
set BYTMAX [lindex $BYTMAX 1]
if {[string first L: [lindex $Lc 0]] != 0} {set ok 0; break}
foreach L11_1 [lreplace $Lc 0 0] {
if { [lindex $L11_1 0] != "L:11" } {set ok 0; break}
vset [lreplace $L11_1 0 0] {CCODE CNAME RQCMD BLKDEF BCDS IBCDS NBCDS ACDS IACDS NACDS Lp_2}
#vset [split [lindex $CCODE 0] :] {typeCCODE lengthCCODE}
set CCODE [lindex $CCODE 1]
if {[string first "A:" [lindex $CNAME 0]] != 0} {set ok 0; break}
set CNAME [lindex $CNAME 1]
if {[lindex $RQCMD 0] != "TF:1"} {set ok 0; break}
set RQCMD [lindex $RQCMD 1]
if {[lindex $BLKDEF 0] != "I1:1"} {set ok 0; break}
set BLKDEF [lindex $BLKDEF 1]
#vset [split [lindex $BCDS 0] :] {typeBCDS lengthBCDS}
set BCDS [lreplace $BCDS 0 0]
#vset [split [lindex $IBCDS 0] :] {typeIBCDS lengthIBCDS}
set IBCDS [lreplace $IBCDS 0 0]
#vset [split [lindex $NBCDS 0] :] {typeNBCDS lengthNBCDS}
set NBCDS [lreplace $NBCDS 0 0]
#vset [split [lindex $ACDS 0] :] {typeACDS lengthACDS}
set ACDS [lindex $ACDS 1]
#vset [split [lindex $IACDS 0] :] {typeIACDS lengthIACDS}
set IACDS [lreplace $IACDS 0 0]
#vset [split [lindex $NACDS 0] :] {typeNACDS lengthNACDS}
set NACDS [lreplace $NACDS 0 0]
if {[string first L: [lindex $Lp_2 0]] != 0} {set ok 0; break}
foreach Lx_3 [lreplace $Lp_2 0 0] {
if {$Lx_3 ne "L:x"} {set ok 0; break}
# single token data such as L:0 or U4:0 has been received as expected
}
if {!$ok} break
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S7F23R | Formatted Process Program Send |
Sent by Host and Equipment |
# S7F23R Tcl Receive message - add next line to setup
$spname whenever S7F23 [list recv_S7F23R $spname]
# receive procedure
proc recv_S7F23R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 PPID MDLN SOFTREV {L:c {L:2 CCODE {L:p PPARM}}}
# PPID A:80 (varies) process program ID
# MDLN A:20 (always) equipment model type
# SOFTREV A:20 (always) software revision
# CCODE A:n (varies) process operation command code
# PPARM A:n (varies) process parameter, any scalar or vector
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PPID MDLN SOFTREV Lc}
#vset [split [lindex $PPID 0] :] {typePPID lengthPPID}
set PPID [lindex $PPID 1]
if {[string first "A:" [lindex $MDLN 0]] != 0} {set ok 0; break}
set MDLN [lindex $MDLN 1]
if {[string first "A:" [lindex $SOFTREV 0]] != 0} {set ok 0; break}
set SOFTREV [lindex $SOFTREV 1]
if {[string first L: [lindex $Lc 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lc 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {CCODE Lp_2}
#vset [split [lindex $CCODE 0] :] {typeCCODE lengthCCODE}
set CCODE [lindex $CCODE 1]
if {[string first L: [lindex $Lp_2 0]] != 0} {set ok 0; break}
foreach PPARM [lreplace $Lp_2 0 0] {
#vset [split [lindex $PPARM 0] :] {typePPARM lengthPPARM}
set PPARM [lindex $PPARM 1]
}
if {!$ok} break
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S7F24 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S7F23R
S7F24 | Formatted Process Program Acknowledge |
Sent by Host and Equipment |
# S7F24 Tcl Parse reply
set reply [secs_xact $spname S7F23R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC7
# ACKC7 B:1 (always) S7 acknowledge code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC7 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S7F25R | Formatted Process Program Request |
Sent by Host and Equipment |
# S7F25R Tcl Receive message - add next line to setup
$spname whenever S7F25 [list recv_S7F25R $spname]
# receive procedure
proc recv_S7F25R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect PPID
# PPID A:80 (varies) process program ID
#vset [split [lindex $TSN_data 0] :] {typePPID lengthPPID}
set PPID [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S7F26 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S7F25R
S7F26 | Formatted Process Program Data |
Sent by Host and Equipment |
# S7F26 Tcl Parse reply
set reply [secs_xact $spname S7F25R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:4 PPID MDLN SOFTREV {L:c {L:2 CCODE {L:p PPARM}}}
# PPID A:80 (varies) process program ID
# MDLN A:20 (always) equipment model type
# SOFTREV A:20 (always) software revision
# CCODE A:n (varies) process operation command code
# PPARM A:n (varies) process parameter, any scalar or vector
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PPID MDLN SOFTREV Lc}
#vset [split [lindex $PPID 0] :] {typePPID lengthPPID}
set PPID [lindex $PPID 1]
if {[string first "A:" [lindex $MDLN 0]] != 0} {set ok 0; break}
set MDLN [lindex $MDLN 1]
if {[string first "A:" [lindex $SOFTREV 0]] != 0} {set ok 0; break}
set SOFTREV [lindex $SOFTREV 1]
if {[string first L: [lindex $Lc 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lc 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {CCODE Lp_2}
#vset [split [lindex $CCODE 0] :] {typeCCODE lengthCCODE}
set CCODE [lindex $CCODE 1]
if {[string first L: [lindex $Lp_2 0]] != 0} {set ok 0; break}
foreach PPARM [lreplace $Lp_2 0 0] {
#vset [split [lindex $PPARM 0] :] {typePPARM lengthPPARM}
set PPARM [lindex $PPARM 1]
}
if {!$ok} break
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S7F27R | Process Program Verification Send |
Sent by Equipment Only |
# S7F27R Tcl Receive message - add next line to setup
$spname whenever S7F27 [list recv_S7F27R $spname]
# receive procedure
proc recv_S7F27R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 PPID {L:n {L:3 ACKC7A SEQNUM ERRW7}}
# PPID A:80 (varies) process program ID
# ACKC7A U4:1 (varies) process program check code
# SEQNUM U4:1 (varies) process program command number
# ERRW7 A:n (varies) process program error description
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PPID Ln}
#vset [split [lindex $PPID 0] :] {typePPID lengthPPID}
set PPID [lindex $PPID 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L3_1 [lreplace $Ln 0 0] {
if { [lindex $L3_1 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3_1 0 0] {ACKC7A SEQNUM ERRW7}
#vset [split [lindex $ACKC7A 0] :] {typeACKC7A lengthACKC7A}
set ACKC7A [lindex $ACKC7A 1]
#vset [split [lindex $SEQNUM 0] :] {typeSEQNUM lengthSEQNUM}
set SEQNUM [lindex $SEQNUM 1]
#vset [split [lindex $ERRW7 0] :] {typeERRW7 lengthERRW7}
set ERRW7 [lindex $ERRW7 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S7F28 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S7F27R
S7F28 | Process Program Verification Acknowledge |
Sent by Host Only |
# S7F28 Tcl Parse reply
set reply [secs_xact $spname S7F27R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# no data expected
return ;# finished ok
} ;# end while(ok)
S7F29R | Process Program Verification Inquire |
Sent by Equipment Only |
Comment: This is a multiblock inquire for S7F27 so the LENGTH is the S7F27 message length an not the PP length.
Format:
# S7F29R Tcl Receive message - add next line to setup
$spname whenever S7F29 [list recv_S7F29R $spname]
# receive procedure
proc recv_S7F29R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect LENGTH
# LENGTH U4:1 (always) program length in bytes
if {[lindex $TSN_data 0] != "U4:1"} {set ok 0; break}
set LENGTH [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S7F30 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S7F29R
S7F30 | Process Program Verification Grant |
Sent by Host Only |
# S7F30 Tcl Parse reply
set reply [secs_xact $spname S7F29R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect PPGNT
# PPGNT B:1 (always) process program transfer grant status
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set PPGNT [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S7F31R | Verification Request Send |
Sent by Host Only |
# S7F31R Tcl Receive message - add next line to setup
$spname whenever S7F31 [list recv_S7F31R $spname]
# receive procedure
proc recv_S7F31R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 PPID MDLN SOFTREV {L:c {L:2 CCODE {L:p PPARM}}}
# PPID A:80 (varies) process program ID
# MDLN A:20 (always) equipment model type
# SOFTREV A:20 (always) software revision
# CCODE A:n (varies) process operation command code
# PPARM A:n (varies) process parameter, any scalar or vector
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PPID MDLN SOFTREV Lc}
#vset [split [lindex $PPID 0] :] {typePPID lengthPPID}
set PPID [lindex $PPID 1]
if {[string first "A:" [lindex $MDLN 0]] != 0} {set ok 0; break}
set MDLN [lindex $MDLN 1]
if {[string first "A:" [lindex $SOFTREV 0]] != 0} {set ok 0; break}
set SOFTREV [lindex $SOFTREV 1]
if {[string first L: [lindex $Lc 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lc 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {CCODE Lp_2}
#vset [split [lindex $CCODE 0] :] {typeCCODE lengthCCODE}
set CCODE [lindex $CCODE 1]
if {[string first L: [lindex $Lp_2 0]] != 0} {set ok 0; break}
foreach PPARM [lreplace $Lp_2 0 0] {
#vset [split [lindex $PPARM 0] :] {typePPARM lengthPPARM}
set PPARM [lindex $PPARM 1]
}
if {!$ok} break
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S7F32 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S7F31R
S7F32 | Verification Request Acknowledge |
Sent by Equipment Only |
# S7F32 Tcl Parse reply
set reply [secs_xact $spname S7F31R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC7
# ACKC7 B:1 (always) S7 acknowledge code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC7 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S7F33R | Process Program Available Request |
Sent by Host and Equipment |
# S7F33R Tcl Receive message - add next line to setup
$spname whenever S7F33 [list recv_S7F33R $spname]
# receive procedure
proc recv_S7F33R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect PPID
# PPID A:80 (varies) process program ID
#vset [split [lindex $TSN_data 0] :] {typePPID lengthPPID}
set PPID [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S7F34 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S7F33R
S7F34 | Process Program Availability Data |
Sent by Host and Equipment |
# S7F34 Tcl Parse reply
set reply [secs_xact $spname S7F33R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:3 PPID UNFLEN FRMLEN
# PPID A:80 (varies) process program ID
# UNFLEN U4:1 (varies) unformatted process program length if available, else 0
# FRMLEN U4:1 (varies) formatted process program length if available, else 0
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PPID UNFLEN FRMLEN}
#vset [split [lindex $PPID 0] :] {typePPID lengthPPID}
set PPID [lindex $PPID 1]
#vset [split [lindex $UNFLEN 0] :] {typeUNFLEN lengthUNFLEN}
set UNFLEN [lindex $UNFLEN 1]
#vset [split [lindex $FRMLEN 0] :] {typeFRMLEN lengthFRMLEN}
set FRMLEN [lindex $FRMLEN 1]
return ;# finished ok
} ;# end while(ok)
S7F35R | Process Program for MID Request |
Sent by Host and Equipment |
# S7F35R Tcl Receive message - add next line to setup
$spname whenever S7F35 [list recv_S7F35R $spname]
# receive procedure
proc recv_S7F35R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect MID
# MID A:16 (varies) material ID, E40 restricts to A:n
#vset [split [lindex $TSN_data 0] :] {typeMID lengthMID}
set MID [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S7F36 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S7F35R
S7F36 | Process Program for MID Data |
Sent by Host and Equipment |
# S7F36 Tcl Parse reply
set reply [secs_xact $spname S7F35R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:3 MID PPID PPBODY
# MID A:16 (varies) material ID, E40 restricts to A:n
# PPID A:80 (varies) process program ID
# PPBODY (list)B:n (varies) process program data, any non-list type
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {MID PPID PPBODY}
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
#vset [split [lindex $PPID 0] :] {typePPID lengthPPID}
set PPID [lindex $PPID 1]
#vset [split [lindex $PPBODY 0] :] {typePPBODY lengthPPBODY}
# convert list of type B 0xhh to int using expr
set PPBODY {}; foreach v [lreplace $PPBODY 0 0] {lappend PPBODY [expr {$v}]}
return ;# finished ok
} ;# end while(ok)
S7F37R | Large PP Send |
Sent by Host and Equipment |
# S7F37R Tcl Receive message - add next line to setup
$spname whenever S7F37 [list recv_S7F37R $spname]
# receive procedure
proc recv_S7F37R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect DSNAME
# DSNAME A:50 (varies) the name of a dataset such as a PPID
#vset [split [lindex $TSN_data 0] :] {typeDSNAME lengthDSNAME}
set DSNAME [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S7F38 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S7F37R
S7F38 | Large PP Send Ack |
Sent by Host and Equipment |
# S7F38 Tcl Parse reply
set reply [secs_xact $spname S7F37R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC7
# ACKC7 B:1 (always) S7 acknowledge code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC7 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S7F39R | Large Formatted PP Send |
Sent by Host and Equipment |
# S7F39R Tcl Receive message - add next line to setup
$spname whenever S7F39 [list recv_S7F39R $spname]
# receive procedure
proc recv_S7F39R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect DSNAME
# DSNAME A:50 (varies) the name of a dataset such as a PPID
#vset [split [lindex $TSN_data 0] :] {typeDSNAME lengthDSNAME}
set DSNAME [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S7F40 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S7F39R
S7F40 | Large Formatted PP Ack |
Sent by Host and Equipment |
# S7F40 Tcl Parse reply
set reply [secs_xact $spname S7F39R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC7
# ACKC7 B:1 (always) S7 acknowledge code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC7 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S7F41R | Large PP Req |
Sent by Host and Equipment |
# S7F41R Tcl Receive message - add next line to setup
$spname whenever S7F41 [list recv_S7F41R $spname]
# receive procedure
proc recv_S7F41R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect DSNAME
# DSNAME A:50 (varies) the name of a dataset such as a PPID
#vset [split [lindex $TSN_data 0] :] {typeDSNAME lengthDSNAME}
set DSNAME [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S7F42 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S7F41R
S7F42 | Large PP Req Ack |
Sent by Host and Equipment |
# S7F42 Tcl Parse reply
set reply [secs_xact $spname S7F41R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC7
# ACKC7 B:1 (always) S7 acknowledge code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC7 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S7F43R | Large Formatted PP Req |
Sent by Host and Equipment |
# S7F43R Tcl Receive message - add next line to setup
$spname whenever S7F43 [list recv_S7F43R $spname]
# receive procedure
proc recv_S7F43R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect DSNAME
# DSNAME A:50 (varies) the name of a dataset such as a PPID
#vset [split [lindex $TSN_data 0] :] {typeDSNAME lengthDSNAME}
set DSNAME [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S7F44 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S7F43R
S7F44 | Large Formatted PP Req Ack |
Sent by Host and Equipment |
# S7F44 Tcl Parse reply
set reply [secs_xact $spname S7F43R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC7
# ACKC7 B:1 (always) S7 acknowledge code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC7 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S8F1R | Boot Program Request |
Sent by Host and Equipment |
# S8F1R Tcl Receive message - add next line to setup
$spname whenever S8F1 [list recv_S8F1R $spname]
# receive procedure
proc recv_S8F1R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# no data expected
if {$send_reply} {
# TBD create reply data
$spname put S8F2 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S8F1R
S8F2 | Boot Program Data |
Sent by Host and Equipment |
# S8F2 Tcl Parse reply
set reply [secs_xact $spname S8F1R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect BPD
# BPD (list)B:n (always) boot program data, the fantasy of using SECS for boot programs has been revived
if {[string first "B:" [lindex $TSN_data 0]] != 0} {set ok 0; break}
# convert list of type B 0xhh to int using expr
set BPD {}; foreach v [lreplace $TSN_data 0 0] {lappend BPD [expr {$v}]}
return ;# finished ok
} ;# end while(ok)
S8F3R | Executive Program Request |
Sent by Host and Equipment |
# S8F3R Tcl Receive message - add next line to setup
$spname whenever S8F3 [list recv_S8F3R $spname]
# receive procedure
proc recv_S8F3R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# no data expected
if {$send_reply} {
# TBD create reply data
$spname put S8F4 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S8F3R
S8F4 | Executive Program Data |
Sent by Host and Equipment |
# S8F4 Tcl Parse reply
set reply [secs_xact $spname S8F3R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect EPD
# EPD (list)B:n (always) executive program data, the fantasy of using SECS for this has been revived
if {[string first "B:" [lindex $TSN_data 0]] != 0} {set ok 0; break}
# convert list of type B 0xhh to int using expr
set EPD {}; foreach v [lreplace $TSN_data 0 0] {lappend EPD [expr {$v}]}
return ;# finished ok
} ;# end while(ok)
S9F1 | Unknown Device ID |
Sent by Equipment Only |
# S9F1 Tcl Receive message - add next line to setup
$spname whenever S9F1 [list recv_S9F1 $spname]
# receive procedure
proc recv_S9F1 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect MHEAD
# MHEAD (list)B:10 (always) message header of received block
if {[string first "B:" [lindex $TSN_data 0]] != 0} {set ok 0; break}
# convert list of type B 0xhh to int using expr
set MHEAD {}; foreach v [lreplace $TSN_data 0 0] {lappend MHEAD [expr {$v}]}
} ;# end while(ok)
} ;# end recv_S9F1
S9F3 | Unknown Stream |
Sent by Equipment Only |
# S9F3 Tcl Receive message - add next line to setup
$spname whenever S9F3 [list recv_S9F3 $spname]
# receive procedure
proc recv_S9F3 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect MHEAD
# MHEAD (list)B:10 (always) message header of received block
if {[string first "B:" [lindex $TSN_data 0]] != 0} {set ok 0; break}
# convert list of type B 0xhh to int using expr
set MHEAD {}; foreach v [lreplace $TSN_data 0 0] {lappend MHEAD [expr {$v}]}
} ;# end while(ok)
} ;# end recv_S9F3
S9F5 | Unknown Function |
Sent by Equipment Only |
# S9F5 Tcl Receive message - add next line to setup
$spname whenever S9F5 [list recv_S9F5 $spname]
# receive procedure
proc recv_S9F5 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect MHEAD
# MHEAD (list)B:10 (always) message header of received block
if {[string first "B:" [lindex $TSN_data 0]] != 0} {set ok 0; break}
# convert list of type B 0xhh to int using expr
set MHEAD {}; foreach v [lreplace $TSN_data 0 0] {lappend MHEAD [expr {$v}]}
} ;# end while(ok)
} ;# end recv_S9F5
S9F7 | Illegal Data |
Sent by Equipment Only |
# S9F7 Tcl Receive message - add next line to setup
$spname whenever S9F7 [list recv_S9F7 $spname]
# receive procedure
proc recv_S9F7 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect MHEAD
# MHEAD (list)B:10 (always) message header of received block
if {[string first "B:" [lindex $TSN_data 0]] != 0} {set ok 0; break}
# convert list of type B 0xhh to int using expr
set MHEAD {}; foreach v [lreplace $TSN_data 0 0] {lappend MHEAD [expr {$v}]}
} ;# end while(ok)
} ;# end recv_S9F7
S9F9 | Transaction Timeout |
Sent by Equipment Only |
# S9F9 Tcl Receive message - add next line to setup
$spname whenever S9F9 [list recv_S9F9 $spname]
# receive procedure
proc recv_S9F9 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect SHEAD
# SHEAD (list)B:10 (always) message header of sent block
if {[string first "B:" [lindex $TSN_data 0]] != 0} {set ok 0; break}
# convert list of type B 0xhh to int using expr
set SHEAD {}; foreach v [lreplace $TSN_data 0 0] {lappend SHEAD [expr {$v}]}
} ;# end while(ok)
} ;# end recv_S9F9
S9F11 | Data Too Long |
Sent by Equipment Only |
# S9F11 Tcl Receive message - add next line to setup
$spname whenever S9F11 [list recv_S9F11 $spname]
# receive procedure
proc recv_S9F11 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect MHEAD
# MHEAD (list)B:10 (always) message header of received block
if {[string first "B:" [lindex $TSN_data 0]] != 0} {set ok 0; break}
# convert list of type B 0xhh to int using expr
set MHEAD {}; foreach v [lreplace $TSN_data 0 0] {lappend MHEAD [expr {$v}]}
} ;# end while(ok)
} ;# end recv_S9F11
S9F13 | Conversation Timeout |
Sent by Equipment Only |
# S9F13 Tcl Receive message - add next line to setup
$spname whenever S9F13 [list recv_S9F13 $spname]
# receive procedure
proc recv_S9F13 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 MEXP EDID
# MEXP A:6 (always) message expected in form of SxxFyy
# EDID A:80 (varies) expected data identification, PPID or SPID or PTN
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {MEXP EDID}
if {[string first "A:" [lindex $MEXP 0]] != 0} {set ok 0; break}
set MEXP [lindex $MEXP 1]
#vset [split [lindex $EDID 0] :] {typeEDID lengthEDID}
set EDID [lindex $EDID 1]
} ;# end while(ok)
} ;# end recv_S9F13
S10F1[R] | Terminal Request |
Sent by Equipment Only |
# S10F1 Tcl Receive message - add next line to setup
$spname whenever S10F1 [list recv_S10F1 $spname]
# receive procedure
proc recv_S10F1 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 TID TEXT
# TID B:1 (always) terminal ID
# TEXT A:120 (varies) line of text for display, no standard max size
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TID TEXT}
if {[lindex $TID 0] != "B:1"} {set ok 0; break}
set TID [expr [lindex $TID 1]] ;# expr converts 0xhh to int
#vset [split [lindex $TEXT 0] :] {typeTEXT lengthTEXT}
set TEXT [lindex $TEXT 1]
if {$send_reply} {
# TBD create reply data
$spname put S10F2 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S10F1
S10F2 | Terminal Request Acknowledge |
Sent by Host Only |
# S10F2 Tcl Parse reply
set reply [secs_xact $spname S10F1R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC10
# ACKC10 B:1 (always) acknowledge code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC10 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S10F3[R] | Terminal Display, Single |
Sent by Host Only |
# S10F3 Tcl Receive message - add next line to setup
$spname whenever S10F3 [list recv_S10F3 $spname]
# receive procedure
proc recv_S10F3 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 TID TEXT
# TID B:1 (always) terminal ID
# TEXT A:120 (varies) line of text for display, no standard max size
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TID TEXT}
if {[lindex $TID 0] != "B:1"} {set ok 0; break}
set TID [expr [lindex $TID 1]] ;# expr converts 0xhh to int
#vset [split [lindex $TEXT 0] :] {typeTEXT lengthTEXT}
set TEXT [lindex $TEXT 1]
if {$send_reply} {
# TBD create reply data
$spname put S10F4 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S10F3
S10F4 | Terminal Display, Single Acknowledge |
Sent by Equipment Only |
# S10F4 Tcl Parse reply
set reply [secs_xact $spname S10F3R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC10
# ACKC10 B:1 (always) acknowledge code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC10 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S10F5[R] | Terminal Display, Multi-Block |
Sent by Host Only |
# S10F5 Tcl Receive message - add next line to setup
$spname whenever S10F5 [list recv_S10F5 $spname]
# receive procedure
proc recv_S10F5 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 TID {L:n TEXT}
# TID B:1 (always) terminal ID
# TEXT A:120 (varies) line of text for display, no standard max size
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TID Ln}
if {[lindex $TID 0] != "B:1"} {set ok 0; break}
set TID [expr [lindex $TID 1]] ;# expr converts 0xhh to int
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach TEXT [lreplace $Ln 0 0] {
#vset [split [lindex $TEXT 0] :] {typeTEXT lengthTEXT}
set TEXT [lindex $TEXT 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S10F6 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S10F5
S10F6 | Terminal Display, Multi-Block Acknowledge |
Sent by Equipment Only |
# S10F6 Tcl Parse reply
set reply [secs_xact $spname S10F5R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC10
# ACKC10 B:1 (always) acknowledge code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC10 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S10F7 | Multi-block Not Allowed |
Sent by Equipment Only |
# S10F7 Tcl Receive message - add next line to setup
$spname whenever S10F7 [list recv_S10F7 $spname]
# receive procedure
proc recv_S10F7 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect TID
# TID B:1 (always) terminal ID
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set TID [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
if {$send_reply} {
# TBD create reply data
$spname put S10F8 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S10F7
S10F9 | Broadcast |
Sent by Host Only |
# S10F9 Tcl Receive message - add next line to setup
$spname whenever S10F9 [list recv_S10F9 $spname]
# receive procedure
proc recv_S10F9 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect TEXT
# TEXT A:120 (varies) line of text for display, no standard max size
#vset [split [lindex $TSN_data 0] :] {typeTEXT lengthTEXT}
set TEXT [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S10F10 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S10F9
S10F10 | Broadcast Acknowledge |
Sent by Equipment Only |
# S10F10 Tcl Parse reply
set reply [secs_xact $spname S10F9R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC10
# ACKC10 B:1 (always) acknowledge code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC10 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S12F1R | Map Setup Data Send |
Sent by Equipment Only |
# S12F1R Tcl Receive message - add next line to setup
$spname whenever S12F1 [list recv_S12F1R $spname]
# receive procedure
proc recv_S12F1R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:15 MID IDTYP FNLOC FFROT ORLOC RPSEL {L:n REFP} DUTMS XDIES YDIES ROWCT COLCT NULBC PRDCT PRAXI
# MID A:16 (varies) material ID, E40 restricts to A:n
# IDTYP B:1 (always) ID type
# FNLOC U2:1 (always) flat/notch location in degrees clockwise from bottom
# FFROT U2:1 (always) film frame location in degrees clockwise from bottom
# ORLOC B:1 (always) origin location
# RPSEL U1:1 (always) reference point select
# REFP (list)I4:2 (varies) x y reference point
# DUTMS A:n (always) die units of measure (per E5 Section 12)
# XDIES F4:1 (varies) X-axis die size
# YDIES F4:1 (varies) Y-axis die size
# ROWCT U4:1 (varies) row count in die increments
# COLCT U4:1 (varies) column count in die increments
# NULBC A:n (varies) null bin code value
# PRDCT U4:1 (varies) process die count
# PRAXI B:1 (always) process access
if { [lindex $TSN_data 0] != "L:15" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {MID IDTYP FNLOC FFROT ORLOC RPSEL Ln DUTMS XDIES YDIES ROWCT COLCT NULBC PRDCT PRAXI}
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
if {[lindex $IDTYP 0] != "B:1"} {set ok 0; break}
set IDTYP [expr [lindex $IDTYP 1]] ;# expr converts 0xhh to int
if {[lindex $FNLOC 0] != "U2:1"} {set ok 0; break}
set FNLOC [lindex $FNLOC 1]
if {[lindex $FFROT 0] != "U2:1"} {set ok 0; break}
set FFROT [lindex $FFROT 1]
if {[lindex $ORLOC 0] != "B:1"} {set ok 0; break}
set ORLOC [expr [lindex $ORLOC 1]] ;# expr converts 0xhh to int
if {[lindex $RPSEL 0] != "U1:1"} {set ok 0; break}
set RPSEL [lindex $RPSEL 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach REFP [lreplace $Ln 0 0] {
#vset [split [lindex $REFP 0] :] {typeREFP lengthREFP}
set REFP [lreplace $REFP 0 0]
}
if {!$ok} break
if {[string first "A:" [lindex $DUTMS 0]] != 0} {set ok 0; break}
set DUTMS [lindex $DUTMS 1]
#vset [split [lindex $XDIES 0] :] {typeXDIES lengthXDIES}
set XDIES [lindex $XDIES 1]
#vset [split [lindex $YDIES 0] :] {typeYDIES lengthYDIES}
set YDIES [lindex $YDIES 1]
#vset [split [lindex $ROWCT 0] :] {typeROWCT lengthROWCT}
set ROWCT [lindex $ROWCT 1]
#vset [split [lindex $COLCT 0] :] {typeCOLCT lengthCOLCT}
set COLCT [lindex $COLCT 1]
#vset [split [lindex $NULBC 0] :] {typeNULBC lengthNULBC}
set NULBC [lindex $NULBC 1]
#vset [split [lindex $PRDCT 0] :] {typePRDCT lengthPRDCT}
set PRDCT [lindex $PRDCT 1]
if {[lindex $PRAXI 0] != "B:1"} {set ok 0; break}
set PRAXI [expr [lindex $PRAXI 1]] ;# expr converts 0xhh to int
if {$send_reply} {
# TBD create reply data
$spname put S12F2 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S12F1R
S12F2 | Map Setup Data Acknowledge |
Sent by Host Only |
# S12F2 Tcl Parse reply
set reply [secs_xact $spname S12F1R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect SDACK
# SDACK B:1 (always) setup data ack, 0 ok
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set SDACK [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S12F3R | Map Setup Data Request |
Sent by Equipment Only |
# S12F3R Tcl Receive message - add next line to setup
$spname whenever S12F3 [list recv_S12F3R $spname]
# receive procedure
proc recv_S12F3R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:9 MID IDTYP MAPFT FNLOC FFROT ORLOC PRAXI BCEQU NULBC
# MID A:16 (varies) material ID, E40 restricts to A:n
# IDTYP B:1 (always) ID type
# MAPFT B:1 (always) map data format type
# FNLOC U2:1 (always) flat/notch location in degrees clockwise from bottom
# FFROT U2:1 (always) film frame location in degrees clockwise from bottom
# ORLOC B:1 (always) origin location
# PRAXI B:1 (always) process access
# BCEQU (list)U1:n (varies) array of bin code equivalents
# NULBC A:n (varies) null bin code value
if { [lindex $TSN_data 0] != "L:9" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {MID IDTYP MAPFT FNLOC FFROT ORLOC PRAXI BCEQU NULBC}
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
if {[lindex $IDTYP 0] != "B:1"} {set ok 0; break}
set IDTYP [expr [lindex $IDTYP 1]] ;# expr converts 0xhh to int
if {[lindex $MAPFT 0] != "B:1"} {set ok 0; break}
set MAPFT [expr [lindex $MAPFT 1]] ;# expr converts 0xhh to int
if {[lindex $FNLOC 0] != "U2:1"} {set ok 0; break}
set FNLOC [lindex $FNLOC 1]
if {[lindex $FFROT 0] != "U2:1"} {set ok 0; break}
set FFROT [lindex $FFROT 1]
if {[lindex $ORLOC 0] != "B:1"} {set ok 0; break}
set ORLOC [expr [lindex $ORLOC 1]] ;# expr converts 0xhh to int
if {[lindex $PRAXI 0] != "B:1"} {set ok 0; break}
set PRAXI [expr [lindex $PRAXI 1]] ;# expr converts 0xhh to int
#vset [split [lindex $BCEQU 0] :] {typeBCEQU lengthBCEQU}
set BCEQU [lreplace $BCEQU 0 0]
#vset [split [lindex $NULBC 0] :] {typeNULBC lengthNULBC}
set NULBC [lindex $NULBC 1]
if {$send_reply} {
# TBD create reply data
$spname put S12F4 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S12F3R
S12F4 | Map Setup Data |
Sent by Host Only |
# S12F4 Tcl Parse reply
set reply [secs_xact $spname S12F3R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:15 MID IDTYP FNLOC ORLOC RPSEL {L:n REFP} DUTMS XDIES YDIES ROWCT COLCT PRDCT BCEQU NULBC MLCL
# MID A:16 (varies) material ID, E40 restricts to A:n
# IDTYP B:1 (always) ID type
# FNLOC U2:1 (always) flat/notch location in degrees clockwise from bottom
# ORLOC B:1 (always) origin location
# RPSEL U1:1 (always) reference point select
# REFP (list)I4:2 (varies) x y reference point
# DUTMS A:n (always) die units of measure (per E5 Section 12)
# XDIES F4:1 (varies) X-axis die size
# YDIES F4:1 (varies) Y-axis die size
# ROWCT U4:1 (varies) row count in die increments
# COLCT U4:1 (varies) column count in die increments
# PRDCT U4:1 (varies) process die count
# BCEQU (list)U1:n (varies) array of bin code equivalents
# NULBC A:n (varies) null bin code value
# MLCL U4:1 (varies) message length in bytes
if { [lindex $TSN_data 0] != "L:15" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {MID IDTYP FNLOC ORLOC RPSEL Ln DUTMS XDIES YDIES ROWCT COLCT PRDCT BCEQU NULBC MLCL}
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
if {[lindex $IDTYP 0] != "B:1"} {set ok 0; break}
set IDTYP [expr [lindex $IDTYP 1]] ;# expr converts 0xhh to int
if {[lindex $FNLOC 0] != "U2:1"} {set ok 0; break}
set FNLOC [lindex $FNLOC 1]
if {[lindex $ORLOC 0] != "B:1"} {set ok 0; break}
set ORLOC [expr [lindex $ORLOC 1]] ;# expr converts 0xhh to int
if {[lindex $RPSEL 0] != "U1:1"} {set ok 0; break}
set RPSEL [lindex $RPSEL 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach REFP [lreplace $Ln 0 0] {
#vset [split [lindex $REFP 0] :] {typeREFP lengthREFP}
set REFP [lreplace $REFP 0 0]
}
if {!$ok} break
if {[string first "A:" [lindex $DUTMS 0]] != 0} {set ok 0; break}
set DUTMS [lindex $DUTMS 1]
#vset [split [lindex $XDIES 0] :] {typeXDIES lengthXDIES}
set XDIES [lindex $XDIES 1]
#vset [split [lindex $YDIES 0] :] {typeYDIES lengthYDIES}
set YDIES [lindex $YDIES 1]
#vset [split [lindex $ROWCT 0] :] {typeROWCT lengthROWCT}
set ROWCT [lindex $ROWCT 1]
#vset [split [lindex $COLCT 0] :] {typeCOLCT lengthCOLCT}
set COLCT [lindex $COLCT 1]
#vset [split [lindex $PRDCT 0] :] {typePRDCT lengthPRDCT}
set PRDCT [lindex $PRDCT 1]
#vset [split [lindex $BCEQU 0] :] {typeBCEQU lengthBCEQU}
set BCEQU [lreplace $BCEQU 0 0]
#vset [split [lindex $NULBC 0] :] {typeNULBC lengthNULBC}
set NULBC [lindex $NULBC 1]
#vset [split [lindex $MLCL 0] :] {typeMLCL lengthMLCL}
set MLCL [lindex $MLCL 1]
return ;# finished ok
} ;# end while(ok)
S12F5R | Map Transmit Inquire |
Sent by Equipment Only |
# S12F5R Tcl Receive message - add next line to setup
$spname whenever S12F5 [list recv_S12F5R $spname]
# receive procedure
proc recv_S12F5R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 MID IDTYP MAPFT MLCL
# MID A:16 (varies) material ID, E40 restricts to A:n
# IDTYP B:1 (always) ID type
# MAPFT B:1 (always) map data format type
# MLCL U4:1 (varies) message length in bytes
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {MID IDTYP MAPFT MLCL}
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
if {[lindex $IDTYP 0] != "B:1"} {set ok 0; break}
set IDTYP [expr [lindex $IDTYP 1]] ;# expr converts 0xhh to int
if {[lindex $MAPFT 0] != "B:1"} {set ok 0; break}
set MAPFT [expr [lindex $MAPFT 1]] ;# expr converts 0xhh to int
#vset [split [lindex $MLCL 0] :] {typeMLCL lengthMLCL}
set MLCL [lindex $MLCL 1]
if {$send_reply} {
# TBD create reply data
$spname put S12F6 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S12F5R
S12F6 | Map Transmit Grant |
Sent by Host Only |
# S12F6 Tcl Parse reply
set reply [secs_xact $spname S12F5R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect GRNT1
# GRNT1 B:1 (always) grant code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set GRNT1 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S12F7R | Map Data Send Type 1 |
Sent by Equipment Only |
# S12F7R Tcl Receive message - add next line to setup
$spname whenever S12F7 [list recv_S12F7R $spname]
# receive procedure
proc recv_S12F7R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 MID IDTYP {L:n {L:2 RSINF BINLT}}
# MID A:16 (varies) material ID, E40 restricts to A:n
# IDTYP B:1 (always) ID type
# RSINF (list)I4:3 (varies) starting location for row or column, x,y,direction triplet
# BINLT (list)U1:n (varies) array of bin values, text or U1 array
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {MID IDTYP Ln}
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
if {[lindex $IDTYP 0] != "B:1"} {set ok 0; break}
set IDTYP [expr [lindex $IDTYP 1]] ;# expr converts 0xhh to int
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {RSINF BINLT}
#vset [split [lindex $RSINF 0] :] {typeRSINF lengthRSINF}
set RSINF [lreplace $RSINF 0 0]
#vset [split [lindex $BINLT 0] :] {typeBINLT lengthBINLT}
set BINLT [lreplace $BINLT 0 0]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S12F8 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S12F7R
S12F8 | Map Data Ack Type 1 |
Sent by Host Only |
# S12F8 Tcl Parse reply
set reply [secs_xact $spname S12F7R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect MDACK
# MDACK B:1 (always) map data ack
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set MDACK [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S12F9R | Map Data Send Type 2 |
Sent by Equipment Only |
# S12F9R Tcl Receive message - add next line to setup
$spname whenever S12F9 [list recv_S12F9R $spname]
# receive procedure
proc recv_S12F9R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 MID IDTYP STRP BINLT
# MID A:16 (varies) material ID, E40 restricts to A:n
# IDTYP B:1 (always) ID type
# STRP (list)I2:2 (varies) x y die coordinate starting position
# BINLT (list)U1:n (varies) array of bin values, text or U1 array
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {MID IDTYP STRP BINLT}
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
if {[lindex $IDTYP 0] != "B:1"} {set ok 0; break}
set IDTYP [expr [lindex $IDTYP 1]] ;# expr converts 0xhh to int
#vset [split [lindex $STRP 0] :] {typeSTRP lengthSTRP}
set STRP [lreplace $STRP 0 0]
#vset [split [lindex $BINLT 0] :] {typeBINLT lengthBINLT}
set BINLT [lreplace $BINLT 0 0]
if {$send_reply} {
# TBD create reply data
$spname put S12F10 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S12F9R
S12F10 | Map Data Ack Type 2 |
Sent by Host Only |
# S12F10 Tcl Parse reply
set reply [secs_xact $spname S12F9R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect MDACK
# MDACK B:1 (always) map data ack
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set MDACK [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S12F11R | Map Data Send Type 3 |
Sent by Equipment Only |
# S12F11R Tcl Receive message - add next line to setup
$spname whenever S12F11 [list recv_S12F11R $spname]
# receive procedure
proc recv_S12F11R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 MID IDTYP {L:n {L:2 XYPOS BINLT}}
# MID A:16 (varies) material ID, E40 restricts to A:n
# IDTYP B:1 (always) ID type
# XYPOS (list)I2:2 (varies) x y coordinate position
# BINLT (list)U1:n (varies) array of bin values, text or U1 array
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {MID IDTYP Ln}
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
if {[lindex $IDTYP 0] != "B:1"} {set ok 0; break}
set IDTYP [expr [lindex $IDTYP 1]] ;# expr converts 0xhh to int
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {XYPOS BINLT}
#vset [split [lindex $XYPOS 0] :] {typeXYPOS lengthXYPOS}
set XYPOS [lreplace $XYPOS 0 0]
#vset [split [lindex $BINLT 0] :] {typeBINLT lengthBINLT}
set BINLT [lreplace $BINLT 0 0]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S12F12 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S12F11R
S12F12 | Map Data Ack Type 3 |
Sent by Host Only |
# S12F12 Tcl Parse reply
set reply [secs_xact $spname S12F11R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect MDACK
# MDACK B:1 (always) map data ack
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set MDACK [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S12F13R | Map Data Request Type 1 |
Sent by Equipment Only |
# S12F13R Tcl Receive message - add next line to setup
$spname whenever S12F13 [list recv_S12F13R $spname]
# receive procedure
proc recv_S12F13R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 MID IDTYP
# MID A:16 (varies) material ID, E40 restricts to A:n
# IDTYP B:1 (always) ID type
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {MID IDTYP}
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
if {[lindex $IDTYP 0] != "B:1"} {set ok 0; break}
set IDTYP [expr [lindex $IDTYP 1]] ;# expr converts 0xhh to int
if {$send_reply} {
# TBD create reply data
$spname put S12F14 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S12F13R
S12F14 | Map Data Type 1 |
Sent by Host Only |
# S12F14 Tcl Parse reply
set reply [secs_xact $spname S12F13R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:3 MID IDTYP {L:n {L:2 RSINF BINLT}}
# MID A:16 (varies) material ID, E40 restricts to A:n
# IDTYP B:1 (always) ID type
# RSINF (list)I4:3 (varies) starting location for row or column, x,y,direction triplet
# BINLT (list)U1:n (varies) array of bin values, text or U1 array
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {MID IDTYP Ln}
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
if {[lindex $IDTYP 0] != "B:1"} {set ok 0; break}
set IDTYP [expr [lindex $IDTYP 1]] ;# expr converts 0xhh to int
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {RSINF BINLT}
#vset [split [lindex $RSINF 0] :] {typeRSINF lengthRSINF}
set RSINF [lreplace $RSINF 0 0]
#vset [split [lindex $BINLT 0] :] {typeBINLT lengthBINLT}
set BINLT [lreplace $BINLT 0 0]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S12F15R | Map Data Request Type 2 |
Sent by Equipment Only |
# S12F15R Tcl Receive message - add next line to setup
$spname whenever S12F15 [list recv_S12F15R $spname]
# receive procedure
proc recv_S12F15R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 MID IDTYP
# MID A:16 (varies) material ID, E40 restricts to A:n
# IDTYP B:1 (always) ID type
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {MID IDTYP}
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
if {[lindex $IDTYP 0] != "B:1"} {set ok 0; break}
set IDTYP [expr [lindex $IDTYP 1]] ;# expr converts 0xhh to int
if {$send_reply} {
# TBD create reply data
$spname put S12F16 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S12F15R
S12F16 | Map Data Type 2 |
Sent by Host Only |
# S12F16 Tcl Parse reply
set reply [secs_xact $spname S12F15R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:4 MID IDTYP STRP BINLT
# MID A:16 (varies) material ID, E40 restricts to A:n
# IDTYP B:1 (always) ID type
# STRP (list)I2:2 (varies) x y die coordinate starting position
# BINLT (list)U1:n (varies) array of bin values, text or U1 array
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {MID IDTYP STRP BINLT}
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
if {[lindex $IDTYP 0] != "B:1"} {set ok 0; break}
set IDTYP [expr [lindex $IDTYP 1]] ;# expr converts 0xhh to int
#vset [split [lindex $STRP 0] :] {typeSTRP lengthSTRP}
set STRP [lreplace $STRP 0 0]
#vset [split [lindex $BINLT 0] :] {typeBINLT lengthBINLT}
set BINLT [lreplace $BINLT 0 0]
return ;# finished ok
} ;# end while(ok)
S12F17R | Map Data Request Type 3 |
Sent by Equipment Only |
# S12F17R Tcl Receive message - add next line to setup
$spname whenever S12F17 [list recv_S12F17R $spname]
# receive procedure
proc recv_S12F17R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 MID IDTYP SDBIN
# MID A:16 (varies) material ID, E40 restricts to A:n
# IDTYP B:1 (always) ID type
# SDBIN B:1 (always) send bin data flag, 0=send, else do not
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {MID IDTYP SDBIN}
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
if {[lindex $IDTYP 0] != "B:1"} {set ok 0; break}
set IDTYP [expr [lindex $IDTYP 1]] ;# expr converts 0xhh to int
if {[lindex $SDBIN 0] != "B:1"} {set ok 0; break}
set SDBIN [expr [lindex $SDBIN 1]] ;# expr converts 0xhh to int
if {$send_reply} {
# TBD create reply data
$spname put S12F18 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S12F17R
S12F18 | Map Data Type 3 |
Sent by Host Only |
# S12F18 Tcl Parse reply
set reply [secs_xact $spname S12F17R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:3 MID IDTYP {L:n {L:2 XYPOS BINLT}}
# MID A:16 (varies) material ID, E40 restricts to A:n
# IDTYP B:1 (always) ID type
# XYPOS (list)I2:2 (varies) x y coordinate position
# BINLT (list)U1:n (varies) array of bin values, text or U1 array
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {MID IDTYP Ln}
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
if {[lindex $IDTYP 0] != "B:1"} {set ok 0; break}
set IDTYP [expr [lindex $IDTYP 1]] ;# expr converts 0xhh to int
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {XYPOS BINLT}
#vset [split [lindex $XYPOS 0] :] {typeXYPOS lengthXYPOS}
set XYPOS [lreplace $XYPOS 0 0]
#vset [split [lindex $BINLT 0] :] {typeBINLT lengthBINLT}
set BINLT [lreplace $BINLT 0 0]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S12F19 | Map Error Report Send |
Sent by Host and Equipment |
# S12F19 Tcl Receive message - add next line to setup
$spname whenever S12F19 [list recv_S12F19 $spname]
# receive procedure
proc recv_S12F19 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 MAPER DATLC
# MAPER B:1 (always) map error
# DATLC U1:1 (always) location of invalid data, offset in bytes in the SECS-II message body
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {MAPER DATLC}
if {[lindex $MAPER 0] != "B:1"} {set ok 0; break}
set MAPER [expr [lindex $MAPER 1]] ;# expr converts 0xhh to int
if {[lindex $DATLC 0] != "U1:1"} {set ok 0; break}
set DATLC [lindex $DATLC 1]
if {$send_reply} {
# TBD create reply data
$spname put S12F20 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S12F19
S13F1R | Send Data Set Send |
Sent by Host and Equipment |
Comment: S13F1 seems to have the L: wrapper that S13F2 is missing. Be prepared to receive DSNAME without the L:
Format:
# S13F1R Tcl Receive message - add next line to setup
$spname whenever S13F1 [list recv_S13F1R $spname]
# receive procedure
proc recv_S13F1R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:1 DSNAME
# DSNAME A:50 (varies) the name of a dataset such as a PPID
if { [lindex $TSN_data 0] != "L:1" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] DSNAME
#vset [split [lindex $DSNAME 0] :] {typeDSNAME lengthDSNAME}
set DSNAME [lindex $DSNAME 1]
if {$send_reply} {
# TBD create reply data
$spname put S13F2 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S13F1R
S13F2 | Send Data Set Ack |
Sent by Host and Equipment |
Comment: The standards have had an erroneous structure for years - the L:2 has been missing. Unfortunately some implementations have not realized it was an error. The latest Hume versions automagically create the L:2 wrapper when it is missing.
Format:
# S13F2 Tcl Parse reply
set reply [secs_xact $spname S13F1R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 DSNAME ACKC13
# DSNAME A:50 (varies) the name of a dataset such as a PPID
# ACKC13 B:1 (always) acknowledge code, 0 ok
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DSNAME ACKC13}
#vset [split [lindex $DSNAME 0] :] {typeDSNAME lengthDSNAME}
set DSNAME [lindex $DSNAME 1]
if {[lindex $ACKC13 0] != "B:1"} {set ok 0; break}
set ACKC13 [expr [lindex $ACKC13 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S13F3R | Open Data Set Request |
Sent by Host and Equipment |
Comment: Sent by the receiver to open a data set for reading
Format:
# S13F3R Tcl Receive message - add next line to setup
$spname whenever S13F3 [list recv_S13F3R $spname]
# receive procedure
proc recv_S13F3R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 HANDLE DSNAME CKPNT
# HANDLE (list)U4 (varies) logical unit or handle for a data set
# DSNAME A:50 (varies) the name of a dataset such as a PPID
# CKPNT U4:1 (always) data set checkpoint defined by sender
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {HANDLE DSNAME CKPNT}
#vset [split [lindex $HANDLE 0] :] {typeHANDLE lengthHANDLE}
set HANDLE [lreplace $HANDLE 0 0]
#vset [split [lindex $DSNAME 0] :] {typeDSNAME lengthDSNAME}
set DSNAME [lindex $DSNAME 1]
if {[lindex $CKPNT 0] != "U4:1"} {set ok 0; break}
set CKPNT [lindex $CKPNT 1]
if {$send_reply} {
# TBD create reply data
$spname put S13F4 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S13F3R
S13F4 | Open Data Set Data |
Sent by Host and Equipment |
# S13F4 Tcl Parse reply
set reply [secs_xact $spname S13F3R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:5 HANDLE DSNAME ACKC13 RTYPE RECLEN
# HANDLE (list)U4 (varies) logical unit or handle for a data set
# DSNAME A:50 (varies) the name of a dataset such as a PPID
# ACKC13 B:1 (always) acknowledge code, 0 ok
# RTYPE U1:1 (varies) type of data record
# RECLEN U4:1 (varies) maximum number of bytes or characters in a discrete record
if { [lindex $TSN_data 0] != "L:5" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {HANDLE DSNAME ACKC13 RTYPE RECLEN}
#vset [split [lindex $HANDLE 0] :] {typeHANDLE lengthHANDLE}
set HANDLE [lreplace $HANDLE 0 0]
#vset [split [lindex $DSNAME 0] :] {typeDSNAME lengthDSNAME}
set DSNAME [lindex $DSNAME 1]
if {[lindex $ACKC13 0] != "B:1"} {set ok 0; break}
set ACKC13 [expr [lindex $ACKC13 1]] ;# expr converts 0xhh to int
#vset [split [lindex $RTYPE 0] :] {typeRTYPE lengthRTYPE}
set RTYPE [lindex $RTYPE 1]
#vset [split [lindex $RECLEN 0] :] {typeRECLEN lengthRECLEN}
set RECLEN [lindex $RECLEN 1]
return ;# finished ok
} ;# end while(ok)
S13F5R | Read Data Set Request |
Sent by Host and Equipment |
# S13F5R Tcl Receive message - add next line to setup
$spname whenever S13F5 [list recv_S13F5R $spname]
# receive procedure
proc recv_S13F5R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 HANDLE READLN
# HANDLE (list)U4 (varies) logical unit or handle for a data set
# READLN U4:1 (varies) maximum number of bytes or characters to read
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {HANDLE READLN}
#vset [split [lindex $HANDLE 0] :] {typeHANDLE lengthHANDLE}
set HANDLE [lreplace $HANDLE 0 0]
#vset [split [lindex $READLN 0] :] {typeREADLN lengthREADLN}
set READLN [lindex $READLN 1]
if {$send_reply} {
# TBD create reply data
$spname put S13F6 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S13F5R
S13F6 | Read Data Set Data |
Sent by Host and Equipment |
# S13F6 Tcl Parse reply
set reply [secs_xact $spname S13F5R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:4 HANDLE ACKC13 CKPNT {L:n FILDAT}
# HANDLE (list)U4 (varies) logical unit or handle for a data set
# ACKC13 B:1 (always) acknowledge code, 0 ok
# CKPNT U4:1 (always) data set checkpoint defined by sender
# FILDAT (list)B (varies) Data Set Data, binary or ascii. Max length is the RECLEN from open.
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {HANDLE ACKC13 CKPNT Ln}
#vset [split [lindex $HANDLE 0] :] {typeHANDLE lengthHANDLE}
set HANDLE [lreplace $HANDLE 0 0]
if {[lindex $ACKC13 0] != "B:1"} {set ok 0; break}
set ACKC13 [expr [lindex $ACKC13 1]] ;# expr converts 0xhh to int
if {[lindex $CKPNT 0] != "U4:1"} {set ok 0; break}
set CKPNT [lindex $CKPNT 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach FILDAT [lreplace $Ln 0 0] {
#vset [split [lindex $FILDAT 0] :] {typeFILDAT lengthFILDAT}
# convert list of type B 0xhh to int using expr
set FILDAT {}; foreach v [lreplace $FILDAT 0 0] {lappend FILDAT [expr {$v}]}
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S13F7R | Close Data Set Send |
Sent by Host and Equipment |
# S13F7R Tcl Receive message - add next line to setup
$spname whenever S13F7 [list recv_S13F7R $spname]
# receive procedure
proc recv_S13F7R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:1 HANDLE
# HANDLE (list)U4 (varies) logical unit or handle for a data set
if { [lindex $TSN_data 0] != "L:1" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] HANDLE
#vset [split [lindex $HANDLE 0] :] {typeHANDLE lengthHANDLE}
set HANDLE [lreplace $HANDLE 0 0]
if {$send_reply} {
# TBD create reply data
$spname put S13F8 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S13F7R
S13F8 | Close Data Set Ack |
Sent by Host and Equipment |
# S13F8 Tcl Parse reply
set reply [secs_xact $spname S13F7R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 HANDLE ACKC13
# HANDLE (list)U4 (varies) logical unit or handle for a data set
# ACKC13 B:1 (always) acknowledge code, 0 ok
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {HANDLE ACKC13}
#vset [split [lindex $HANDLE 0] :] {typeHANDLE lengthHANDLE}
set HANDLE [lreplace $HANDLE 0 0]
if {[lindex $ACKC13 0] != "B:1"} {set ok 0; break}
set ACKC13 [expr [lindex $ACKC13 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S13F9R | Reset Data Set Send |
Sent by Host and Equipment |
# S13F9R Tcl Receive message - add next line to setup
$spname whenever S13F9 [list recv_S13F9R $spname]
# receive procedure
proc recv_S13F9R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# no data expected
if {$send_reply} {
# TBD create reply data
$spname put S13F10 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S13F9R
S13F10 | Reset Data Set Ack |
Sent by Host and Equipment |
# S13F10 Tcl Parse reply
set reply [secs_xact $spname S13F9R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# no data expected
return ;# finished ok
} ;# end while(ok)
S13F11R | Data Set Obj Multi-Block Inquire |
Sent by Host and Equipment |
# S13F11R Tcl Receive message - add next line to setup
$spname whenever S13F11 [list recv_S13F11R $spname]
# receive procedure
proc recv_S13F11R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 DATAID OBJSPEC DATALENGTH
# DATAID U4:1 (varies) an identifier to correlate related messages
# OBJSPEC A:n (varies) E39 structured text identifying an object, [object type:object id>]+
# DATALENGTH U4:1 (varies) total bytes of the message body
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID OBJSPEC DATALENGTH}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $OBJSPEC 0] :] {typeOBJSPEC lengthOBJSPEC}
set OBJSPEC [lindex $OBJSPEC 1]
#vset [split [lindex $DATALENGTH 0] :] {typeDATALENGTH lengthDATALENGTH}
set DATALENGTH [lindex $DATALENGTH 1]
if {$send_reply} {
# TBD create reply data
$spname put S13F12 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S13F11R
S13F12 | Data Set Obj Multi-Block Grant |
Sent by Host and Equipment |
# S13F12 Tcl Parse reply
set reply [secs_xact $spname S13F11R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect GRANT
# GRANT B:1 (always) multiblock grant code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set GRANT [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S13F13R | Table Data Send |
Sent by Host and Equipment |
Comment: The first element of every row is a primary key value which identifies the row. The row items correspond in sequence to the column headers. E58 uses attributes NumCols, NumRows, and DataLength
Format:
# S13F13R Tcl Receive message - add next line to setup
$spname whenever S13F13 [list recv_S13F13R $spname]
# receive procedure
proc recv_S13F13R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:8 DATAID OBJSPEC TBLTYP TBLID TBLCMD {L:n {L:2 ATTRID ATTRDATA}} {L:c COLHDR} {L:r {L:m TBLELT}}
# DATAID U4:1 (varies) an identifier to correlate related messages
# OBJSPEC A:n (varies) E39 structured text identifying an object, [object type:object id>]+
# TBLTYP A:n (always) denotes the format and application of the table, conforms to OBJTYPE
# TBLID A:80 (varies) table identifier, a kind of OBJSPEC
# TBLCMD U1:1 (always) table command
# ATTRID A:40 (varies) identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~. Does not begin or end with space.
# ATTRDATA A:n (varies) a specific attribute value of any data type
# COLHDR A:20 (always) table column name
# TBLELT A:n (varies) table element any type, list types or array types are discouraged, first column type must be a primary key value and not be a list or array
if { [lindex $TSN_data 0] != "L:8" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID OBJSPEC TBLTYP TBLID TBLCMD Ln Lc_n1 Lr_n2}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $OBJSPEC 0] :] {typeOBJSPEC lengthOBJSPEC}
set OBJSPEC [lindex $OBJSPEC 1]
if {[string first "A:" [lindex $TBLTYP 0]] != 0} {set ok 0; break}
set TBLTYP [lindex $TBLTYP 1]
#vset [split [lindex $TBLID 0] :] {typeTBLID lengthTBLID}
set TBLID [lindex $TBLID 1]
if {[lindex $TBLCMD 0] != "U1:1"} {set ok 0; break}
set TBLCMD [lindex $TBLCMD 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ATTRID ATTRDATA}
#vset [split [lindex $ATTRID 0] :] {typeATTRID lengthATTRID}
set ATTRID [lindex $ATTRID 1]
#vset [split [lindex $ATTRDATA 0] :] {typeATTRDATA lengthATTRDATA}
set ATTRDATA [lindex $ATTRDATA 1]
}
if {!$ok} break
if {[string first L: [lindex $Lc_n1 0]] != 0} {set ok 0; break}
foreach COLHDR [lreplace $Lc_n1 0 0] {
if {[string first "A:" [lindex $COLHDR 0]] != 0} {set ok 0; break}
set COLHDR [lindex $COLHDR 1]
}
if {!$ok} break
if {[string first L: [lindex $Lr_n2 0]] != 0} {set ok 0; break}
foreach Lm_1 [lreplace $Lr_n2 0 0] {
if {[string first L: [lindex $Lm_1 0]] != 0} {set ok 0; break}
foreach TBLELT [lreplace $Lm_1 0 0] {
#vset [split [lindex $TBLELT 0] :] {typeTBLELT lengthTBLELT}
set TBLELT [lindex $TBLELT 1]
}
if {!$ok} break
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S13F14 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S13F13R
S13F14 | Table Data Ack |
Sent by Host and Equipment |
# S13F14 Tcl Parse reply
set reply [secs_xact $spname S13F13R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 TBLACK {L:p {L:2 ERRCODE ERRTEXT}}
# TBLACK U1:1 (always) acknowledge code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TBLACK Lp}
if {[lindex $TBLACK 0] != "U1:1"} {set ok 0; break}
set TBLACK [lindex $TBLACK 1]
if {[string first L: [lindex $Lp 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lp 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S13F15R | Table Data Request |
Sent by Host and Equipment |
Comment: Either p or q or both are 0.
Format:
# S13F15R Tcl Receive message - add next line to setup
$spname whenever S13F15 [list recv_S13F15R $spname]
# receive procedure
proc recv_S13F15R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:7 DATAID OBJSPEC TBLTYP TBLID TBLCMD {L:p COLHDR} {L:q TBLELT}
# DATAID U4:1 (varies) an identifier to correlate related messages
# OBJSPEC A:n (varies) E39 structured text identifying an object, [object type:object id>]+
# TBLTYP A:n (always) denotes the format and application of the table, conforms to OBJTYPE
# TBLID A:80 (varies) table identifier, a kind of OBJSPEC
# TBLCMD U1:1 (always) table command
# COLHDR A:20 (always) table column name
# TBLELT A:n (varies) table element any type, list types or array types are discouraged, first column type must be a primary key value and not be a list or array
if { [lindex $TSN_data 0] != "L:7" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID OBJSPEC TBLTYP TBLID TBLCMD Lp Lq_n1}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $OBJSPEC 0] :] {typeOBJSPEC lengthOBJSPEC}
set OBJSPEC [lindex $OBJSPEC 1]
if {[string first "A:" [lindex $TBLTYP 0]] != 0} {set ok 0; break}
set TBLTYP [lindex $TBLTYP 1]
#vset [split [lindex $TBLID 0] :] {typeTBLID lengthTBLID}
set TBLID [lindex $TBLID 1]
if {[lindex $TBLCMD 0] != "U1:1"} {set ok 0; break}
set TBLCMD [lindex $TBLCMD 1]
if {[string first L: [lindex $Lp 0]] != 0} {set ok 0; break}
foreach COLHDR [lreplace $Lp 0 0] {
if {[string first "A:" [lindex $COLHDR 0]] != 0} {set ok 0; break}
set COLHDR [lindex $COLHDR 1]
}
if {!$ok} break
if {[string first L: [lindex $Lq_n1 0]] != 0} {set ok 0; break}
foreach TBLELT [lreplace $Lq_n1 0 0] {
#vset [split [lindex $TBLELT 0] :] {typeTBLELT lengthTBLELT}
set TBLELT [lindex $TBLELT 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S13F16 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S13F15R
S13F16 | Table Data |
Sent by Host and Equipment |
# S13F16 Tcl Parse reply
set reply [secs_xact $spname S13F15R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:6 TBLTYP TBLID {L:n {L:2 ATTRID ATTRDATA}} {L:c COLHDR} {L:r {L:c TBLELT}} {L:2 TBLACK {L:p ERRCODE ERRTEXT}}
# TBLTYP A:n (always) denotes the format and application of the table, conforms to OBJTYPE
# TBLID A:80 (varies) table identifier, a kind of OBJSPEC
# ATTRID A:40 (varies) identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~. Does not begin or end with space.
# ATTRDATA A:n (varies) a specific attribute value of any data type
# COLHDR A:20 (always) table column name
# TBLELT A:n (varies) table element any type, list types or array types are discouraged, first column type must be a primary key value and not be a list or array
# TBLACK U1:1 (always) acknowledge code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:6" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TBLTYP TBLID Ln Lc_n1 Lr_n2 L2_n3}
if {[string first "A:" [lindex $TBLTYP 0]] != 0} {set ok 0; break}
set TBLTYP [lindex $TBLTYP 1]
#vset [split [lindex $TBLID 0] :] {typeTBLID lengthTBLID}
set TBLID [lindex $TBLID 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ATTRID ATTRDATA}
#vset [split [lindex $ATTRID 0] :] {typeATTRID lengthATTRID}
set ATTRID [lindex $ATTRID 1]
#vset [split [lindex $ATTRDATA 0] :] {typeATTRDATA lengthATTRDATA}
set ATTRDATA [lindex $ATTRDATA 1]
}
if {!$ok} break
if {[string first L: [lindex $Lc_n1 0]] != 0} {set ok 0; break}
foreach COLHDR [lreplace $Lc_n1 0 0] {
if {[string first "A:" [lindex $COLHDR 0]] != 0} {set ok 0; break}
set COLHDR [lindex $COLHDR 1]
}
if {!$ok} break
if {[string first L: [lindex $Lr_n2 0]] != 0} {set ok 0; break}
foreach Lc_1 [lreplace $Lr_n2 0 0] {
if {[string first L: [lindex $Lc_1 0]] != 0} {set ok 0; break}
foreach TBLELT [lreplace $Lc_1 0 0] {
#vset [split [lindex $TBLELT 0] :] {typeTBLELT lengthTBLELT}
set TBLELT [lindex $TBLELT 1]
}
if {!$ok} break
}
if {!$ok} break
if { [lindex $L2_n3 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_n3 0 0] {TBLACK Lp_1}
if {[lindex $TBLACK 0] != "U1:1"} {set ok 0; break}
set TBLACK [lindex $TBLACK 1]
if {[string first L: [lindex $Lp_1 0]] != 0} {set ok 0; break}
foreach {ERRCODE ERRTEXT} [lreplace $Lp_1 0 0] {
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S14F1R | Get Attributes Request |
Sent by Host and Equipment |
Comment: List lengths can be 0, and OBJSPEC can be zero-length.
Format:
# S14F1R Tcl Receive message - add next line to setup
$spname whenever S14F1 [list recv_S14F1R $spname]
# receive procedure
proc recv_S14F1R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:5 OBJSPEC OBJTYPE {L:i OBJID} {L:q {L:3 ATTRID ATTRDATA ATTRRELN}} {L:a ATTRID}
# OBJSPEC A:n (varies) E39 structured text identifying an object, [object type:object id>]+
# OBJTYPE A:40 (varies) object class name, chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OBJID A:80 (varies) E39 object identifier 1-80 chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# ATTRID A:40 (varies) identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~. Does not begin or end with space.
# ATTRDATA A:n (varies) a specific attribute value of any data type
# ATTRRELN U1:1 (always) relationship of a value to an attribute value of an object
# ATTRID A:40 (varies) identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~. Does not begin or end with space.
if { [lindex $TSN_data 0] != "L:5" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJSPEC OBJTYPE Li Lq_n1 La_n2}
#vset [split [lindex $OBJSPEC 0] :] {typeOBJSPEC lengthOBJSPEC}
set OBJSPEC [lindex $OBJSPEC 1]
#vset [split [lindex $OBJTYPE 0] :] {typeOBJTYPE lengthOBJTYPE}
set OBJTYPE [lindex $OBJTYPE 1]
if {[string first L: [lindex $Li 0]] != 0} {set ok 0; break}
foreach OBJID [lreplace $Li 0 0] {
#vset [split [lindex $OBJID 0] :] {typeOBJID lengthOBJID}
set OBJID [lindex $OBJID 1]
}
if {!$ok} break
if {[string first L: [lindex $Lq_n1 0]] != 0} {set ok 0; break}
foreach L3_1 [lreplace $Lq_n1 0 0] {
if { [lindex $L3_1 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3_1 0 0] {ATTRID ATTRDATA ATTRRELN}
#vset [split [lindex $ATTRID 0] :] {typeATTRID lengthATTRID}
set ATTRID [lindex $ATTRID 1]
#vset [split [lindex $ATTRDATA 0] :] {typeATTRDATA lengthATTRDATA}
set ATTRDATA [lindex $ATTRDATA 1]
if {[lindex $ATTRRELN 0] != "U1:1"} {set ok 0; break}
set ATTRRELN [lindex $ATTRRELN 1]
}
if {!$ok} break
if {[string first L: [lindex $La_n2 0]] != 0} {set ok 0; break}
foreach ATTRID [lreplace $La_n2 0 0] {
#vset [split [lindex $ATTRID 0] :] {typeATTRID lengthATTRID}
set ATTRID [lindex $ATTRID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S14F2 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S14F1R
S14F2 | Attribute Data |
Sent by Host and Equipment |
# S14F2 Tcl Parse reply
set reply [secs_xact $spname S14F1R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 {L:n {L:2 OBJID {L:a {L:2 ATTRID ATTRDATA}}}} {L:2 OBJACK {L:p {L:2 ERRCODE ERRTEXT}}}
# OBJID A:80 (varies) E39 object identifier 1-80 chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# ATTRID A:40 (varies) identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~. Does not begin or end with space.
# ATTRDATA A:n (varies) a specific attribute value of any data type
# OBJACK U1:1 (always) acknowledge code, 0 ok, 1 error
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {Ln L2_n1}
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {OBJID La_2}
#vset [split [lindex $OBJID 0] :] {typeOBJID lengthOBJID}
set OBJID [lindex $OBJID 1]
if {[string first L: [lindex $La_2 0]] != 0} {set ok 0; break}
foreach L2_3 [lreplace $La_2 0 0] {
if { [lindex $L2_3 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_3 0 0] {ATTRID ATTRDATA}
#vset [split [lindex $ATTRID 0] :] {typeATTRID lengthATTRID}
set ATTRID [lindex $ATTRID 1]
#vset [split [lindex $ATTRDATA 0] :] {typeATTRDATA lengthATTRDATA}
set ATTRDATA [lindex $ATTRDATA 1]
}
if {!$ok} break
}
if {!$ok} break
if { [lindex $L2_n1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_n1 0 0] {OBJACK Lp_1}
if {[lindex $OBJACK 0] != "U1:1"} {set ok 0; break}
set OBJACK [lindex $OBJACK 1]
if {[string first L: [lindex $Lp_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lp_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S14F3R | Set Attributes |
Sent by Host and Equipment |
# S14F3R Tcl Receive message - add next line to setup
$spname whenever S14F3 [list recv_S14F3R $spname]
# receive procedure
proc recv_S14F3R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 OBJSPEC OBJTYPE {L:i OBJID} {L:n {L:2 ATTRID ATTRDATA}}
# OBJSPEC A:n (varies) E39 structured text identifying an object, [object type:object id>]+
# OBJTYPE A:40 (varies) object class name, chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OBJID A:80 (varies) E39 object identifier 1-80 chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# ATTRID A:40 (varies) identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~. Does not begin or end with space.
# ATTRDATA A:n (varies) a specific attribute value of any data type
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJSPEC OBJTYPE Li Ln_n1}
#vset [split [lindex $OBJSPEC 0] :] {typeOBJSPEC lengthOBJSPEC}
set OBJSPEC [lindex $OBJSPEC 1]
#vset [split [lindex $OBJTYPE 0] :] {typeOBJTYPE lengthOBJTYPE}
set OBJTYPE [lindex $OBJTYPE 1]
if {[string first L: [lindex $Li 0]] != 0} {set ok 0; break}
foreach OBJID [lreplace $Li 0 0] {
#vset [split [lindex $OBJID 0] :] {typeOBJID lengthOBJID}
set OBJID [lindex $OBJID 1]
}
if {!$ok} break
if {[string first L: [lindex $Ln_n1 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln_n1 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ATTRID ATTRDATA}
#vset [split [lindex $ATTRID 0] :] {typeATTRID lengthATTRID}
set ATTRID [lindex $ATTRID 1]
#vset [split [lindex $ATTRDATA 0] :] {typeATTRDATA lengthATTRDATA}
set ATTRDATA [lindex $ATTRDATA 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S14F4 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S14F3R
S14F4 | Set Attributes Reply |
Sent by Host and Equipment |
# S14F4 Tcl Parse reply
set reply [secs_xact $spname S14F3R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 {L:i {L:2 OBJID {L:n {L:2 ATTRID ATTRDATA}}}} {L:2 OBJACK {L:p {L:2 ERRCODE ERRTEXT}}}
# OBJID A:80 (varies) E39 object identifier 1-80 chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# ATTRID A:40 (varies) identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~. Does not begin or end with space.
# ATTRDATA A:n (varies) a specific attribute value of any data type
# OBJACK U1:1 (always) acknowledge code, 0 ok, 1 error
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {Li L2_n1}
if {[string first L: [lindex $Li 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Li 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {OBJID Ln_2}
#vset [split [lindex $OBJID 0] :] {typeOBJID lengthOBJID}
set OBJID [lindex $OBJID 1]
if {[string first L: [lindex $Ln_2 0]] != 0} {set ok 0; break}
foreach L2_3 [lreplace $Ln_2 0 0] {
if { [lindex $L2_3 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_3 0 0] {ATTRID ATTRDATA}
#vset [split [lindex $ATTRID 0] :] {typeATTRID lengthATTRID}
set ATTRID [lindex $ATTRID 1]
#vset [split [lindex $ATTRDATA 0] :] {typeATTRDATA lengthATTRDATA}
set ATTRDATA [lindex $ATTRDATA 1]
}
if {!$ok} break
}
if {!$ok} break
if { [lindex $L2_n1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_n1 0 0] {OBJACK Lp_1}
if {[lindex $OBJACK 0] != "U1:1"} {set ok 0; break}
set OBJACK [lindex $OBJACK 1]
if {[string first L: [lindex $Lp_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lp_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S14F5R | Get Type Data |
Sent by Host and Equipment |
Comment: Asks for the types of objects owned by the type of specified object
Format:
# S14F5R Tcl Receive message - add next line to setup
$spname whenever S14F5 [list recv_S14F5R $spname]
# receive procedure
proc recv_S14F5R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect OBJSPEC
# OBJSPEC A:n (varies) E39 structured text identifying an object, [object type:object id>]+
#vset [split [lindex $TSN_data 0] :] {typeOBJSPEC lengthOBJSPEC}
set OBJSPEC [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S14F6 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S14F5R
S14F6 | Type Data |
Sent by Host and Equipment |
# S14F6 Tcl Parse reply
set reply [secs_xact $spname S14F5R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 {L:n OBJTYPE} {L:2 OBJACK {L:p {L:2 ERRCODE ERRTEXT}}}
# OBJTYPE A:40 (varies) object class name, chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OBJACK U1:1 (always) acknowledge code, 0 ok, 1 error
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {Ln L2_n1}
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach OBJTYPE [lreplace $Ln 0 0] {
#vset [split [lindex $OBJTYPE 0] :] {typeOBJTYPE lengthOBJTYPE}
set OBJTYPE [lindex $OBJTYPE 1]
}
if {!$ok} break
if { [lindex $L2_n1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_n1 0 0] {OBJACK Lp_1}
if {[lindex $OBJACK 0] != "U1:1"} {set ok 0; break}
set OBJACK [lindex $OBJACK 1]
if {[string first L: [lindex $Lp_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lp_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S14F7R | Get Attribute Names for the types |
Sent by Host and Equipment |
# S14F7R Tcl Receive message - add next line to setup
$spname whenever S14F7 [list recv_S14F7R $spname]
# receive procedure
proc recv_S14F7R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 OBJSPEC {L:n OBJTYPE}
# OBJSPEC A:n (varies) E39 structured text identifying an object, [object type:object id>]+
# OBJTYPE A:40 (varies) object class name, chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJSPEC Ln}
#vset [split [lindex $OBJSPEC 0] :] {typeOBJSPEC lengthOBJSPEC}
set OBJSPEC [lindex $OBJSPEC 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach OBJTYPE [lreplace $Ln 0 0] {
#vset [split [lindex $OBJTYPE 0] :] {typeOBJTYPE lengthOBJTYPE}
set OBJTYPE [lindex $OBJTYPE 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S14F8 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S14F7R
S14F8 | Attribute Names of the object types |
Sent by Host and Equipment |
# S14F8 Tcl Parse reply
set reply [secs_xact $spname S14F7R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 {L:n {L:2 OBJTYPE {L:a ATTRID}}} {L:2 OBJACK {L:p {L:2 ERRCODE ERRTEXT}}}
# OBJTYPE A:40 (varies) object class name, chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# ATTRID A:40 (varies) identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~. Does not begin or end with space.
# OBJACK U1:1 (always) acknowledge code, 0 ok, 1 error
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {Ln L2_n1}
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {OBJTYPE La_2}
#vset [split [lindex $OBJTYPE 0] :] {typeOBJTYPE lengthOBJTYPE}
set OBJTYPE [lindex $OBJTYPE 1]
if {[string first L: [lindex $La_2 0]] != 0} {set ok 0; break}
foreach ATTRID [lreplace $La_2 0 0] {
#vset [split [lindex $ATTRID 0] :] {typeATTRID lengthATTRID}
set ATTRID [lindex $ATTRID 1]
}
if {!$ok} break
}
if {!$ok} break
if { [lindex $L2_n1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_n1 0 0] {OBJACK Lp_1}
if {[lindex $OBJACK 0] != "U1:1"} {set ok 0; break}
set OBJACK [lindex $OBJACK 1]
if {[string first L: [lindex $Lp_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lp_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S14F9R | Create Obj Request |
Sent by Host and Equipment |
# S14F9R Tcl Receive message - add next line to setup
$spname whenever S14F9 [list recv_S14F9R $spname]
# receive procedure
proc recv_S14F9R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 OBJSPEC OBJTYPE {L:a {L:2 ATTRID ATTRDATA}}
# OBJSPEC A:n (varies) E39 structured text identifying an object, [object type:object id>]+
# OBJTYPE A:40 (varies) object class name, chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# ATTRID A:40 (varies) identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~. Does not begin or end with space.
# ATTRDATA A:n (varies) a specific attribute value of any data type
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJSPEC OBJTYPE La}
#vset [split [lindex $OBJSPEC 0] :] {typeOBJSPEC lengthOBJSPEC}
set OBJSPEC [lindex $OBJSPEC 1]
#vset [split [lindex $OBJTYPE 0] :] {typeOBJTYPE lengthOBJTYPE}
set OBJTYPE [lindex $OBJTYPE 1]
if {[string first L: [lindex $La 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $La 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ATTRID ATTRDATA}
#vset [split [lindex $ATTRID 0] :] {typeATTRID lengthATTRID}
set ATTRID [lindex $ATTRID 1]
#vset [split [lindex $ATTRDATA 0] :] {typeATTRDATA lengthATTRDATA}
set ATTRDATA [lindex $ATTRDATA 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S14F10 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S14F9R
S14F10 | Create Obj Ack |
Sent by Host and Equipment |
# S14F10 Tcl Parse reply
set reply [secs_xact $spname S14F9R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:3 OBJSPEC {L:b {L:2 ATTRID ATTRDATA}} {L:2 OBJACK {L:p {L:2 ERRCODE ERRTEXT}}}
# OBJSPEC A:n (varies) E39 structured text identifying an object, [object type:object id>]+
# ATTRID A:40 (varies) identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~. Does not begin or end with space.
# ATTRDATA A:n (varies) a specific attribute value of any data type
# OBJACK U1:1 (always) acknowledge code, 0 ok, 1 error
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJSPEC Lb L2_n1}
#vset [split [lindex $OBJSPEC 0] :] {typeOBJSPEC lengthOBJSPEC}
set OBJSPEC [lindex $OBJSPEC 1]
if {[string first L: [lindex $Lb 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lb 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ATTRID ATTRDATA}
#vset [split [lindex $ATTRID 0] :] {typeATTRID lengthATTRID}
set ATTRID [lindex $ATTRID 1]
#vset [split [lindex $ATTRDATA 0] :] {typeATTRDATA lengthATTRDATA}
set ATTRDATA [lindex $ATTRDATA 1]
}
if {!$ok} break
if { [lindex $L2_n1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_n1 0 0] {OBJACK Lp_1}
if {[lindex $OBJACK 0] != "U1:1"} {set ok 0; break}
set OBJACK [lindex $OBJACK 1]
if {[string first L: [lindex $Lp_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lp_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S14F11R | Delete Obj Request |
Sent by Host and Equipment |
# S14F11R Tcl Receive message - add next line to setup
$spname whenever S14F11 [list recv_S14F11R $spname]
# receive procedure
proc recv_S14F11R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 OBJSPEC {L:a {L:2 ATTRID ATTRDATA}}
# OBJSPEC A:n (varies) E39 structured text identifying an object, [object type:object id>]+
# ATTRID A:40 (varies) identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~. Does not begin or end with space.
# ATTRDATA A:n (varies) a specific attribute value of any data type
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJSPEC La}
#vset [split [lindex $OBJSPEC 0] :] {typeOBJSPEC lengthOBJSPEC}
set OBJSPEC [lindex $OBJSPEC 1]
if {[string first L: [lindex $La 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $La 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ATTRID ATTRDATA}
#vset [split [lindex $ATTRID 0] :] {typeATTRID lengthATTRID}
set ATTRID [lindex $ATTRID 1]
#vset [split [lindex $ATTRDATA 0] :] {typeATTRDATA lengthATTRDATA}
set ATTRDATA [lindex $ATTRDATA 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S14F12 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S14F11R
S14F12 | Delete Obj Ack |
Sent by Host and Equipment |
# S14F12 Tcl Parse reply
set reply [secs_xact $spname S14F11R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 {L:b {L:2 ATTRID ATTRDATA}} {L:2 OBJACK {L:p {L:2 ERRCODE ERRTEXT}}}
# ATTRID A:40 (varies) identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~. Does not begin or end with space.
# ATTRDATA A:n (varies) a specific attribute value of any data type
# OBJACK U1:1 (always) acknowledge code, 0 ok, 1 error
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {Lb L2_n1}
if {[string first L: [lindex $Lb 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lb 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ATTRID ATTRDATA}
#vset [split [lindex $ATTRID 0] :] {typeATTRID lengthATTRID}
set ATTRID [lindex $ATTRID 1]
#vset [split [lindex $ATTRDATA 0] :] {typeATTRDATA lengthATTRDATA}
set ATTRDATA [lindex $ATTRDATA 1]
}
if {!$ok} break
if { [lindex $L2_n1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_n1 0 0] {OBJACK Lp_1}
if {[lindex $OBJACK 0] != "U1:1"} {set ok 0; break}
set OBJACK [lindex $OBJACK 1]
if {[string first L: [lindex $Lp_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lp_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S14F13R | Object Attach Request |
Sent by Host and Equipment |
# S14F13R Tcl Receive message - add next line to setup
$spname whenever S14F13 [list recv_S14F13R $spname]
# receive procedure
proc recv_S14F13R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 OBJSPEC {L:a {L:2 ATTRID ATTRDATA}}
# OBJSPEC A:n (varies) E39 structured text identifying an object, [object type:object id>]+
# ATTRID A:40 (varies) identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~. Does not begin or end with space.
# ATTRDATA A:n (varies) a specific attribute value of any data type
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJSPEC La}
#vset [split [lindex $OBJSPEC 0] :] {typeOBJSPEC lengthOBJSPEC}
set OBJSPEC [lindex $OBJSPEC 1]
if {[string first L: [lindex $La 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $La 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ATTRID ATTRDATA}
#vset [split [lindex $ATTRID 0] :] {typeATTRID lengthATTRID}
set ATTRID [lindex $ATTRID 1]
#vset [split [lindex $ATTRDATA 0] :] {typeATTRDATA lengthATTRDATA}
set ATTRDATA [lindex $ATTRDATA 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S14F14 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S14F13R
S14F14 | Object Attach Ack |
Sent by Host and Equipment |
# S14F14 Tcl Parse reply
set reply [secs_xact $spname S14F13R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:3 OBJTOKEN {L:b {L:2 ATTRID ATTRDATA}} {L:2 OBJACK {L:p {L:2 ERRCODE ERRTEXT}}}
# OBJTOKEN U4:1 (always) token used for authorization
# ATTRID A:40 (varies) identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~. Does not begin or end with space.
# ATTRDATA A:n (varies) a specific attribute value of any data type
# OBJACK U1:1 (always) acknowledge code, 0 ok, 1 error
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJTOKEN Lb L2_n1}
if {[lindex $OBJTOKEN 0] != "U4:1"} {set ok 0; break}
set OBJTOKEN [lindex $OBJTOKEN 1]
if {[string first L: [lindex $Lb 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lb 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ATTRID ATTRDATA}
#vset [split [lindex $ATTRID 0] :] {typeATTRID lengthATTRID}
set ATTRID [lindex $ATTRID 1]
#vset [split [lindex $ATTRDATA 0] :] {typeATTRDATA lengthATTRDATA}
set ATTRDATA [lindex $ATTRDATA 1]
}
if {!$ok} break
if { [lindex $L2_n1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_n1 0 0] {OBJACK Lp_1}
if {[lindex $OBJACK 0] != "U1:1"} {set ok 0; break}
set OBJACK [lindex $OBJACK 1]
if {[string first L: [lindex $Lp_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lp_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S14F15R | Attached Obj Action Req. |
Sent by Host and Equipment |
# S14F15R Tcl Receive message - add next line to setup
$spname whenever S14F15 [list recv_S14F15R $spname]
# receive procedure
proc recv_S14F15R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 OBJSPEC OBJCMD OBJTOKEN {L:a {L:2 ATTRID ATTRDATA}}
# OBJSPEC A:n (varies) E39 structured text identifying an object, [object type:object id>]+
# OBJCMD U1:1 (always) Specifies an action to be performed by an object
# OBJTOKEN U4:1 (always) token used for authorization
# ATTRID A:40 (varies) identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~. Does not begin or end with space.
# ATTRDATA A:n (varies) a specific attribute value of any data type
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJSPEC OBJCMD OBJTOKEN La}
#vset [split [lindex $OBJSPEC 0] :] {typeOBJSPEC lengthOBJSPEC}
set OBJSPEC [lindex $OBJSPEC 1]
if {[lindex $OBJCMD 0] != "U1:1"} {set ok 0; break}
set OBJCMD [lindex $OBJCMD 1]
if {[lindex $OBJTOKEN 0] != "U4:1"} {set ok 0; break}
set OBJTOKEN [lindex $OBJTOKEN 1]
if {[string first L: [lindex $La 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $La 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ATTRID ATTRDATA}
#vset [split [lindex $ATTRID 0] :] {typeATTRID lengthATTRID}
set ATTRID [lindex $ATTRID 1]
#vset [split [lindex $ATTRDATA 0] :] {typeATTRDATA lengthATTRDATA}
set ATTRDATA [lindex $ATTRDATA 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S14F16 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S14F15R
S14F16 | Attached Obj Action Ack |
Sent by Host and Equipment |
# S14F16 Tcl Parse reply
set reply [secs_xact $spname S14F15R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 {L:b {L:2 ATTRID ATTRDATA}} {L:2 OBJACK {L:p {L:2 ERRCODE ERRTEXT}}}
# ATTRID A:40 (varies) identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~. Does not begin or end with space.
# ATTRDATA A:n (varies) a specific attribute value of any data type
# OBJACK U1:1 (always) acknowledge code, 0 ok, 1 error
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {Lb L2_n1}
if {[string first L: [lindex $Lb 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lb 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ATTRID ATTRDATA}
#vset [split [lindex $ATTRID 0] :] {typeATTRID lengthATTRID}
set ATTRID [lindex $ATTRID 1]
#vset [split [lindex $ATTRDATA 0] :] {typeATTRDATA lengthATTRDATA}
set ATTRDATA [lindex $ATTRDATA 1]
}
if {!$ok} break
if { [lindex $L2_n1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_n1 0 0] {OBJACK Lp_1}
if {[lindex $OBJACK 0] != "U1:1"} {set ok 0; break}
set OBJACK [lindex $OBJACK 1]
if {[string first L: [lindex $Lp_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lp_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S14F17R | Supervised Obj Action Req |
Sent by Host and Equipment |
# S14F17R Tcl Receive message - add next line to setup
$spname whenever S14F17 [list recv_S14F17R $spname]
# receive procedure
proc recv_S14F17R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 OBJSPEC OBJCMD TARGETSPEC {L:a {L:2 ATTRID ATTRDATA}}
# OBJSPEC A:n (varies) E39 structured text identifying an object, [object type:object id>]+
# OBJCMD U1:1 (always) Specifies an action to be performed by an object
# TARGETSPEC A:40 (always) Specifier of target object
# ATTRID A:40 (varies) identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~. Does not begin or end with space.
# ATTRDATA A:n (varies) a specific attribute value of any data type
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJSPEC OBJCMD TARGETSPEC La}
#vset [split [lindex $OBJSPEC 0] :] {typeOBJSPEC lengthOBJSPEC}
set OBJSPEC [lindex $OBJSPEC 1]
if {[lindex $OBJCMD 0] != "U1:1"} {set ok 0; break}
set OBJCMD [lindex $OBJCMD 1]
if {[string first "A:" [lindex $TARGETSPEC 0]] != 0} {set ok 0; break}
set TARGETSPEC [lindex $TARGETSPEC 1]
if {[string first L: [lindex $La 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $La 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ATTRID ATTRDATA}
#vset [split [lindex $ATTRID 0] :] {typeATTRID lengthATTRID}
set ATTRID [lindex $ATTRID 1]
#vset [split [lindex $ATTRDATA 0] :] {typeATTRDATA lengthATTRDATA}
set ATTRDATA [lindex $ATTRDATA 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S14F18 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S14F17R
S14F18 | Supervised Obj Action Ack |
Sent by Host and Equipment |
# S14F18 Tcl Parse reply
set reply [secs_xact $spname S14F17R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 {L:b {L:2 ATTRID ATTRDATA}} {L:2 OBJACK {L:p {L:2 ERRCODE ERRTEXT}}}
# ATTRID A:40 (varies) identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~. Does not begin or end with space.
# ATTRDATA A:n (varies) a specific attribute value of any data type
# OBJACK U1:1 (always) acknowledge code, 0 ok, 1 error
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {Lb L2_n1}
if {[string first L: [lindex $Lb 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lb 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ATTRID ATTRDATA}
#vset [split [lindex $ATTRID 0] :] {typeATTRID lengthATTRID}
set ATTRID [lindex $ATTRID 1]
#vset [split [lindex $ATTRDATA 0] :] {typeATTRDATA lengthATTRDATA}
set ATTRDATA [lindex $ATTRDATA 1]
}
if {!$ok} break
if { [lindex $L2_n1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_n1 0 0] {OBJACK Lp_1}
if {[lindex $OBJACK 0] != "U1:1"} {set ok 0; break}
set OBJACK [lindex $OBJACK 1]
if {[string first L: [lindex $Lp_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lp_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S14F19R | Generic Service Req |
Sent by Host Only |
# S14F19R Tcl Receive message - add next line to setup
$spname whenever S14F19 [list recv_S14F19R $spname]
# receive procedure
proc recv_S14F19R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:5 DATAID OPID OBJSPEC SVCNAME {L:m {L:2 SPNAME SPVAL}}
# DATAID U4:1 (varies) an identifier to correlate related messages
# OPID U4:1 (varies) operation identifier
# OBJSPEC A:n (varies) E39 structured text identifying an object, [object type:object id>]+
# SVCNAME A:n (always) service name
# SPNAME A:n (always) service parameter name
# SPVAL A:n (varies) service parameter value, any format type
if { [lindex $TSN_data 0] != "L:5" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID OPID OBJSPEC SVCNAME Lm}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $OPID 0] :] {typeOPID lengthOPID}
set OPID [lindex $OPID 1]
#vset [split [lindex $OBJSPEC 0] :] {typeOBJSPEC lengthOBJSPEC}
set OBJSPEC [lindex $OBJSPEC 1]
if {[string first "A:" [lindex $SVCNAME 0]] != 0} {set ok 0; break}
set SVCNAME [lindex $SVCNAME 1]
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lm 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {SPNAME SPVAL}
if {[string first "A:" [lindex $SPNAME 0]] != 0} {set ok 0; break}
set SPNAME [lindex $SPNAME 1]
#vset [split [lindex $SPVAL 0] :] {typeSPVAL lengthSPVAL}
set SPVAL [lindex $SPVAL 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S14F20 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S14F19R
S14F20 | Generic Service Ack |
Sent by Host and Equipment |
Comment: it is not a mistake that SVCACK is included twice
Format:
# S14F20 Tcl Parse reply
set reply [secs_xact $spname S14F19R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:4 SVCACK LINKID {L:n {L:2 SPNAME SPVAL}} {L:2 SVCACK {L:p {L:2 ERRCODE ERRTEXT}}}
# SVCACK B:1 (always) service acknowledge code
# LINKID U4:1 (always) correlates the RMOPID value in a request to a completion report
# SPNAME A:n (always) service parameter name
# SPVAL A:n (varies) service parameter value, any format type
# SVCACK B:1 (always) service acknowledge code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {SVCACK LINKID Ln L2_n1}
if {[lindex $SVCACK 0] != "B:1"} {set ok 0; break}
set SVCACK [expr [lindex $SVCACK 1]] ;# expr converts 0xhh to int
if {[lindex $LINKID 0] != "U4:1"} {set ok 0; break}
set LINKID [lindex $LINKID 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {SPNAME SPVAL}
if {[string first "A:" [lindex $SPNAME 0]] != 0} {set ok 0; break}
set SPNAME [lindex $SPNAME 1]
#vset [split [lindex $SPVAL 0] :] {typeSPVAL lengthSPVAL}
set SPVAL [lindex $SPVAL 1]
}
if {!$ok} break
if { [lindex $L2_n1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_n1 0 0] {SVCACK Lp_1}
if {[lindex $SVCACK 0] != "B:1"} {set ok 0; break}
set SVCACK [expr [lindex $SVCACK 1]] ;# expr converts 0xhh to int
if {[string first L: [lindex $Lp_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lp_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S14F21R | Generic Service Completion |
Sent by Host and Equipment |
# S14F21R Tcl Receive message - add next line to setup
$spname whenever S14F21 [list recv_S14F21R $spname]
# receive procedure
proc recv_S14F21R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:5 DATAID OPID LINKID {L:n {L:2 SPNAME SPVAL}} {L:2 SVCACK {L:p {L:2 ERRCODE ERRTEXT}}}
# DATAID U4:1 (varies) an identifier to correlate related messages
# OPID U4:1 (varies) operation identifier
# LINKID U4:1 (always) correlates the RMOPID value in a request to a completion report
# SPNAME A:n (always) service parameter name
# SPVAL A:n (varies) service parameter value, any format type
# SVCACK B:1 (always) service acknowledge code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:5" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID OPID LINKID Ln L2_n1}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $OPID 0] :] {typeOPID lengthOPID}
set OPID [lindex $OPID 1]
if {[lindex $LINKID 0] != "U4:1"} {set ok 0; break}
set LINKID [lindex $LINKID 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {SPNAME SPVAL}
if {[string first "A:" [lindex $SPNAME 0]] != 0} {set ok 0; break}
set SPNAME [lindex $SPNAME 1]
#vset [split [lindex $SPVAL 0] :] {typeSPVAL lengthSPVAL}
set SPVAL [lindex $SPVAL 1]
}
if {!$ok} break
if { [lindex $L2_n1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_n1 0 0] {SVCACK Lp_1}
if {[lindex $SVCACK 0] != "B:1"} {set ok 0; break}
set SVCACK [expr [lindex $SVCACK 1]] ;# expr converts 0xhh to int
if {[string first L: [lindex $Lp_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lp_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S14F22 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S14F21R
S14F22 | Generic Service Comp Ack |
Sent by Host and Equipment |
# S14F22 Tcl Parse reply
set reply [secs_xact $spname S14F21R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect DATAACK
# DATAACK B:1 (always) Acknowledgement code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set DATAACK [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S14F23R | Multi-block Generic Service Inquire |
Sent by Host and Equipment |
Comment: You are advised not to implement this message.
Format:
# S14F23R Tcl Receive message - add next line to setup
$spname whenever S14F23 [list recv_S14F23R $spname]
# receive procedure
proc recv_S14F23R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 DATAID DATALENGTH
# DATAID U4:1 (varies) an identifier to correlate related messages
# DATALENGTH U4:1 (varies) total bytes of the message body
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID DATALENGTH}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $DATALENGTH 0] :] {typeDATALENGTH lengthDATALENGTH}
set DATALENGTH [lindex $DATALENGTH 1]
if {$send_reply} {
# TBD create reply data
$spname put S14F24 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S14F23R
S14F24 | Multi-block Generic Service Grant |
Sent by Host and Equipment |
# S14F24 Tcl Parse reply
set reply [secs_xact $spname S14F23R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect GRANT
# GRANT B:1 (always) multiblock grant code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set GRANT [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S14F25R | Service Name Request |
Sent by Host and Equipment |
# S14F25R Tcl Receive message - add next line to setup
$spname whenever S14F25 [list recv_S14F25R $spname]
# receive procedure
proc recv_S14F25R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 OBJSPEC {L:n OBJTYPE}
# OBJSPEC A:n (varies) E39 structured text identifying an object, [object type:object id>]+
# OBJTYPE A:40 (varies) object class name, chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJSPEC Ln}
#vset [split [lindex $OBJSPEC 0] :] {typeOBJSPEC lengthOBJSPEC}
set OBJSPEC [lindex $OBJSPEC 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach OBJTYPE [lreplace $Ln 0 0] {
#vset [split [lindex $OBJTYPE 0] :] {typeOBJTYPE lengthOBJTYPE}
set OBJTYPE [lindex $OBJTYPE 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S14F26 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S14F25R
S14F26 | Service Name Data |
Sent by Host and Equipment |
# S14F26 Tcl Parse reply
set reply [secs_xact $spname S14F25R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 {L:n {L:2 OBJTYPE {L:a SVCNAME}}} {L:2 OBJACK {L:p {L:2 ERRCODE ERRTEXT}}}
# OBJTYPE A:40 (varies) object class name, chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# SVCNAME A:n (always) service name
# OBJACK U1:1 (always) acknowledge code, 0 ok, 1 error
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {Ln L2_n1}
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {OBJTYPE La_2}
#vset [split [lindex $OBJTYPE 0] :] {typeOBJTYPE lengthOBJTYPE}
set OBJTYPE [lindex $OBJTYPE 1]
if {[string first L: [lindex $La_2 0]] != 0} {set ok 0; break}
foreach SVCNAME [lreplace $La_2 0 0] {
if {[string first "A:" [lindex $SVCNAME 0]] != 0} {set ok 0; break}
set SVCNAME [lindex $SVCNAME 1]
}
if {!$ok} break
}
if {!$ok} break
if { [lindex $L2_n1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_n1 0 0] {OBJACK Lp_1}
if {[lindex $OBJACK 0] != "U1:1"} {set ok 0; break}
set OBJACK [lindex $OBJACK 1]
if {[string first L: [lindex $Lp_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lp_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S14F27R | Service Parameter Name Req |
Sent by Host and Equipment |
# S14F27R Tcl Receive message - add next line to setup
$spname whenever S14F27 [list recv_S14F27R $spname]
# receive procedure
proc recv_S14F27R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 OBJSPEC OBJTYPE {L:n SVCNAME}
# OBJSPEC A:n (varies) E39 structured text identifying an object, [object type:object id>]+
# OBJTYPE A:40 (varies) object class name, chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# SVCNAME A:n (always) service name
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJSPEC OBJTYPE Ln}
#vset [split [lindex $OBJSPEC 0] :] {typeOBJSPEC lengthOBJSPEC}
set OBJSPEC [lindex $OBJSPEC 1]
#vset [split [lindex $OBJTYPE 0] :] {typeOBJTYPE lengthOBJTYPE}
set OBJTYPE [lindex $OBJTYPE 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach SVCNAME [lreplace $Ln 0 0] {
if {[string first "A:" [lindex $SVCNAME 0]] != 0} {set ok 0; break}
set SVCNAME [lindex $SVCNAME 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S14F28 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S14F27R
S14F28 | Service Parameter Name Data |
Sent by Host and Equipment |
# S14F28 Tcl Parse reply
set reply [secs_xact $spname S14F27R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 {L:n {L:2 SVCNAME {L:a SPNAME}}} {L:2 OBJACK {L:p {L:2 ERRCODE ERRTEXT}}}
# SVCNAME A:n (always) service name
# SPNAME A:n (always) service parameter name
# OBJACK U1:1 (always) acknowledge code, 0 ok, 1 error
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {Ln L2_n1}
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {SVCNAME La_2}
if {[string first "A:" [lindex $SVCNAME 0]] != 0} {set ok 0; break}
set SVCNAME [lindex $SVCNAME 1]
if {[string first L: [lindex $La_2 0]] != 0} {set ok 0; break}
foreach SPNAME [lreplace $La_2 0 0] {
if {[string first "A:" [lindex $SPNAME 0]] != 0} {set ok 0; break}
set SPNAME [lindex $SPNAME 1]
}
if {!$ok} break
}
if {!$ok} break
if { [lindex $L2_n1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_n1 0 0] {OBJACK Lp_1}
if {[lindex $OBJACK 0] != "U1:1"} {set ok 0; break}
set OBJACK [lindex $OBJACK 1]
if {[string first L: [lindex $Lp_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lp_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S15F1R | Recipe Management Multi-Block Inquire |
Sent by Host and Equipment |
Comment: E5 fails to mention the message type is optional for HSMS
Format:
# S15F1R Tcl Receive message - add next line to setup
$spname whenever S15F1 [list recv_S15F1R $spname]
# receive procedure
proc recv_S15F1R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 DATAID RCPSPEC RMDATASIZE
# DATAID U4:1 (varies) an identifier to correlate related messages
# RCPSPEC A:n (always) recipe specifier
# RMDATASIZE U4:1 (varies) the maximum total message body length of a SECS-II message
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID RCPSPEC RMDATASIZE}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
if {[string first "A:" [lindex $RCPSPEC 0]] != 0} {set ok 0; break}
set RCPSPEC [lindex $RCPSPEC 1]
#vset [split [lindex $RMDATASIZE 0] :] {typeRMDATASIZE lengthRMDATASIZE}
set RMDATASIZE [lindex $RMDATASIZE 1]
if {$send_reply} {
# TBD create reply data
$spname put S15F2 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S15F1R
S15F2 | Recipe Management Multi-block Grant |
Sent by Host and Equipment |
# S15F2 Tcl Parse reply
set reply [secs_xact $spname S15F1R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect RMGRNT
# RMGRNT B:1 (always) grant code, 0 ok
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set RMGRNT [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S15F3R | Recipe Namespace Action Req |
Sent by Host and Equipment |
# S15F3R Tcl Receive message - add next line to setup
$spname whenever S15F3 [list recv_S15F3R $spname]
# receive procedure
proc recv_S15F3R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 RMNSSPEC RMNSCMD
# RMNSSPEC A:n (always) object id of a recipe namespace
# RMNSCMD U1:1 (always) recipe namespace command
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RMNSSPEC RMNSCMD}
if {[string first "A:" [lindex $RMNSSPEC 0]] != 0} {set ok 0; break}
set RMNSSPEC [lindex $RMNSSPEC 1]
if {[lindex $RMNSCMD 0] != "U1:1"} {set ok 0; break}
set RMNSCMD [lindex $RMNSCMD 1]
if {$send_reply} {
# TBD create reply data
$spname put S15F4 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S15F3R
S15F4 | Recipe Namespace Action |
Sent by Host and Equipment |
# S15F4 Tcl Parse reply
set reply [secs_xact $spname S15F3R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}
# RMACK U1:1 (always) recipe managment completion code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RMACK Lp}
if {[lindex $RMACK 0] != "U1:1"} {set ok 0; break}
set RMACK [lindex $RMACK 1]
if {[string first L: [lindex $Lp 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lp 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S15F5R | Recipe Namespace Rename Req |
Sent by Host and Equipment |
# S15F5R Tcl Receive message - add next line to setup
$spname whenever S15F5 [list recv_S15F5R $spname]
# receive procedure
proc recv_S15F5R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 RMNSSPEC RMNEWNS
# RMNSSPEC A:n (always) object id of a recipe namespace
# RMNEWNS A:n (always) new name for a recipe namespace
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RMNSSPEC RMNEWNS}
if {[string first "A:" [lindex $RMNSSPEC 0]] != 0} {set ok 0; break}
set RMNSSPEC [lindex $RMNSSPEC 1]
if {[string first "A:" [lindex $RMNEWNS 0]] != 0} {set ok 0; break}
set RMNEWNS [lindex $RMNEWNS 1]
if {$send_reply} {
# TBD create reply data
$spname put S15F6 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S15F5R
S15F6 | Recipe Namespace Rename Ack |
Sent by Host and Equipment |
# S15F6 Tcl Parse reply
set reply [secs_xact $spname S15F5R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}
# RMACK U1:1 (always) recipe managment completion code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RMACK Lp}
if {[lindex $RMACK 0] != "U1:1"} {set ok 0; break}
set RMACK [lindex $RMACK 1]
if {[string first L: [lindex $Lp 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lp 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S15F7R | Recipe Space Req |
Sent by Host and Equipment |
# S15F7R Tcl Receive message - add next line to setup
$spname whenever S15F7 [list recv_S15F7R $spname]
# receive procedure
proc recv_S15F7R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect OBJSPEC
# OBJSPEC A:n (varies) E39 structured text identifying an object, [object type:object id>]+
#vset [split [lindex $TSN_data 0] :] {typeOBJSPEC lengthOBJSPEC}
set OBJSPEC [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S15F8 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S15F7R
S15F8 | Recipe Space Data |
Sent by Host and Equipment |
# S15F8 Tcl Parse reply
set reply [secs_xact $spname S15F7R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 RMSPACE {L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}}
# RMSPACE U4:1 (varies) the amount of storage available in bytes for at least one recipe
# RMACK U1:1 (always) recipe managment completion code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RMSPACE L2}
#vset [split [lindex $RMSPACE 0] :] {typeRMSPACE lengthRMSPACE}
set RMSPACE [lindex $RMSPACE 1]
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {RMACK Lp_1}
if {[lindex $RMACK 0] != "U1:1"} {set ok 0; break}
set RMACK [lindex $RMACK 1]
if {[string first L: [lindex $Lp_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lp_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S15F9R | Recipe Status Request |
Sent by Host and Equipment |
# S15F9R Tcl Receive message - add next line to setup
$spname whenever S15F9 [list recv_S15F9R $spname]
# receive procedure
proc recv_S15F9R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect RCPSPEC
# RCPSPEC A:n (always) recipe specifier
if {[string first "A:" [lindex $TSN_data 0]] != 0} {set ok 0; break}
set RCPSPEC [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S15F10 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S15F9R
S15F10 | Recipe Status Data |
Sent by Host and Equipment |
# S15F10 Tcl Parse reply
set reply [secs_xact $spname S15F9R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:3 RCPSTAT RCPVERS {L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}}
# RCPSTAT U1:1 (always) Recipe status code
# RCPVERS A:n (always) recipe version
# RMACK U1:1 (always) recipe managment completion code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RCPSTAT RCPVERS L2}
if {[lindex $RCPSTAT 0] != "U1:1"} {set ok 0; break}
set RCPSTAT [lindex $RCPSTAT 1]
if {[string first "A:" [lindex $RCPVERS 0]] != 0} {set ok 0; break}
set RCPVERS [lindex $RCPVERS 1]
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {RMACK Lp_1}
if {[lindex $RMACK 0] != "U1:1"} {set ok 0; break}
set RMACK [lindex $RMACK 1]
if {[string first L: [lindex $Lp_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lp_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S15F11R | Recipe Version Request |
Sent by Host and Equipment |
# S15F11R Tcl Receive message - add next line to setup
$spname whenever S15F11 [list recv_S15F11R $spname]
# receive procedure
proc recv_S15F11R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 RMNSSPEC RCPCLASS RCPNAME AGENT
# RMNSSPEC A:n (always) object id of a recipe namespace
# RCPCLASS A:n (always) Recipe class
# RCPNAME A:n (always) recipe name
# AGENT A:n (always) no description, no max length
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RMNSSPEC RCPCLASS RCPNAME AGENT}
if {[string first "A:" [lindex $RMNSSPEC 0]] != 0} {set ok 0; break}
set RMNSSPEC [lindex $RMNSSPEC 1]
if {[string first "A:" [lindex $RCPCLASS 0]] != 0} {set ok 0; break}
set RCPCLASS [lindex $RCPCLASS 1]
if {[string first "A:" [lindex $RCPNAME 0]] != 0} {set ok 0; break}
set RCPNAME [lindex $RCPNAME 1]
if {[string first "A:" [lindex $AGENT 0]] != 0} {set ok 0; break}
set AGENT [lindex $AGENT 1]
if {$send_reply} {
# TBD create reply data
$spname put S15F12 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S15F11R
S15F12 | Recipe Version Data |
Sent by Host and Equipment |
# S15F12 Tcl Parse reply
set reply [secs_xact $spname S15F11R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:3 AGENT RCPVERS {L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}}
# AGENT A:n (always) no description, no max length
# RCPVERS A:n (always) recipe version
# RMACK U1:1 (always) recipe managment completion code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {AGENT RCPVERS L2}
if {[string first "A:" [lindex $AGENT 0]] != 0} {set ok 0; break}
set AGENT [lindex $AGENT 1]
if {[string first "A:" [lindex $RCPVERS 0]] != 0} {set ok 0; break}
set RCPVERS [lindex $RCPVERS 1]
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {RMACK Lp_1}
if {[lindex $RMACK 0] != "U1:1"} {set ok 0; break}
set RMACK [lindex $RMACK 1]
if {[string first L: [lindex $Lp_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lp_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S15F13R | Recipe Create Req |
Sent by Host and Equipment |
# S15F13R Tcl Receive message - add next line to setup
$spname whenever S15F13 [list recv_S15F13R $spname]
# receive procedure
proc recv_S15F13R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:5 DATAID RCPUPDT RCPSPEC {L:m {L:2 RCPATTRID RCPATTRDATA}} RCPBODY
# DATAID U4:1 (varies) an identifier to correlate related messages
# RCPUPDT TF:1 (always) true for a recipe update, false for create
# RCPSPEC A:n (always) recipe specifier
# RCPATTRID A:n (always) the name of a recipe attribute, but not used to indicate the recipe identifier
# RCPATTRDATA A:n (varies) the value of a recipe attribute, any type of data including list
# RCPBODY (list)B:n (varies) Recipe body
if { [lindex $TSN_data 0] != "L:5" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID RCPUPDT RCPSPEC Lm RCPBODY}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
if {[lindex $RCPUPDT 0] != "TF:1"} {set ok 0; break}
set RCPUPDT [lindex $RCPUPDT 1]
if {[string first "A:" [lindex $RCPSPEC 0]] != 0} {set ok 0; break}
set RCPSPEC [lindex $RCPSPEC 1]
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lm 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {RCPATTRID RCPATTRDATA}
if {[string first "A:" [lindex $RCPATTRID 0]] != 0} {set ok 0; break}
set RCPATTRID [lindex $RCPATTRID 1]
#vset [split [lindex $RCPATTRDATA 0] :] {typeRCPATTRDATA lengthRCPATTRDATA}
set RCPATTRDATA [lindex $RCPATTRDATA 1]
}
if {!$ok} break
#vset [split [lindex $RCPBODY 0] :] {typeRCPBODY lengthRCPBODY}
# convert list of type B 0xhh to int using expr
set RCPBODY {}; foreach v [lreplace $RCPBODY 0 0] {lappend RCPBODY [expr {$v}]}
if {$send_reply} {
# TBD create reply data
$spname put S15F14 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S15F13R
S15F14 | Recipe Create Ack |
Sent by Host and Equipment |
# S15F14 Tcl Parse reply
set reply [secs_xact $spname S15F13R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}
# RMACK U1:1 (always) recipe managment completion code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RMACK Lp}
if {[lindex $RMACK 0] != "U1:1"} {set ok 0; break}
set RMACK [lindex $RMACK 1]
if {[string first L: [lindex $Lp 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lp 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S15F15R | Recipe Store Req |
Sent by Host and Equipment |
Comment: L:2* can be L:2 or L:0; E5 documentation is inadequate for L:q other than L:3
Format:
# S15F15R Tcl Receive message - add next line to setup
$spname whenever S15F15 [list recv_S15F15R $spname]
# receive procedure
proc recv_S15F15R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 DATAID RCPSPEC RCPSECCODE {L:3 {L:2* RCPSECNM {L:g {L:2 RCPATTRID RCPATTRDATA}}} RCPBODY {L:m {L:2 RCPSECNM {L:a {L:2 RCPATTRID RCPATTRDATA}}}}}
# DATAID U4:1 (varies) an identifier to correlate related messages
# RCPSPEC A:n (always) recipe specifier
# RCPSECCODE B:1 (always) indicates the sections of a recipe
# RCPSECNM A:n (always) Recipe section name, "Generic", "Body", "ASDS"
# RCPATTRID A:n (always) the name of a recipe attribute, but not used to indicate the recipe identifier
# RCPATTRDATA A:n (varies) the value of a recipe attribute, any type of data including list
# RCPBODY (list)B:n (varies) Recipe body
# RCPSECNM A:n (always) Recipe section name, "Generic", "Body", "ASDS"
# RCPATTRID A:n (always) the name of a recipe attribute, but not used to indicate the recipe identifier
# RCPATTRDATA A:n (varies) the value of a recipe attribute, any type of data including list
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID RCPSPEC RCPSECCODE L3}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
if {[string first "A:" [lindex $RCPSPEC 0]] != 0} {set ok 0; break}
set RCPSPEC [lindex $RCPSPEC 1]
if {[lindex $RCPSECCODE 0] != "B:1"} {set ok 0; break}
set RCPSECCODE [expr [lindex $RCPSECCODE 1]] ;# expr converts 0xhh to int
if { [lindex $L3 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3 0 0] {L2opt_1 RCPBODY Lm_1_n1}
if { [lindex $L2opt_1 0] == "L:2" } { ;# 2 optional items found
vset [lreplace $L2opt_1 0 0] {RCPSECNM Lg_2}
if {[string first "A:" [lindex $RCPSECNM 0]] != 0} {set ok 0; break}
set RCPSECNM [lindex $RCPSECNM 1]
if {[string first L: [lindex $Lg_2 0]] != 0} {set ok 0; break}
foreach L2_3 [lreplace $Lg_2 0 0] {
if { [lindex $L2_3 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_3 0 0] {RCPATTRID RCPATTRDATA}
if {[string first "A:" [lindex $RCPATTRID 0]] != 0} {set ok 0; break}
set RCPATTRID [lindex $RCPATTRID 1]
#vset [split [lindex $RCPATTRDATA 0] :] {typeRCPATTRDATA lengthRCPATTRDATA}
set RCPATTRDATA [lindex $RCPATTRDATA 1]
}
if {!$ok} break
}
#vset [split [lindex $RCPBODY 0] :] {typeRCPBODY lengthRCPBODY}
# convert list of type B 0xhh to int using expr
set RCPBODY {}; foreach v [lreplace $RCPBODY 0 0] {lappend RCPBODY [expr {$v}]}
if {[string first L: [lindex $Lm_1_n1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lm_1_n1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {RCPSECNM La_3}
if {[string first "A:" [lindex $RCPSECNM 0]] != 0} {set ok 0; break}
set RCPSECNM [lindex $RCPSECNM 1]
if {[string first L: [lindex $La_3 0]] != 0} {set ok 0; break}
foreach L2_4 [lreplace $La_3 0 0] {
if { [lindex $L2_4 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_4 0 0] {RCPATTRID RCPATTRDATA}
if {[string first "A:" [lindex $RCPATTRID 0]] != 0} {set ok 0; break}
set RCPATTRID [lindex $RCPATTRID 1]
#vset [split [lindex $RCPATTRDATA 0] :] {typeRCPATTRDATA lengthRCPATTRDATA}
set RCPATTRDATA [lindex $RCPATTRDATA 1]
}
if {!$ok} break
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S15F16 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S15F15R
S15F16 | Recipe Store Ack |
Sent by Host and Equipment |
# S15F16 Tcl Parse reply
set reply [secs_xact $spname S15F15R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 RCPSECCODE {L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}}
# RCPSECCODE B:1 (always) indicates the sections of a recipe
# RMACK U1:1 (always) recipe managment completion code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RCPSECCODE L2}
if {[lindex $RCPSECCODE 0] != "B:1"} {set ok 0; break}
set RCPSECCODE [expr [lindex $RCPSECCODE 1]] ;# expr converts 0xhh to int
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {RMACK Lp_1}
if {[lindex $RMACK 0] != "U1:1"} {set ok 0; break}
set RMACK [lindex $RMACK 1]
if {[string first L: [lindex $Lp_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lp_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S15F17R | Recipe Retrieve Req |
Sent by Host and Equipment |
# S15F17R Tcl Receive message - add next line to setup
$spname whenever S15F17 [list recv_S15F17R $spname]
# receive procedure
proc recv_S15F17R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 RCPSPEC RCPSECCODE
# RCPSPEC A:n (always) recipe specifier
# RCPSECCODE B:1 (always) indicates the sections of a recipe
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RCPSPEC RCPSECCODE}
if {[string first "A:" [lindex $RCPSPEC 0]] != 0} {set ok 0; break}
set RCPSPEC [lindex $RCPSPEC 1]
if {[lindex $RCPSECCODE 0] != "B:1"} {set ok 0; break}
set RCPSECCODE [expr [lindex $RCPSECCODE 1]] ;# expr converts 0xhh to int
if {$send_reply} {
# TBD create reply data
$spname put S15F18 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S15F17R
S15F18 | Recipe Retrieve Data |
Sent by Host and Equipment |
# S15F18 Tcl Parse reply
set reply [secs_xact $spname S15F17R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 {L:q {L:r RCPSECNM {L:g {L:2 RCPATTRID RCPATTRDATA}}} RCPBODY {L:m {L:2 RCPSECNM {L:a {L:2 RCPATTRID RCPATTRDATA}}}}} {L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}}
# RCPSECNM A:n (always) Recipe section name, "Generic", "Body", "ASDS"
# RCPATTRID A:n (always) the name of a recipe attribute, but not used to indicate the recipe identifier
# RCPATTRDATA A:n (varies) the value of a recipe attribute, any type of data including list
# RCPBODY (list)B:n (varies) Recipe body
# RCPSECNM A:n (always) Recipe section name, "Generic", "Body", "ASDS"
# RCPATTRID A:n (always) the name of a recipe attribute, but not used to indicate the recipe identifier
# RCPATTRDATA A:n (varies) the value of a recipe attribute, any type of data including list
# RMACK U1:1 (always) recipe managment completion code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {Lq L2_n1}
if {[string first L: [lindex $Lq 0]] != 0} {set ok 0; break}
foreach {Lr_1 RCPBODY Lm_1_n1} [lreplace $Lq 0 0] {
if {[string first L: [lindex $Lr_1 0]] != 0} {set ok 0; break}
foreach {RCPSECNM Lg_2} [lreplace $Lr_1 0 0] {
if {[string first "A:" [lindex $RCPSECNM 0]] != 0} {set ok 0; break}
set RCPSECNM [lindex $RCPSECNM 1]
if {[string first L: [lindex $Lg_2 0]] != 0} {set ok 0; break}
foreach L2_3 [lreplace $Lg_2 0 0] {
if { [lindex $L2_3 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_3 0 0] {RCPATTRID RCPATTRDATA}
if {[string first "A:" [lindex $RCPATTRID 0]] != 0} {set ok 0; break}
set RCPATTRID [lindex $RCPATTRID 1]
#vset [split [lindex $RCPATTRDATA 0] :] {typeRCPATTRDATA lengthRCPATTRDATA}
set RCPATTRDATA [lindex $RCPATTRDATA 1]
}
if {!$ok} break
}
if {!$ok} break
#vset [split [lindex $RCPBODY 0] :] {typeRCPBODY lengthRCPBODY}
# convert list of type B 0xhh to int using expr
set RCPBODY {}; foreach v [lreplace $RCPBODY 0 0] {lappend RCPBODY [expr {$v}]}
if {[string first L: [lindex $Lm_1_n1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lm_1_n1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {RCPSECNM La_3}
if {[string first "A:" [lindex $RCPSECNM 0]] != 0} {set ok 0; break}
set RCPSECNM [lindex $RCPSECNM 1]
if {[string first L: [lindex $La_3 0]] != 0} {set ok 0; break}
foreach L2_4 [lreplace $La_3 0 0] {
if { [lindex $L2_4 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_4 0 0] {RCPATTRID RCPATTRDATA}
if {[string first "A:" [lindex $RCPATTRID 0]] != 0} {set ok 0; break}
set RCPATTRID [lindex $RCPATTRID 1]
#vset [split [lindex $RCPATTRDATA 0] :] {typeRCPATTRDATA lengthRCPATTRDATA}
set RCPATTRDATA [lindex $RCPATTRDATA 1]
}
if {!$ok} break
}
if {!$ok} break
}
if {!$ok} break
if { [lindex $L2_n1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_n1 0 0] {RMACK Lp_1}
if {[lindex $RMACK 0] != "U1:1"} {set ok 0; break}
set RMACK [lindex $RMACK 1]
if {[string first L: [lindex $Lp_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lp_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S15F19R | Recipe Rename Req |
Sent by Host and Equipment |
# S15F19R Tcl Receive message - add next line to setup
$spname whenever S15F19 [list recv_S15F19R $spname]
# receive procedure
proc recv_S15F19R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 RCPSPEC RCPRENAME RCPNEWID
# RCPSPEC A:n (always) recipe specifier
# RCPRENAME TF:1 (always) whether a recipe is to be renamed (TRUE) or copied (FALSE)
# RCPNEWID A:n (always) the new recipe identifier
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RCPSPEC RCPRENAME RCPNEWID}
if {[string first "A:" [lindex $RCPSPEC 0]] != 0} {set ok 0; break}
set RCPSPEC [lindex $RCPSPEC 1]
if {[lindex $RCPRENAME 0] != "TF:1"} {set ok 0; break}
set RCPRENAME [lindex $RCPRENAME 1]
if {[string first "A:" [lindex $RCPNEWID 0]] != 0} {set ok 0; break}
set RCPNEWID [lindex $RCPNEWID 1]
if {$send_reply} {
# TBD create reply data
$spname put S15F20 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S15F19R
S15F20 | Recipe Rename Ack |
Sent by Host and Equipment |
# S15F20 Tcl Parse reply
set reply [secs_xact $spname S15F19R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}
# RMACK U1:1 (always) recipe managment completion code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RMACK Lp}
if {[lindex $RMACK 0] != "U1:1"} {set ok 0; break}
set RMACK [lindex $RMACK 1]
if {[string first L: [lindex $Lp 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lp 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S15F21R | Recipe Action Req |
Sent by Host and Equipment |
# S15F21R Tcl Receive message - add next line to setup
$spname whenever S15F21 [list recv_S15F21R $spname]
# receive procedure
proc recv_S15F21R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:6 DATAID RCPCMD RMNSSPEC OPID AGENT {L:n RCPID}
# DATAID U4:1 (varies) an identifier to correlate related messages
# RCPCMD U1:1 (always) recipe action
# RMNSSPEC A:n (always) object id of a recipe namespace
# OPID U4:1 (varies) operation identifier
# AGENT A:n (always) no description, no max length
# RCPID A:n (always) recipe identifier conforming to OBJSPEC
if { [lindex $TSN_data 0] != "L:6" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID RCPCMD RMNSSPEC OPID AGENT Ln}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
if {[lindex $RCPCMD 0] != "U1:1"} {set ok 0; break}
set RCPCMD [lindex $RCPCMD 1]
if {[string first "A:" [lindex $RMNSSPEC 0]] != 0} {set ok 0; break}
set RMNSSPEC [lindex $RMNSSPEC 1]
#vset [split [lindex $OPID 0] :] {typeOPID lengthOPID}
set OPID [lindex $OPID 1]
if {[string first "A:" [lindex $AGENT 0]] != 0} {set ok 0; break}
set AGENT [lindex $AGENT 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach RCPID [lreplace $Ln 0 0] {
if {[string first "A:" [lindex $RCPID 0]] != 0} {set ok 0; break}
set RCPID [lindex $RCPID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S15F22 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S15F21R
S15F22 | Recipe Action Ack |
Sent by Host and Equipment |
# S15F22 Tcl Parse reply
set reply [secs_xact $spname S15F21R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:4 AGENT LINKID RCPCMD {L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}}
# AGENT A:n (always) no description, no max length
# LINKID U4:1 (always) correlates the RMOPID value in a request to a completion report
# RCPCMD U1:1 (always) recipe action
# RMACK U1:1 (always) recipe managment completion code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {AGENT LINKID RCPCMD L2}
if {[string first "A:" [lindex $AGENT 0]] != 0} {set ok 0; break}
set AGENT [lindex $AGENT 1]
if {[lindex $LINKID 0] != "U4:1"} {set ok 0; break}
set LINKID [lindex $LINKID 1]
if {[lindex $RCPCMD 0] != "U1:1"} {set ok 0; break}
set RCPCMD [lindex $RCPCMD 1]
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {RMACK Lp_1}
if {[lindex $RMACK 0] != "U1:1"} {set ok 0; break}
set RMACK [lindex $RMACK 1]
if {[string first L: [lindex $Lp_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lp_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S15F23R | Recipe Descriptor Req |
Sent by Host and Equipment |
# S15F23R Tcl Receive message - add next line to setup
$spname whenever S15F23 [list recv_S15F23R $spname]
# receive procedure
proc recv_S15F23R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 DATAID OBJSPEC {L:n RCPID}
# DATAID U4:1 (varies) an identifier to correlate related messages
# OBJSPEC A:n (varies) E39 structured text identifying an object, [object type:object id>]+
# RCPID A:n (always) recipe identifier conforming to OBJSPEC
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID OBJSPEC Ln}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $OBJSPEC 0] :] {typeOBJSPEC lengthOBJSPEC}
set OBJSPEC [lindex $OBJSPEC 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach RCPID [lreplace $Ln 0 0] {
if {[string first "A:" [lindex $RCPID 0]] != 0} {set ok 0; break}
set RCPID [lindex $RCPID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S15F24 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S15F23R
S15F24 | Recipe Descriptor Data |
Sent by Host and Equipment |
# S15F24 Tcl Parse reply
set reply [secs_xact $spname S15F23R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 {L:n {L:a {L:3* RCPDESCNM RCPDESCTIME RCPDESCLTH}}} {L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}}
# RCPDESCNM A:n (always) Identifies a descriptor type "ASDesc", "BodyDesc", "GenDesc"
# RCPDESCTIME A:16 (always) timestamp of a recipe section "YYYYMMDDhhmmsscc"
# RCPDESCLTH U4:1 (varies) the byte length of a recipe
# RMACK U1:1 (always) recipe managment completion code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {Ln L2_n1}
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach La_1 [lreplace $Ln 0 0] {
if {[string first L: [lindex $La_1 0]] != 0} {set ok 0; break}
foreach L3opt_2 [lreplace $La_1 0 0] {
if { [lindex $L3opt_2 0] == "L:3" } { ;# 3 optional items found
vset [lreplace $L3opt_2 0 0] {RCPDESCNM RCPDESCTIME RCPDESCLTH}
if {[string first "A:" [lindex $RCPDESCNM 0]] != 0} {set ok 0; break}
set RCPDESCNM [lindex $RCPDESCNM 1]
if {[string first "A:" [lindex $RCPDESCTIME 0]] != 0} {set ok 0; break}
set RCPDESCTIME [lindex $RCPDESCTIME 1]
#vset [split [lindex $RCPDESCLTH 0] :] {typeRCPDESCLTH lengthRCPDESCLTH}
set RCPDESCLTH [lindex $RCPDESCLTH 1]
}
}
if {!$ok} break
}
if {!$ok} break
if { [lindex $L2_n1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_n1 0 0] {RMACK Lp_1}
if {[lindex $RMACK 0] != "U1:1"} {set ok 0; break}
set RMACK [lindex $RMACK 1]
if {[string first L: [lindex $Lp_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lp_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S15F25R | Recipe Parameter Update Req |
Sent by Host and Equipment |
# S15F25R Tcl Receive message - add next line to setup
$spname whenever S15F25 [list recv_S15F25R $spname]
# receive procedure
proc recv_S15F25R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 DATAID RMNSSPEC AGENT {L:n {L:3 RCPPARNM RCPPARVAL RCPPARRULE}}
# DATAID U4:1 (varies) an identifier to correlate related messages
# RMNSSPEC A:n (always) object id of a recipe namespace
# AGENT A:n (always) no description, no max length
# RCPPARNM A:256 (always) the name of a recipe variable parameter
# RCPPARVAL A:80 (varies) the value of a recipe variable parameter, any scalar format type
# RCPPARRULE A:80 (always) the restrictions applied to a recipe variable parameter setting
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID RMNSSPEC AGENT Ln}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
if {[string first "A:" [lindex $RMNSSPEC 0]] != 0} {set ok 0; break}
set RMNSSPEC [lindex $RMNSSPEC 1]
if {[string first "A:" [lindex $AGENT 0]] != 0} {set ok 0; break}
set AGENT [lindex $AGENT 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L3_1 [lreplace $Ln 0 0] {
if { [lindex $L3_1 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3_1 0 0] {RCPPARNM RCPPARVAL RCPPARRULE}
if {[string first "A:" [lindex $RCPPARNM 0]] != 0} {set ok 0; break}
set RCPPARNM [lindex $RCPPARNM 1]
#vset [split [lindex $RCPPARVAL 0] :] {typeRCPPARVAL lengthRCPPARVAL}
set RCPPARVAL [lindex $RCPPARVAL 1]
if {[string first "A:" [lindex $RCPPARRULE 0]] != 0} {set ok 0; break}
set RCPPARRULE [lindex $RCPPARRULE 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S15F26 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S15F25R
S15F26 | Recipe Parameter Update Ack |
Sent by Host and Equipment |
# S15F26 Tcl Parse reply
set reply [secs_xact $spname S15F25R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}
# RMACK U1:1 (always) recipe managment completion code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RMACK Lp}
if {[lindex $RMACK 0] != "U1:1"} {set ok 0; break}
set RMACK [lindex $RMACK 1]
if {[string first L: [lindex $Lp 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lp 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S15F27R | Recipe Download Req |
Sent by Host Only |
# S15F27R Tcl Receive message - add next line to setup
$spname whenever S15F27 [list recv_S15F27R $spname]
# receive procedure
proc recv_S15F27R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:5 DATAID RCPOWCODE RCPSPEC {L:m {L:2 RCPATTRID RCPATTRDATA}} RCPBODY
# DATAID U4:1 (varies) an identifier to correlate related messages
# RCPOWCODE TF:1 (always) recipe overwrite code, true=overwrite ok, false=do not overwrite
# RCPSPEC A:n (always) recipe specifier
# RCPATTRID A:n (always) the name of a recipe attribute, but not used to indicate the recipe identifier
# RCPATTRDATA A:n (varies) the value of a recipe attribute, any type of data including list
# RCPBODY (list)B:n (varies) Recipe body
if { [lindex $TSN_data 0] != "L:5" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID RCPOWCODE RCPSPEC Lm RCPBODY}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
if {[lindex $RCPOWCODE 0] != "TF:1"} {set ok 0; break}
set RCPOWCODE [lindex $RCPOWCODE 1]
if {[string first "A:" [lindex $RCPSPEC 0]] != 0} {set ok 0; break}
set RCPSPEC [lindex $RCPSPEC 1]
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lm 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {RCPATTRID RCPATTRDATA}
if {[string first "A:" [lindex $RCPATTRID 0]] != 0} {set ok 0; break}
set RCPATTRID [lindex $RCPATTRID 1]
#vset [split [lindex $RCPATTRDATA 0] :] {typeRCPATTRDATA lengthRCPATTRDATA}
set RCPATTRDATA [lindex $RCPATTRDATA 1]
}
if {!$ok} break
#vset [split [lindex $RCPBODY 0] :] {typeRCPBODY lengthRCPBODY}
# convert list of type B 0xhh to int using expr
set RCPBODY {}; foreach v [lreplace $RCPBODY 0 0] {lappend RCPBODY [expr {$v}]}
if {$send_reply} {
# TBD create reply data
$spname put S15F28 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S15F27R
S15F28 | Recipe Download Ack |
Sent by Equipment Only |
# S15F28 Tcl Parse reply
set reply [secs_xact $spname S15F27R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:3 RCPID {L:n {L:2 RCPATTRID RCPATTRDATA}} {L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}}
# RCPID A:n (always) recipe identifier conforming to OBJSPEC
# RCPATTRID A:n (always) the name of a recipe attribute, but not used to indicate the recipe identifier
# RCPATTRDATA A:n (varies) the value of a recipe attribute, any type of data including list
# RMACK U1:1 (always) recipe managment completion code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RCPID Ln L2_n1}
if {[string first "A:" [lindex $RCPID 0]] != 0} {set ok 0; break}
set RCPID [lindex $RCPID 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {RCPATTRID RCPATTRDATA}
if {[string first "A:" [lindex $RCPATTRID 0]] != 0} {set ok 0; break}
set RCPATTRID [lindex $RCPATTRID 1]
#vset [split [lindex $RCPATTRDATA 0] :] {typeRCPATTRDATA lengthRCPATTRDATA}
set RCPATTRDATA [lindex $RCPATTRDATA 1]
}
if {!$ok} break
if { [lindex $L2_n1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_n1 0 0] {RMACK Lp_1}
if {[lindex $RMACK 0] != "U1:1"} {set ok 0; break}
set RMACK [lindex $RMACK 1]
if {[string first L: [lindex $Lp_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lp_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S15F29R | Recipe Verify Req |
Sent by Host Only |
# S15F29R Tcl Receive message - add next line to setup
$spname whenever S15F29 [list recv_S15F29R $spname]
# receive procedure
proc recv_S15F29R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 DATAID OPID RESPEC {L:m RCPID}
# DATAID U4:1 (varies) an identifier to correlate related messages
# OPID U4:1 (varies) operation identifier
# RESPEC A:n (always) object specifier for the recipe executor
# RCPID A:n (always) recipe identifier conforming to OBJSPEC
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID OPID RESPEC Lm}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $OPID 0] :] {typeOPID lengthOPID}
set OPID [lindex $OPID 1]
if {[string first "A:" [lindex $RESPEC 0]] != 0} {set ok 0; break}
set RESPEC [lindex $RESPEC 1]
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach RCPID [lreplace $Lm 0 0] {
if {[string first "A:" [lindex $RCPID 0]] != 0} {set ok 0; break}
set RCPID [lindex $RCPID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S15F30 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S15F29R
S15F30 | Recipe Verify Ack |
Sent by Equipment Only |
# S15F30 Tcl Parse reply
set reply [secs_xact $spname S15F29R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:5 OPID LINKID RCPID {L:n {L:2 RCPATTRID RCPATTRDATA}} {L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}}
# OPID U4:1 (varies) operation identifier
# LINKID U4:1 (always) correlates the RMOPID value in a request to a completion report
# RCPID A:n (always) recipe identifier conforming to OBJSPEC
# RCPATTRID A:n (always) the name of a recipe attribute, but not used to indicate the recipe identifier
# RCPATTRDATA A:n (varies) the value of a recipe attribute, any type of data including list
# RMACK U1:1 (always) recipe managment completion code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:5" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OPID LINKID RCPID Ln L2_n1}
#vset [split [lindex $OPID 0] :] {typeOPID lengthOPID}
set OPID [lindex $OPID 1]
if {[lindex $LINKID 0] != "U4:1"} {set ok 0; break}
set LINKID [lindex $LINKID 1]
if {[string first "A:" [lindex $RCPID 0]] != 0} {set ok 0; break}
set RCPID [lindex $RCPID 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {RCPATTRID RCPATTRDATA}
if {[string first "A:" [lindex $RCPATTRID 0]] != 0} {set ok 0; break}
set RCPATTRID [lindex $RCPATTRID 1]
#vset [split [lindex $RCPATTRDATA 0] :] {typeRCPATTRDATA lengthRCPATTRDATA}
set RCPATTRDATA [lindex $RCPATTRDATA 1]
}
if {!$ok} break
if { [lindex $L2_n1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_n1 0 0] {RMACK Lp_1}
if {[lindex $RMACK 0] != "U1:1"} {set ok 0; break}
set RMACK [lindex $RMACK 1]
if {[string first L: [lindex $Lp_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lp_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S15F31R | Recipe Unload Req |
Sent by Host Only |
# S15F31R Tcl Receive message - add next line to setup
$spname whenever S15F31 [list recv_S15F31R $spname]
# receive procedure
proc recv_S15F31R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect RCPSPEC
# RCPSPEC A:n (always) recipe specifier
if {[string first "A:" [lindex $TSN_data 0]] != 0} {set ok 0; break}
set RCPSPEC [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S15F32 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S15F31R
S15F32 | Recipe Unload Data |
Sent by Equipment Only |
# S15F32 Tcl Parse reply
set reply [secs_xact $spname S15F31R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:4 RCPSPEC {L:m {L:2 RCPATTRID RCPATTRDATA}} RCPBODY {L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}}
# RCPSPEC A:n (always) recipe specifier
# RCPATTRID A:n (always) the name of a recipe attribute, but not used to indicate the recipe identifier
# RCPATTRDATA A:n (varies) the value of a recipe attribute, any type of data including list
# RCPBODY (list)B:n (varies) Recipe body
# RMACK U1:1 (always) recipe managment completion code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RCPSPEC Lm RCPBODY L2_n1}
if {[string first "A:" [lindex $RCPSPEC 0]] != 0} {set ok 0; break}
set RCPSPEC [lindex $RCPSPEC 1]
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lm 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {RCPATTRID RCPATTRDATA}
if {[string first "A:" [lindex $RCPATTRID 0]] != 0} {set ok 0; break}
set RCPATTRID [lindex $RCPATTRID 1]
#vset [split [lindex $RCPATTRDATA 0] :] {typeRCPATTRDATA lengthRCPATTRDATA}
set RCPATTRDATA [lindex $RCPATTRDATA 1]
}
if {!$ok} break
#vset [split [lindex $RCPBODY 0] :] {typeRCPBODY lengthRCPBODY}
# convert list of type B 0xhh to int using expr
set RCPBODY {}; foreach v [lreplace $RCPBODY 0 0] {lappend RCPBODY [expr {$v}]}
if { [lindex $L2_n1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_n1 0 0] {RMACK Lp_1}
if {[lindex $RMACK 0] != "U1:1"} {set ok 0; break}
set RMACK [lindex $RMACK 1]
if {[string first L: [lindex $Lp_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lp_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S15F33R | Recipe Select Req |
Sent by Host Only |
# S15F33R Tcl Receive message - add next line to setup
$spname whenever S15F33 [list recv_S15F33R $spname]
# receive procedure
proc recv_S15F33R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 DATAID RESPEC {L:r {L:2 RCPID {L:p {L:2 RCPPARNM RCPPARVAL}}}}
# DATAID U4:1 (varies) an identifier to correlate related messages
# RESPEC A:n (always) object specifier for the recipe executor
# RCPID A:n (always) recipe identifier conforming to OBJSPEC
# RCPPARNM A:256 (always) the name of a recipe variable parameter
# RCPPARVAL A:80 (varies) the value of a recipe variable parameter, any scalar format type
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID RESPEC Lr}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
if {[string first "A:" [lindex $RESPEC 0]] != 0} {set ok 0; break}
set RESPEC [lindex $RESPEC 1]
if {[string first L: [lindex $Lr 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lr 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {RCPID Lp_2}
if {[string first "A:" [lindex $RCPID 0]] != 0} {set ok 0; break}
set RCPID [lindex $RCPID 1]
if {[string first L: [lindex $Lp_2 0]] != 0} {set ok 0; break}
foreach L2_3 [lreplace $Lp_2 0 0] {
if { [lindex $L2_3 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_3 0 0] {RCPPARNM RCPPARVAL}
if {[string first "A:" [lindex $RCPPARNM 0]] != 0} {set ok 0; break}
set RCPPARNM [lindex $RCPPARNM 1]
#vset [split [lindex $RCPPARVAL 0] :] {typeRCPPARVAL lengthRCPPARVAL}
set RCPPARVAL [lindex $RCPPARVAL 1]
}
if {!$ok} break
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S15F34 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S15F33R
S15F34 | Recipe Select Ack |
Sent by Equipment Only |
# S15F34 Tcl Parse reply
set reply [secs_xact $spname S15F33R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}
# RMACK U1:1 (always) recipe managment completion code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RMACK Lp}
if {[lindex $RMACK 0] != "U1:1"} {set ok 0; break}
set RMACK [lindex $RMACK 1]
if {[string first L: [lindex $Lp 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lp 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S15F35R | Recipe Delete Req |
Sent by Host Only |
# S15F35R Tcl Receive message - add next line to setup
$spname whenever S15F35 [list recv_S15F35R $spname]
# receive procedure
proc recv_S15F35R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 DATAID RESPEC RCPDEL {L:n RCPID}
# DATAID U4:1 (varies) an identifier to correlate related messages
# RESPEC A:n (always) object specifier for the recipe executor
# RCPDEL U1:1 (always) recipe action
# RCPID A:n (always) recipe identifier conforming to OBJSPEC
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID RESPEC RCPDEL Ln}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
if {[string first "A:" [lindex $RESPEC 0]] != 0} {set ok 0; break}
set RESPEC [lindex $RESPEC 1]
if {[lindex $RCPDEL 0] != "U1:1"} {set ok 0; break}
set RCPDEL [lindex $RCPDEL 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach RCPID [lreplace $Ln 0 0] {
if {[string first "A:" [lindex $RCPID 0]] != 0} {set ok 0; break}
set RCPID [lindex $RCPID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S15F36 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S15F35R
S15F36 | Recipe Delete Ack |
Sent by Equipment Only |
# S15F36 Tcl Parse reply
set reply [secs_xact $spname S15F35R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}
# RMACK U1:1 (always) recipe managment completion code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RMACK Lp}
if {[lindex $RMACK 0] != "U1:1"} {set ok 0; break}
set RMACK [lindex $RMACK 1]
if {[string first L: [lindex $Lp 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lp 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S15F37R | DRNS Segment Approve Action Req |
Sent by Host and Equipment |
# S15F37R Tcl Receive message - add next line to setup
$spname whenever S15F37 [list recv_S15F37R $spname]
# receive procedure
proc recv_S15F37R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:6 RMSEGSPEC OBJTOKEN RMGRNT OPID RCPID RMCHGTYPE
# RMSEGSPEC A:n (always) The object ID of a distributed recipe namespace segment
# OBJTOKEN U4:1 (always) token used for authorization
# RMGRNT B:1 (always) grant code, 0 ok
# OPID U4:1 (varies) operation identifier
# RCPID A:n (always) recipe identifier conforming to OBJSPEC
# RMCHGTYPE U4:1 (varies) type of change for a recipe
if { [lindex $TSN_data 0] != "L:6" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RMSEGSPEC OBJTOKEN RMGRNT OPID RCPID RMCHGTYPE}
if {[string first "A:" [lindex $RMSEGSPEC 0]] != 0} {set ok 0; break}
set RMSEGSPEC [lindex $RMSEGSPEC 1]
if {[lindex $OBJTOKEN 0] != "U4:1"} {set ok 0; break}
set OBJTOKEN [lindex $OBJTOKEN 1]
if {[lindex $RMGRNT 0] != "B:1"} {set ok 0; break}
set RMGRNT [expr [lindex $RMGRNT 1]] ;# expr converts 0xhh to int
#vset [split [lindex $OPID 0] :] {typeOPID lengthOPID}
set OPID [lindex $OPID 1]
if {[string first "A:" [lindex $RCPID 0]] != 0} {set ok 0; break}
set RCPID [lindex $RCPID 1]
#vset [split [lindex $RMCHGTYPE 0] :] {typeRMCHGTYPE lengthRMCHGTYPE}
set RMCHGTYPE [lindex $RMCHGTYPE 1]
if {$send_reply} {
# TBD create reply data
$spname put S15F38 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S15F37R
S15F38 | DRNS Segment Approve Action Ack |
Sent by Host and Equipment |
# S15F38 Tcl Parse reply
set reply [secs_xact $spname S15F37R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}
# RMACK U1:1 (always) recipe managment completion code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RMACK Lp}
if {[lindex $RMACK 0] != "U1:1"} {set ok 0; break}
set RMACK [lindex $RMACK 1]
if {[string first L: [lindex $Lp 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lp 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S15F39R | DRNS Recorder Seg Req |
Sent by Host and Equipment |
# S15F39R Tcl Receive message - add next line to setup
$spname whenever S15F39 [list recv_S15F39R $spname]
# receive procedure
proc recv_S15F39R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:5 DATAID RMNSCMD RMRECSPEC RMSEGSPEC OBJTOKEN
# DATAID U4:1 (varies) an identifier to correlate related messages
# RMNSCMD U1:1 (always) recipe namespace command
# RMRECSPEC A:n (always) object id of a distributed recipe namespace recorder
# RMSEGSPEC A:n (always) The object ID of a distributed recipe namespace segment
# OBJTOKEN U4:1 (always) token used for authorization
if { [lindex $TSN_data 0] != "L:5" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID RMNSCMD RMRECSPEC RMSEGSPEC OBJTOKEN}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
if {[lindex $RMNSCMD 0] != "U1:1"} {set ok 0; break}
set RMNSCMD [lindex $RMNSCMD 1]
if {[string first "A:" [lindex $RMRECSPEC 0]] != 0} {set ok 0; break}
set RMRECSPEC [lindex $RMRECSPEC 1]
if {[string first "A:" [lindex $RMSEGSPEC 0]] != 0} {set ok 0; break}
set RMSEGSPEC [lindex $RMSEGSPEC 1]
if {[lindex $OBJTOKEN 0] != "U4:1"} {set ok 0; break}
set OBJTOKEN [lindex $OBJTOKEN 1]
if {$send_reply} {
# TBD create reply data
$spname put S15F40 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S15F39R
S15F40 | DRNS Recorder Seg Ack |
Sent by Host and Equipment |
# S15F40 Tcl Parse reply
set reply [secs_xact $spname S15F39R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}
# RMACK U1:1 (always) recipe managment completion code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RMACK Lp}
if {[lindex $RMACK 0] != "U1:1"} {set ok 0; break}
set RMACK [lindex $RMACK 1]
if {[string first L: [lindex $Lp 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lp 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S15F41R | DRNS Recorder Mod Req |
Sent by Host and Equipment |
Comment: L:c is L:7 or L:1, no explanation of L:1 item
Format:
# S15F41R Tcl Receive message - add next line to setup
$spname whenever S15F41 [list recv_S15F41R $spname]
# receive procedure
proc recv_S15F41R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:5 DATAID RMRECSPEC OBJTOKEN RMNSCMD {L:c RCPID RCPNEWID RMSEGSPEC RMCHGTYPE OPID TIMESTAMP RMREQUESTOR}
# DATAID U4:1 (varies) an identifier to correlate related messages
# RMRECSPEC A:n (always) object id of a distributed recipe namespace recorder
# OBJTOKEN U4:1 (always) token used for authorization
# RMNSCMD U1:1 (always) recipe namespace command
# RCPID A:n (always) recipe identifier conforming to OBJSPEC
# RCPNEWID A:n (always) the new recipe identifier
# RMSEGSPEC A:n (always) The object ID of a distributed recipe namespace segment
# RMCHGTYPE U4:1 (varies) type of change for a recipe
# OPID U4:1 (varies) operation identifier
# TIMESTAMP A:32 (always) ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
# RMREQUESTOR TF:1 (always) True when the initiator of a change request is an attached segment, otherwise false
if { [lindex $TSN_data 0] != "L:5" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID RMRECSPEC OBJTOKEN RMNSCMD Lc}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
if {[string first "A:" [lindex $RMRECSPEC 0]] != 0} {set ok 0; break}
set RMRECSPEC [lindex $RMRECSPEC 1]
if {[lindex $OBJTOKEN 0] != "U4:1"} {set ok 0; break}
set OBJTOKEN [lindex $OBJTOKEN 1]
if {[lindex $RMNSCMD 0] != "U1:1"} {set ok 0; break}
set RMNSCMD [lindex $RMNSCMD 1]
if {[string first L: [lindex $Lc 0]] != 0} {set ok 0; break}
foreach {RCPID RCPNEWID RMSEGSPEC RMCHGTYPE OPID TIMESTAMP RMREQUESTOR} [lreplace $Lc 0 0] {
if {[string first "A:" [lindex $RCPID 0]] != 0} {set ok 0; break}
set RCPID [lindex $RCPID 1]
if {[string first "A:" [lindex $RCPNEWID 0]] != 0} {set ok 0; break}
set RCPNEWID [lindex $RCPNEWID 1]
if {[string first "A:" [lindex $RMSEGSPEC 0]] != 0} {set ok 0; break}
set RMSEGSPEC [lindex $RMSEGSPEC 1]
#vset [split [lindex $RMCHGTYPE 0] :] {typeRMCHGTYPE lengthRMCHGTYPE}
set RMCHGTYPE [lindex $RMCHGTYPE 1]
#vset [split [lindex $OPID 0] :] {typeOPID lengthOPID}
set OPID [lindex $OPID 1]
if {[string first "A:" [lindex $TIMESTAMP 0]] != 0} {set ok 0; break}
set TIMESTAMP [lindex $TIMESTAMP 1]
if {[lindex $RMREQUESTOR 0] != "TF:1"} {set ok 0; break}
set RMREQUESTOR [lindex $RMREQUESTOR 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S15F42 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S15F41R
S15F42 | DRNS Recorder Mod Ack |
Sent by Host and Equipment |
# S15F42 Tcl Parse reply
set reply [secs_xact $spname S15F41R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}
# RMACK U1:1 (always) recipe managment completion code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RMACK Lp}
if {[lindex $RMACK 0] != "U1:1"} {set ok 0; break}
set RMACK [lindex $RMACK 1]
if {[string first L: [lindex $Lp 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lp 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S15F43R | DRNS Get Change Req |
Sent by Host and Equipment |
# S15F43R Tcl Receive message - add next line to setup
$spname whenever S15F43 [list recv_S15F43R $spname]
# receive procedure
proc recv_S15F43R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 DATAID OBJSPEC TARGETSPEC
# DATAID U4:1 (varies) an identifier to correlate related messages
# OBJSPEC A:n (varies) E39 structured text identifying an object, [object type:object id>]+
# TARGETSPEC A:40 (always) Specifier of target object
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID OBJSPEC TARGETSPEC}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $OBJSPEC 0] :] {typeOBJSPEC lengthOBJSPEC}
set OBJSPEC [lindex $OBJSPEC 1]
if {[string first "A:" [lindex $TARGETSPEC 0]] != 0} {set ok 0; break}
set TARGETSPEC [lindex $TARGETSPEC 1]
if {$send_reply} {
# TBD create reply data
$spname put S15F44 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S15F43R
S15F44 | DRNS Get Change Ack |
Sent by Host and Equipment |
# S15F44 Tcl Parse reply
set reply [secs_xact $spname S15F43R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 {L:n {L:7 RCPID RCPNEWID RMSEGSPEC RMCHGTYPE OPID TIMESTAMP RMREQUESTOR}} {L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}}
# RCPID A:n (always) recipe identifier conforming to OBJSPEC
# RCPNEWID A:n (always) the new recipe identifier
# RMSEGSPEC A:n (always) The object ID of a distributed recipe namespace segment
# RMCHGTYPE U4:1 (varies) type of change for a recipe
# OPID U4:1 (varies) operation identifier
# TIMESTAMP A:32 (always) ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
# RMREQUESTOR TF:1 (always) True when the initiator of a change request is an attached segment, otherwise false
# RMACK U1:1 (always) recipe managment completion code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {Ln L2_n1}
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L7_1 [lreplace $Ln 0 0] {
if { [lindex $L7_1 0] != "L:7" } {set ok 0; break}
vset [lreplace $L7_1 0 0] {RCPID RCPNEWID RMSEGSPEC RMCHGTYPE OPID TIMESTAMP RMREQUESTOR}
if {[string first "A:" [lindex $RCPID 0]] != 0} {set ok 0; break}
set RCPID [lindex $RCPID 1]
if {[string first "A:" [lindex $RCPNEWID 0]] != 0} {set ok 0; break}
set RCPNEWID [lindex $RCPNEWID 1]
if {[string first "A:" [lindex $RMSEGSPEC 0]] != 0} {set ok 0; break}
set RMSEGSPEC [lindex $RMSEGSPEC 1]
#vset [split [lindex $RMCHGTYPE 0] :] {typeRMCHGTYPE lengthRMCHGTYPE}
set RMCHGTYPE [lindex $RMCHGTYPE 1]
#vset [split [lindex $OPID 0] :] {typeOPID lengthOPID}
set OPID [lindex $OPID 1]
if {[string first "A:" [lindex $TIMESTAMP 0]] != 0} {set ok 0; break}
set TIMESTAMP [lindex $TIMESTAMP 1]
if {[lindex $RMREQUESTOR 0] != "TF:1"} {set ok 0; break}
set RMREQUESTOR [lindex $RMREQUESTOR 1]
}
if {!$ok} break
if { [lindex $L2_n1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_n1 0 0] {RMACK Lp_1}
if {[lindex $RMACK 0] != "U1:1"} {set ok 0; break}
set RMACK [lindex $RMACK 1]
if {[string first L: [lindex $Lp_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lp_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S15F45R | DRNS Mgr Seg Aprvl Req |
Sent by Host and Equipment |
# S15F45R Tcl Receive message - add next line to setup
$spname whenever S15F45 [list recv_S15F45R $spname]
# receive procedure
proc recv_S15F45R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 DATAID RCPSPEC RCPNEWID RMCHGTYPE
# DATAID U4:1 (varies) an identifier to correlate related messages
# RCPSPEC A:n (always) recipe specifier
# RCPNEWID A:n (always) the new recipe identifier
# RMCHGTYPE U4:1 (varies) type of change for a recipe
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID RCPSPEC RCPNEWID RMCHGTYPE}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
if {[string first "A:" [lindex $RCPSPEC 0]] != 0} {set ok 0; break}
set RCPSPEC [lindex $RCPSPEC 1]
if {[string first "A:" [lindex $RCPNEWID 0]] != 0} {set ok 0; break}
set RCPNEWID [lindex $RCPNEWID 1]
#vset [split [lindex $RMCHGTYPE 0] :] {typeRMCHGTYPE lengthRMCHGTYPE}
set RMCHGTYPE [lindex $RMCHGTYPE 1]
if {$send_reply} {
# TBD create reply data
$spname put S15F46 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S15F45R
S15F46 | DRNS Mgr Seg Aprvl Ack |
Sent by Host and Equipment |
# S15F46 Tcl Parse reply
set reply [secs_xact $spname S15F45R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:3 RMCHGTYPE RMGRNT OPID
# RMCHGTYPE U4:1 (varies) type of change for a recipe
# RMGRNT B:1 (always) grant code, 0 ok
# OPID U4:1 (varies) operation identifier
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RMCHGTYPE RMGRNT OPID}
#vset [split [lindex $RMCHGTYPE 0] :] {typeRMCHGTYPE lengthRMCHGTYPE}
set RMCHGTYPE [lindex $RMCHGTYPE 1]
if {[lindex $RMGRNT 0] != "B:1"} {set ok 0; break}
set RMGRNT [expr [lindex $RMGRNT 1]] ;# expr converts 0xhh to int
#vset [split [lindex $OPID 0] :] {typeOPID lengthOPID}
set OPID [lindex $OPID 1]
return ;# finished ok
} ;# end while(ok)
S15F47R | DRNS Mgr Rebuild Req |
Sent by Host and Equipment |
# S15F47R Tcl Receive message - add next line to setup
$spname whenever S15F47 [list recv_S15F47R $spname]
# receive procedure
proc recv_S15F47R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:5 DATAID OBJSPEC RMNSSPEC RMRECSPEC {L:n RMSEGSPEC}
# DATAID U4:1 (varies) an identifier to correlate related messages
# OBJSPEC A:n (varies) E39 structured text identifying an object, [object type:object id>]+
# RMNSSPEC A:n (always) object id of a recipe namespace
# RMRECSPEC A:n (always) object id of a distributed recipe namespace recorder
# RMSEGSPEC A:n (always) The object ID of a distributed recipe namespace segment
if { [lindex $TSN_data 0] != "L:5" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID OBJSPEC RMNSSPEC RMRECSPEC Ln}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $OBJSPEC 0] :] {typeOBJSPEC lengthOBJSPEC}
set OBJSPEC [lindex $OBJSPEC 1]
if {[string first "A:" [lindex $RMNSSPEC 0]] != 0} {set ok 0; break}
set RMNSSPEC [lindex $RMNSSPEC 1]
if {[string first "A:" [lindex $RMRECSPEC 0]] != 0} {set ok 0; break}
set RMRECSPEC [lindex $RMRECSPEC 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach RMSEGSPEC [lreplace $Ln 0 0] {
if {[string first "A:" [lindex $RMSEGSPEC 0]] != 0} {set ok 0; break}
set RMSEGSPEC [lindex $RMSEGSPEC 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S15F48 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S15F47R
S15F48 | DRNS Mgr Rebuild Ack |
Sent by Host and Equipment |
# S15F48 Tcl Parse reply
set reply [secs_xact $spname S15F47R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}
# RMACK U1:1 (always) recipe managment completion code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RMACK Lp}
if {[lindex $RMACK 0] != "U1:1"} {set ok 0; break}
set RMACK [lindex $RMACK 1]
if {[string first L: [lindex $Lp 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lp 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S15F49R | Large Recipe Download Req |
Sent by Host Only |
Comment: The DSNAME is the RCPSPEC for Stream 13 transfer.
Format:
# S15F49R Tcl Receive message - add next line to setup
$spname whenever S15F49 [list recv_S15F49R $spname]
# receive procedure
proc recv_S15F49R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 DSNAME RCPOWCODE
# DSNAME A:50 (varies) the name of a dataset such as a PPID
# RCPOWCODE TF:1 (always) recipe overwrite code, true=overwrite ok, false=do not overwrite
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DSNAME RCPOWCODE}
#vset [split [lindex $DSNAME 0] :] {typeDSNAME lengthDSNAME}
set DSNAME [lindex $DSNAME 1]
if {[lindex $RCPOWCODE 0] != "TF:1"} {set ok 0; break}
set RCPOWCODE [lindex $RCPOWCODE 1]
if {$send_reply} {
# TBD create reply data
$spname put S15F50 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S15F49R
S15F50 | Large Recipe Download Ack |
Sent by Equipment Only |
# S15F50 Tcl Parse reply
set reply [secs_xact $spname S15F49R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC15
# ACKC15 B:1 (always) acknowledge code, 0 ok
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC15 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S15F51R | Large Recipe Upload Req |
Sent by Host Only |
Comment: The DSNAME is the RCPSPEC used in Stream 13.
Format:
# S15F51R Tcl Receive message - add next line to setup
$spname whenever S15F51 [list recv_S15F51R $spname]
# receive procedure
proc recv_S15F51R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect DSNAME
# DSNAME A:50 (varies) the name of a dataset such as a PPID
#vset [split [lindex $TSN_data 0] :] {typeDSNAME lengthDSNAME}
set DSNAME [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S15F52 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S15F51R
S15F52 | Large Recipe Upload Ack |
Sent by Equipment Only |
# S15F52 Tcl Parse reply
set reply [secs_xact $spname S15F51R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKC15
# ACKC15 B:1 (always) acknowledge code, 0 ok
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set ACKC15 [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S15F53R | Recipe Verification Send |
Sent by Equipment Only |
# S15F53R Tcl Receive message - add next line to setup
$spname whenever S15F53 [list recv_S15F53R $spname]
# receive procedure
proc recv_S15F53R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 RCPSPEC RCPID {L:2 RMACK {L:n {L:2 ERRCODE ERRTEXT}}}
# RCPSPEC A:n (always) recipe specifier
# RCPID A:n (always) recipe identifier conforming to OBJSPEC
# RMACK U1:1 (always) recipe managment completion code
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RCPSPEC RCPID L2}
if {[string first "A:" [lindex $RCPSPEC 0]] != 0} {set ok 0; break}
set RCPSPEC [lindex $RCPSPEC 1]
if {[string first "A:" [lindex $RCPID 0]] != 0} {set ok 0; break}
set RCPID [lindex $RCPID 1]
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {RMACK Ln_1}
if {[lindex $RMACK 0] != "U1:1"} {set ok 0; break}
set RMACK [lindex $RMACK 1]
if {[string first L: [lindex $Ln_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Ln_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S15F54 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S15F53R
S15F54 | Recipe Verification Ack |
Sent by Host Only |
# S15F54 Tcl Parse reply
set reply [secs_xact $spname S15F53R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# no data expected
return ;# finished ok
} ;# end while(ok)
S16F1R | Process Job Data MBI |
Sent by Host Only |
Comment: SECS-I multiblock inquire/grant for all process management messages, optional for HSMS
Format:
# S16F1R Tcl Receive message - add next line to setup
$spname whenever S16F1 [list recv_S16F1R $spname]
# receive procedure
proc recv_S16F1R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 DATAID DATALENGTH
# DATAID U4:1 (varies) an identifier to correlate related messages
# DATALENGTH U4:1 (varies) total bytes of the message body
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID DATALENGTH}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $DATALENGTH 0] :] {typeDATALENGTH lengthDATALENGTH}
set DATALENGTH [lindex $DATALENGTH 1]
if {$send_reply} {
# TBD create reply data
$spname put S16F2 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S16F1R
S16F2 | PJD MBI Grant |
Sent by Equipment Only |
# S16F2 Tcl Parse reply
set reply [secs_xact $spname S16F1R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect GRANT
# GRANT B:1 (always) multiblock grant code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set GRANT [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S16F3R | Process Job Create Req |
Sent by Host Only |
# S16F3R Tcl Receive message - add next line to setup
$spname whenever S16F3 [list recv_S16F3R $spname]
# receive procedure
proc recv_S16F3R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:5 DATAID MF {L:n MID} {L:3 PRRECIPEMETHOD RCPSPEC {L:m {L:2 RCPPARNM RCPPARVAL}}} PRPROCESSSTART
# DATAID U4:1 (varies) an identifier to correlate related messages
# MF B:1 (varies) material format code, ASCII indicates generic units, E40 restricts to B:1
# MID A:16 (varies) material ID, E40 restricts to A:n
# PRRECIPEMETHOD U1:1 (always) recipe type
# RCPSPEC A:n (always) recipe specifier
# RCPPARNM A:256 (always) the name of a recipe variable parameter
# RCPPARVAL A:80 (varies) the value of a recipe variable parameter, any scalar format type
# PRPROCESSSTART TF:1 (always) automatic start flag, false implies manual start
if { [lindex $TSN_data 0] != "L:5" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID MF Ln L3_n1 PRPROCESSSTART}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $MF 0] :] {typeMF lengthMF}
set MF [lindex $MF 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach MID [lreplace $Ln 0 0] {
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
}
if {!$ok} break
if { [lindex $L3_n1 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3_n1 0 0] {PRRECIPEMETHOD RCPSPEC Lm_1}
if {[lindex $PRRECIPEMETHOD 0] != "U1:1"} {set ok 0; break}
set PRRECIPEMETHOD [lindex $PRRECIPEMETHOD 1]
if {[string first "A:" [lindex $RCPSPEC 0]] != 0} {set ok 0; break}
set RCPSPEC [lindex $RCPSPEC 1]
if {[string first L: [lindex $Lm_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lm_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {RCPPARNM RCPPARVAL}
if {[string first "A:" [lindex $RCPPARNM 0]] != 0} {set ok 0; break}
set RCPPARNM [lindex $RCPPARNM 1]
#vset [split [lindex $RCPPARVAL 0] :] {typeRCPPARVAL lengthRCPPARVAL}
set RCPPARVAL [lindex $RCPPARVAL 1]
}
if {!$ok} break
if {[lindex $PRPROCESSSTART 0] != "TF:1"} {set ok 0; break}
set PRPROCESSSTART [lindex $PRPROCESSSTART 1]
if {$send_reply} {
# TBD create reply data
$spname put S16F4 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S16F3R
S16F4 | Process Job Create Ack |
Sent by Equipment Only |
# S16F4 Tcl Parse reply
set reply [secs_xact $spname S16F3R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 PRJOBID {L:2 ACKA {L:n {L:2 ERRCODE ERRTEXT}}}
# PRJOBID A:n (always) process job identifier
# ACKA TF:1 (always) request success
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PRJOBID L2}
if {[string first "A:" [lindex $PRJOBID 0]] != 0} {set ok 0; break}
set PRJOBID [lindex $PRJOBID 1]
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {ACKA Ln_1}
if {[lindex $ACKA 0] != "TF:1"} {set ok 0; break}
set ACKA [lindex $ACKA 1]
if {[string first L: [lindex $Ln_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Ln_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S16F5R | Process Job Cmd Req |
Sent by Host Only |
# S16F5R Tcl Receive message - add next line to setup
$spname whenever S16F5 [list recv_S16F5R $spname]
# receive procedure
proc recv_S16F5R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 DATAID PRJOBID PRCMDNAME {L:n {L:2 CPNAME CPVAL}}
# DATAID U4:1 (varies) an identifier to correlate related messages
# PRJOBID A:n (always) process job identifier
# PRCMDNAME A:6 (always) process job commmands, START, STOP, PAUSE, RESUME, ABORT, CANCEL
# CPNAME A:n (varies) command parameter name
# CPVAL A:n (varies) command parameter value, any scalar type
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID PRJOBID PRCMDNAME Ln}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
if {[string first "A:" [lindex $PRJOBID 0]] != 0} {set ok 0; break}
set PRJOBID [lindex $PRJOBID 1]
if {[string first "A:" [lindex $PRCMDNAME 0]] != 0} {set ok 0; break}
set PRCMDNAME [lindex $PRCMDNAME 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {CPNAME CPVAL}
#vset [split [lindex $CPNAME 0] :] {typeCPNAME lengthCPNAME}
set CPNAME [lindex $CPNAME 1]
#vset [split [lindex $CPVAL 0] :] {typeCPVAL lengthCPVAL}
set CPVAL [lindex $CPVAL 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S16F6 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S16F5R
S16F6 | Process Job Cmd Ack |
Sent by Equipment Only |
# S16F6 Tcl Parse reply
set reply [secs_xact $spname S16F5R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 PRJOBID {L:2 ACKA {L:n {L:2 ERRCODE ERRTEXT}}}
# PRJOBID A:n (always) process job identifier
# ACKA TF:1 (always) request success
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PRJOBID L2}
if {[string first "A:" [lindex $PRJOBID 0]] != 0} {set ok 0; break}
set PRJOBID [lindex $PRJOBID 1]
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {ACKA Ln_1}
if {[lindex $ACKA 0] != "TF:1"} {set ok 0; break}
set ACKA [lindex $ACKA 1]
if {[string first L: [lindex $Ln_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Ln_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S16F7[R] | Process Job Alert Notify |
Sent by Equipment Only |
Comment: Unlike S5F1 there is no message to enable/disable selected alerts. ACKA false indicates failure.
Format:
# S16F7 Tcl Receive message - add next line to setup
$spname whenever S16F7 [list recv_S16F7 $spname]
# receive procedure
proc recv_S16F7 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 TIMESTAMP PRJOBID PRJOBMILESTONE {L:2 ACKA {L:n {L:2 ERRCODE ERRTEXT}}}
# TIMESTAMP A:32 (always) ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
# PRJOBID A:n (always) process job identifier
# PRJOBMILESTONE U1:1 (varies) process job status
# ACKA TF:1 (always) request success
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TIMESTAMP PRJOBID PRJOBMILESTONE L2}
if {[string first "A:" [lindex $TIMESTAMP 0]] != 0} {set ok 0; break}
set TIMESTAMP [lindex $TIMESTAMP 1]
if {[string first "A:" [lindex $PRJOBID 0]] != 0} {set ok 0; break}
set PRJOBID [lindex $PRJOBID 1]
#vset [split [lindex $PRJOBMILESTONE 0] :] {typePRJOBMILESTONE lengthPRJOBMILESTONE}
set PRJOBMILESTONE [lindex $PRJOBMILESTONE 1]
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {ACKA Ln_1}
if {[lindex $ACKA 0] != "TF:1"} {set ok 0; break}
set ACKA [lindex $ACKA 1]
if {[string first L: [lindex $Ln_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Ln_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S16F8 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S16F7
S16F8 | Process Job Alert Ack |
Sent by Host Only |
# S16F8 Tcl Parse reply
set reply [secs_xact $spname S16F7R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# no data expected
return ;# finished ok
} ;# end while(ok)
S16F9[R] | Process Job Event Notify |
Sent by Equipment Only |
Comment: There is no message to define the VID list or enable/disable. Less featured than Stream 6 and superseded by Stream 17.
Format:
# S16F9 Tcl Receive message - add next line to setup
$spname whenever S16F9 [list recv_S16F9 $spname]
# receive procedure
proc recv_S16F9 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 PREVENTID TIMESTAMP PRJOBID {L:n {L:2 VID V}}
# PREVENTID U1:1 (varies) process job event ID
# TIMESTAMP A:32 (always) ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
# PRJOBID A:n (always) process job identifier
# VID A:n (varies) A variable ID
# V A:n (varies) variable value, any type including list
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PREVENTID TIMESTAMP PRJOBID Ln}
#vset [split [lindex $PREVENTID 0] :] {typePREVENTID lengthPREVENTID}
set PREVENTID [lindex $PREVENTID 1]
if {[string first "A:" [lindex $TIMESTAMP 0]] != 0} {set ok 0; break}
set TIMESTAMP [lindex $TIMESTAMP 1]
if {[string first "A:" [lindex $PRJOBID 0]] != 0} {set ok 0; break}
set PRJOBID [lindex $PRJOBID 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {VID V}
#vset [split [lindex $VID 0] :] {typeVID lengthVID}
set VID [lindex $VID 1]
#vset [split [lindex $V 0] :] {typeV lengthV}
set V [lindex $V 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S16F10 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S16F9
S16F10 | Process Job Event Ack |
Sent by Host Only |
# S16F10 Tcl Parse reply
set reply [secs_xact $spname S16F9R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# no data expected
return ;# finished ok
} ;# end while(ok)
S16F11R | PRJobCreateEnh |
Sent by Host Only |
Comment: The L:n list can be {L:n MID} depending on MF, {L:j SLOTID} might be an array instead
Format:
# S16F11R Tcl Receive message - add next line to setup
$spname whenever S16F11 [list recv_S16F11R $spname]
# receive procedure
proc recv_S16F11R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:7 DATAID PRJOBID MF {L:n {L:2 CARRIERID {L:j SLOTID}}} {L:3 PRRECIPEMETHOD RCPSPEC {L:m {L:2 RCPPARNM RCPPARVAL}}} PRPROCESSSTART {L:p PRPAUSEEVENTID}
# DATAID U4:1 (varies) an identifier to correlate related messages
# PRJOBID A:n (always) process job identifier
# MF B:1 (varies) material format code, ASCII indicates generic units, E40 restricts to B:1
# CARRIERID A:n (always) carrier ID
# SLOTID U1:1 (always) slot position within a carrier
# PRRECIPEMETHOD U1:1 (always) recipe type
# RCPSPEC A:n (always) recipe specifier
# RCPPARNM A:256 (always) the name of a recipe variable parameter
# RCPPARVAL A:80 (varies) the value of a recipe variable parameter, any scalar format type
# PRPROCESSSTART TF:1 (always) automatic start flag, false implies manual start
# PRPAUSEEVENTID U4:1 (varies) an event identifier for which a process job should be paused
if { [lindex $TSN_data 0] != "L:7" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID PRJOBID MF Ln L3_n1 PRPROCESSSTART Lp_n2}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
if {[string first "A:" [lindex $PRJOBID 0]] != 0} {set ok 0; break}
set PRJOBID [lindex $PRJOBID 1]
#vset [split [lindex $MF 0] :] {typeMF lengthMF}
set MF [lindex $MF 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {CARRIERID Lj_2}
if {[string first "A:" [lindex $CARRIERID 0]] != 0} {set ok 0; break}
set CARRIERID [lindex $CARRIERID 1]
if {[string first L: [lindex $Lj_2 0]] != 0} {set ok 0; break}
foreach SLOTID [lreplace $Lj_2 0 0] {
if {[lindex $SLOTID 0] != "U1:1"} {set ok 0; break}
set SLOTID [lindex $SLOTID 1]
}
if {!$ok} break
}
if {!$ok} break
if { [lindex $L3_n1 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3_n1 0 0] {PRRECIPEMETHOD RCPSPEC Lm_1}
if {[lindex $PRRECIPEMETHOD 0] != "U1:1"} {set ok 0; break}
set PRRECIPEMETHOD [lindex $PRRECIPEMETHOD 1]
if {[string first "A:" [lindex $RCPSPEC 0]] != 0} {set ok 0; break}
set RCPSPEC [lindex $RCPSPEC 1]
if {[string first L: [lindex $Lm_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Lm_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {RCPPARNM RCPPARVAL}
if {[string first "A:" [lindex $RCPPARNM 0]] != 0} {set ok 0; break}
set RCPPARNM [lindex $RCPPARNM 1]
#vset [split [lindex $RCPPARVAL 0] :] {typeRCPPARVAL lengthRCPPARVAL}
set RCPPARVAL [lindex $RCPPARVAL 1]
}
if {!$ok} break
if {[lindex $PRPROCESSSTART 0] != "TF:1"} {set ok 0; break}
set PRPROCESSSTART [lindex $PRPROCESSSTART 1]
if {[string first L: [lindex $Lp_n2 0]] != 0} {set ok 0; break}
foreach PRPAUSEEVENTID [lreplace $Lp_n2 0 0] {
#vset [split [lindex $PRPAUSEEVENTID 0] :] {typePRPAUSEEVENTID lengthPRPAUSEEVENTID}
set PRPAUSEEVENTID [lindex $PRPAUSEEVENTID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S16F12 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S16F11R
S16F12 | PRJobCreateEnh Ack |
Sent by Equipment Only |
# S16F12 Tcl Parse reply
set reply [secs_xact $spname S16F11R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 PRJOBID {L:2 ACKA {L:n {L:2 ERRCODE ERRTEXT}}}
# PRJOBID A:n (always) process job identifier
# ACKA TF:1 (always) request success
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PRJOBID L2}
if {[string first "A:" [lindex $PRJOBID 0]] != 0} {set ok 0; break}
set PRJOBID [lindex $PRJOBID 1]
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {ACKA Ln_1}
if {[lindex $ACKA 0] != "TF:1"} {set ok 0; break}
set ACKA [lindex $ACKA 1]
if {[string first L: [lindex $Ln_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Ln_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S16F15R | PRJobMultiCreate |
Sent by Host Only |
Comment: The L:n list can be {L:n MID} depending on MF, {L:j SLOTID} might be an array instead
Format:
# S16F15R Tcl Receive message - add next line to setup
$spname whenever S16F15 [list recv_S16F15R $spname]
# receive procedure
proc recv_S16F15R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 DATAID {L:p {L:6 PRJOBID MF {L:n {L:2 CARRIERID {L:j SLOTID}}} {L:3 PRRECIPEMETHOD RCPSPEC {L:m {L:2 RCPPARNM RCPPARVAL}}} PRPROCESSSTART {L:k PRPAUSEEVENTID}}}
# DATAID U4:1 (varies) an identifier to correlate related messages
# PRJOBID A:n (always) process job identifier
# MF B:1 (varies) material format code, ASCII indicates generic units, E40 restricts to B:1
# CARRIERID A:n (always) carrier ID
# SLOTID U1:1 (always) slot position within a carrier
# PRRECIPEMETHOD U1:1 (always) recipe type
# RCPSPEC A:n (always) recipe specifier
# RCPPARNM A:256 (always) the name of a recipe variable parameter
# RCPPARVAL A:80 (varies) the value of a recipe variable parameter, any scalar format type
# PRPROCESSSTART TF:1 (always) automatic start flag, false implies manual start
# PRPAUSEEVENTID U4:1 (varies) an event identifier for which a process job should be paused
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID Lp}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
if {[string first L: [lindex $Lp 0]] != 0} {set ok 0; break}
foreach L6_1 [lreplace $Lp 0 0] {
if { [lindex $L6_1 0] != "L:6" } {set ok 0; break}
vset [lreplace $L6_1 0 0] {PRJOBID MF Ln_2 L3_2_n1 PRPROCESSSTART Lk_2_n2}
if {[string first "A:" [lindex $PRJOBID 0]] != 0} {set ok 0; break}
set PRJOBID [lindex $PRJOBID 1]
#vset [split [lindex $MF 0] :] {typeMF lengthMF}
set MF [lindex $MF 1]
if {[string first L: [lindex $Ln_2 0]] != 0} {set ok 0; break}
foreach L2_3 [lreplace $Ln_2 0 0] {
if { [lindex $L2_3 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_3 0 0] {CARRIERID Lj_4}
if {[string first "A:" [lindex $CARRIERID 0]] != 0} {set ok 0; break}
set CARRIERID [lindex $CARRIERID 1]
if {[string first L: [lindex $Lj_4 0]] != 0} {set ok 0; break}
foreach SLOTID [lreplace $Lj_4 0 0] {
if {[lindex $SLOTID 0] != "U1:1"} {set ok 0; break}
set SLOTID [lindex $SLOTID 1]
}
if {!$ok} break
}
if {!$ok} break
if { [lindex $L3_2_n1 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3_2_n1 0 0] {PRRECIPEMETHOD RCPSPEC Lm_3}
if {[lindex $PRRECIPEMETHOD 0] != "U1:1"} {set ok 0; break}
set PRRECIPEMETHOD [lindex $PRRECIPEMETHOD 1]
if {[string first "A:" [lindex $RCPSPEC 0]] != 0} {set ok 0; break}
set RCPSPEC [lindex $RCPSPEC 1]
if {[string first L: [lindex $Lm_3 0]] != 0} {set ok 0; break}
foreach L2_4 [lreplace $Lm_3 0 0] {
if { [lindex $L2_4 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_4 0 0] {RCPPARNM RCPPARVAL}
if {[string first "A:" [lindex $RCPPARNM 0]] != 0} {set ok 0; break}
set RCPPARNM [lindex $RCPPARNM 1]
#vset [split [lindex $RCPPARVAL 0] :] {typeRCPPARVAL lengthRCPPARVAL}
set RCPPARVAL [lindex $RCPPARVAL 1]
}
if {!$ok} break
if {[lindex $PRPROCESSSTART 0] != "TF:1"} {set ok 0; break}
set PRPROCESSSTART [lindex $PRPROCESSSTART 1]
if {[string first L: [lindex $Lk_2_n2 0]] != 0} {set ok 0; break}
foreach PRPAUSEEVENTID [lreplace $Lk_2_n2 0 0] {
#vset [split [lindex $PRPAUSEEVENTID 0] :] {typePRPAUSEEVENTID lengthPRPAUSEEVENTID}
set PRPAUSEEVENTID [lindex $PRPAUSEEVENTID 1]
}
if {!$ok} break
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S16F16 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S16F15R
S16F16 | PRJobMultiCreate Ack |
Sent by Equipment Only |
# S16F16 Tcl Parse reply
set reply [secs_xact $spname S16F15R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 {L:m PRJOBID} {L:2 ACKA {L:n {L:2 ERRCODE ERRTEXT}}}
# PRJOBID A:n (always) process job identifier
# ACKA TF:1 (always) request success
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {Lm L2_n1}
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach PRJOBID [lreplace $Lm 0 0] {
if {[string first "A:" [lindex $PRJOBID 0]] != 0} {set ok 0; break}
set PRJOBID [lindex $PRJOBID 1]
}
if {!$ok} break
if { [lindex $L2_n1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_n1 0 0] {ACKA Ln_1}
if {[lindex $ACKA 0] != "TF:1"} {set ok 0; break}
set ACKA [lindex $ACKA 1]
if {[string first L: [lindex $Ln_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Ln_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S16F17R | PRJobDequeue |
Sent by Host Only |
Comment: If m = 0 then the request is for all jobs that have not begun processing.
Format:
# S16F17R Tcl Receive message - add next line to setup
$spname whenever S16F17 [list recv_S16F17R $spname]
# receive procedure
proc recv_S16F17R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:m PRJOBID
# PRJOBID A:n (always) process job identifier
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach PRJOBID [lreplace $TSN_data 0 0] {
if {[string first "A:" [lindex $PRJOBID 0]] != 0} {set ok 0; break}
set PRJOBID [lindex $PRJOBID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S16F18 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S16F17R
S16F18 | PRJobDequeue Ack |
Sent by Equipment Only |
# S16F18 Tcl Parse reply
set reply [secs_xact $spname S16F17R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 {L:m PRJOBID} {L:2 ACKA {L:n {L:2 ERRCODE ERRTEXT}}}
# PRJOBID A:n (always) process job identifier
# ACKA TF:1 (always) request success
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {Lm L2_n1}
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach PRJOBID [lreplace $Lm 0 0] {
if {[string first "A:" [lindex $PRJOBID 0]] != 0} {set ok 0; break}
set PRJOBID [lindex $PRJOBID 1]
}
if {!$ok} break
if { [lindex $L2_n1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_n1 0 0] {ACKA Ln_1}
if {[lindex $ACKA 0] != "TF:1"} {set ok 0; break}
set ACKA [lindex $ACKA 1]
if {[string first L: [lindex $Ln_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Ln_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S16F19R | PRJob List Req |
Sent by Host Only |
# S16F19R Tcl Receive message - add next line to setup
$spname whenever S16F19 [list recv_S16F19R $spname]
# receive procedure
proc recv_S16F19R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# no data expected
if {$send_reply} {
# TBD create reply data
$spname put S16F20 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S16F19R
S16F20 | PRJob List Data |
Sent by Equipment Only |
# S16F20 Tcl Parse reply
set reply [secs_xact $spname S16F19R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:m {L:2 PRJOBID PRSTATE}
# PRJOBID A:n (always) process job identifier
# PRSTATE U1:1 (always) process job state, E40 definition
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach L2 [lreplace $TSN_data 0 0] {
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {PRJOBID PRSTATE}
if {[string first "A:" [lindex $PRJOBID 0]] != 0} {set ok 0; break}
set PRJOBID [lindex $PRJOBID 1]
if {[lindex $PRSTATE 0] != "U1:1"} {set ok 0; break}
set PRSTATE [lindex $PRSTATE 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S16F21R | PRJob Create Limit Req |
Sent by Host Only |
# S16F21R Tcl Receive message - add next line to setup
$spname whenever S16F21 [list recv_S16F21R $spname]
# receive procedure
proc recv_S16F21R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# no data expected
if {$send_reply} {
# TBD create reply data
$spname put S16F22 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S16F21R
S16F22 | PRJob Create Limit Data |
Sent by Equipment Only |
# S16F22 Tcl Parse reply
set reply [secs_xact $spname S16F21R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect PRJOBSPACE
# PRJOBSPACE U2:1 (always) the number of process jobs that can be created
if {[lindex $TSN_data 0] != "U2:1"} {set ok 0; break}
set PRJOBSPACE [lindex $TSN_data 1]
return ;# finished ok
} ;# end while(ok)
S16F23R | PRJob Recipe Variable Set |
Sent by Host Only |
# S16F23R Tcl Receive message - add next line to setup
$spname whenever S16F23 [list recv_S16F23R $spname]
# receive procedure
proc recv_S16F23R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 PRJOBID {L:m {L:2 RCPPARNM RCPPARVAL}}
# PRJOBID A:n (always) process job identifier
# RCPPARNM A:256 (always) the name of a recipe variable parameter
# RCPPARVAL A:80 (varies) the value of a recipe variable parameter, any scalar format type
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PRJOBID Lm}
if {[string first "A:" [lindex $PRJOBID 0]] != 0} {set ok 0; break}
set PRJOBID [lindex $PRJOBID 1]
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lm 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {RCPPARNM RCPPARVAL}
if {[string first "A:" [lindex $RCPPARNM 0]] != 0} {set ok 0; break}
set RCPPARNM [lindex $RCPPARNM 1]
#vset [split [lindex $RCPPARVAL 0] :] {typeRCPPARVAL lengthRCPPARVAL}
set RCPPARVAL [lindex $RCPPARVAL 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S16F24 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S16F23R
S16F24 | PRJob Recipe Variable Ack |
Sent by Host Only |
# S16F24 Tcl Parse reply
set reply [secs_xact $spname S16F23R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 ACKA {L:n {L:2 ERRCODE ERRTEXT}}
# ACKA TF:1 (always) request success
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {ACKA Ln}
if {[lindex $ACKA 0] != "TF:1"} {set ok 0; break}
set ACKA [lindex $ACKA 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S16F25R | PRJob Start Method Set |
Sent by Host Only |
# S16F25R Tcl Receive message - add next line to setup
$spname whenever S16F25 [list recv_S16F25R $spname]
# receive procedure
proc recv_S16F25R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 {L:m PRJOBID} PRPROCESSSTART
# PRJOBID A:n (always) process job identifier
# PRPROCESSSTART TF:1 (always) automatic start flag, false implies manual start
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {Lm PRPROCESSSTART}
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach PRJOBID [lreplace $Lm 0 0] {
if {[string first "A:" [lindex $PRJOBID 0]] != 0} {set ok 0; break}
set PRJOBID [lindex $PRJOBID 1]
}
if {!$ok} break
if {[lindex $PRPROCESSSTART 0] != "TF:1"} {set ok 0; break}
set PRPROCESSSTART [lindex $PRPROCESSSTART 1]
if {$send_reply} {
# TBD create reply data
$spname put S16F26 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S16F25R
S16F26 | PRJob Start Method Ack |
Sent by Equipment Only |
# S16F26 Tcl Parse reply
set reply [secs_xact $spname S16F25R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 {L:m PRJOBID} {L:2 ACKA {L:n {L:2 ERRCODE ERRTEXT}}}
# PRJOBID A:n (always) process job identifier
# ACKA TF:1 (always) request success
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {Lm L2_n1}
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach PRJOBID [lreplace $Lm 0 0] {
if {[string first "A:" [lindex $PRJOBID 0]] != 0} {set ok 0; break}
set PRJOBID [lindex $PRJOBID 1]
}
if {!$ok} break
if { [lindex $L2_n1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_n1 0 0] {ACKA Ln_1}
if {[lindex $ACKA 0] != "TF:1"} {set ok 0; break}
set ACKA [lindex $ACKA 1]
if {[string first L: [lindex $Ln_1 0]] != 0} {set ok 0; break}
foreach L2_2 [lreplace $Ln_1 0 0] {
if { [lindex $L2_2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S16F27R | Control Job Command |
Sent by Host Only |
Comment: Defined by E94, used in replacement of S16F5 when Control Jobs are used
Format:
# S16F27R Tcl Receive message - add next line to setup
$spname whenever S16F27 [list recv_S16F27R $spname]
# receive procedure
proc recv_S16F27R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 CTLJOBID CTLJOBCMD {L:2 CPNAME CPVAL}
# CTLJOBID A:n (always) control job ID, an OBJID
# CTLJOBCMD U1:1 (always) control job command
# CPNAME A:n (varies) command parameter name
# CPVAL A:n (varies) command parameter value, any scalar type
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {CTLJOBID CTLJOBCMD L2}
if {[string first "A:" [lindex $CTLJOBID 0]] != 0} {set ok 0; break}
set CTLJOBID [lindex $CTLJOBID 1]
if {[lindex $CTLJOBCMD 0] != "U1:1"} {set ok 0; break}
set CTLJOBCMD [lindex $CTLJOBCMD 1]
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {CPNAME CPVAL}
#vset [split [lindex $CPNAME 0] :] {typeCPNAME lengthCPNAME}
set CPNAME [lindex $CPNAME 1]
#vset [split [lindex $CPVAL 0] :] {typeCPVAL lengthCPVAL}
set CPVAL [lindex $CPVAL 1]
if {$send_reply} {
# TBD create reply data
$spname put S16F28 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S16F27R
S16F28 | Control Job Command Ack |
Sent by Equipment Only |
# S16F28 Tcl Parse reply
set reply [secs_xact $spname S16F27R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 ACKA {L:2 ERRCODE ERRTEXT}
# ACKA TF:1 (always) request success
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {ACKA L2}
if {[lindex $ACKA 0] != "TF:1"} {set ok 0; break}
set ACKA [lindex $ACKA 1]
if { [lindex $L2 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2 0 0] {ERRCODE ERRTEXT}
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
return ;# finished ok
} ;# end while(ok)
S16F29 | PRSetMtrlOrder |
Sent by Host Only |
# S16F29 Tcl Receive message - add next line to setup
$spname whenever S16F29 [list recv_S16F29 $spname]
# receive procedure
proc recv_S16F29 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect PRMTRLORDER
# PRMTRLORDER U1:1 (always) ordering method for pending process jobs
if {[lindex $TSN_data 0] != "U1:1"} {set ok 0; break}
set PRMTRLORDER [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S16F30 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S16F29
S16F30 | PRSetMtrlOrder Ack |
Sent by Equipment Only |
# S16F30 Tcl Parse reply
set reply [secs_xact $spname S16F29R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect ACKA
# ACKA TF:1 (always) request success
if {[lindex $TSN_data 0] != "TF:1"} {set ok 0; break}
set ACKA [lindex $TSN_data 1]
return ;# finished ok
} ;# end while(ok)
S17F1R | Data Report Create Req |
Sent by Host Only |
# S17F1R Tcl Receive message - add next line to setup
$spname whenever S17F1 [list recv_S17F1R $spname]
# receive procedure
proc recv_S17F1R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 DATAID RPTID DATASRC {L:n VID}
# DATAID U4:1 (varies) an identifier to correlate related messages
# RPTID U4:1 (varies) report ID
# DATASRC A:n (always) identifies a data source, use length 0 to mean the default
# VID A:n (varies) A variable ID
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID RPTID DATASRC Ln}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $RPTID 0] :] {typeRPTID lengthRPTID}
set RPTID [lindex $RPTID 1]
if {[string first "A:" [lindex $DATASRC 0]] != 0} {set ok 0; break}
set DATASRC [lindex $DATASRC 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach VID [lreplace $Ln 0 0] {
#vset [split [lindex $VID 0] :] {typeVID lengthVID}
set VID [lindex $VID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S17F2 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S17F1R
S17F2 | Data Report Create Ack |
Sent by Equipment Only |
# S17F2 Tcl Parse reply
set reply [secs_xact $spname S17F1R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 RPTID ERRCODE
# RPTID U4:1 (varies) report ID
# ERRCODE U4:1 (varies) error code
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {RPTID ERRCODE}
#vset [split [lindex $RPTID 0] :] {typeRPTID lengthRPTID}
set RPTID [lindex $RPTID 1]
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
return ;# finished ok
} ;# end while(ok)
S17F3R | Data Report Delete Req |
Sent by Host Only |
Comment: L:0 means delete all reports
Format:
# S17F3R Tcl Receive message - add next line to setup
$spname whenever S17F3 [list recv_S17F3R $spname]
# receive procedure
proc recv_S17F3R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:n RPTID
# RPTID U4:1 (varies) report ID
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach RPTID [lreplace $TSN_data 0 0] {
#vset [split [lindex $RPTID 0] :] {typeRPTID lengthRPTID}
set RPTID [lindex $RPTID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S17F4 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S17F3R
S17F4 | Data Report Del Ack |
Sent by Equipment Only |
# S17F4 Tcl Parse reply
set reply [secs_xact $spname S17F3R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 ACKA {L:m {L:3 RPTID ERRCODE ERRTEXT}}
# ACKA TF:1 (always) request success
# RPTID U4:1 (varies) report ID
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {ACKA Lm}
if {[lindex $ACKA 0] != "TF:1"} {set ok 0; break}
set ACKA [lindex $ACKA 1]
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach L3_1 [lreplace $Lm 0 0] {
if { [lindex $L3_1 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3_1 0 0] {RPTID ERRCODE ERRTEXT}
#vset [split [lindex $RPTID 0] :] {typeRPTID lengthRPTID}
set RPTID [lindex $RPTID 1]
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S17F5R | Trace Create Req |
Sent by Host Only |
Comment: we recommend the host always provides the L:8 values
Format:
# S17F5R Tcl Receive message - add next line to setup
$spname whenever S17F5 [list recv_S17F5R $spname]
# receive procedure
proc recv_S17F5R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:6 DATAID TRID CEED {L:n RPTID} {L:8* TOTSMP REPGSZ EVNTSRC CEIDSTART EVNTSRC2 CEIDSTOP TRAUTOD RPTOC}
# DATAID U4:1 (varies) an identifier to correlate related messages
# TRID A:n (varies) trace request ID
# CEED TF:1 (always) collection event or trace enablement, true is enabled
# RPTID U4:1 (varies) report ID
# TOTSMP U4:1 (varies) total samples to be made, should be an even multiple of REPGSZ
# REPGSZ U4:1 (varies) reporting group size, TOTSMP modulo REPGSZ should be 0
# EVNTSRC A:n (always) identifies an event source, use length 0 to specify the default
# CEIDSTART U4:1 (varies) the CEID of a start event
# EVNTSRC2 A:n (always) a second event source EVNTSRC
# CEIDSTOP U4:1 (varies) the CEID of a stop event
# TRAUTOD TF:1 (always) delete upon completion flag
# RPTOC TF:1 (always) send only changed data trace report flag
if { [lindex $TSN_data 0] != "L:6" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID TRID CEED Ln L8opt_n1}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
#vset [split [lindex $TRID 0] :] {typeTRID lengthTRID}
set TRID [lindex $TRID 1]
if {[lindex $CEED 0] != "TF:1"} {set ok 0; break}
set CEED [lindex $CEED 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach RPTID [lreplace $Ln 0 0] {
#vset [split [lindex $RPTID 0] :] {typeRPTID lengthRPTID}
set RPTID [lindex $RPTID 1]
}
if {!$ok} break
if { [lindex $L8opt_n1 0] == "L:8" } { ;# 8 optional items found
vset [lreplace $L8opt_n1 0 0] {TOTSMP REPGSZ EVNTSRC CEIDSTART EVNTSRC2 CEIDSTOP TRAUTOD RPTOC}
#vset [split [lindex $TOTSMP 0] :] {typeTOTSMP lengthTOTSMP}
set TOTSMP [lindex $TOTSMP 1]
#vset [split [lindex $REPGSZ 0] :] {typeREPGSZ lengthREPGSZ}
set REPGSZ [lindex $REPGSZ 1]
if {[string first "A:" [lindex $EVNTSRC 0]] != 0} {set ok 0; break}
set EVNTSRC [lindex $EVNTSRC 1]
#vset [split [lindex $CEIDSTART 0] :] {typeCEIDSTART lengthCEIDSTART}
set CEIDSTART [lindex $CEIDSTART 1]
if {[string first "A:" [lindex $EVNTSRC2 0]] != 0} {set ok 0; break}
set EVNTSRC2 [lindex $EVNTSRC2 1]
#vset [split [lindex $CEIDSTOP 0] :] {typeCEIDSTOP lengthCEIDSTOP}
set CEIDSTOP [lindex $CEIDSTOP 1]
if {[lindex $TRAUTOD 0] != "TF:1"} {set ok 0; break}
set TRAUTOD [lindex $TRAUTOD 1]
if {[lindex $RPTOC 0] != "TF:1"} {set ok 0; break}
set RPTOC [lindex $RPTOC 1]
}
if {$send_reply} {
# TBD create reply data
$spname put S17F6 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S17F5R
S17F6 | Trace Create Ack |
Sent by Equipment Only |
# S17F6 Tcl Parse reply
set reply [secs_xact $spname S17F5R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 TRID ERRCODE
# TRID A:n (varies) trace request ID
# ERRCODE U4:1 (varies) error code
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TRID ERRCODE}
#vset [split [lindex $TRID 0] :] {typeTRID lengthTRID}
set TRID [lindex $TRID 1]
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
return ;# finished ok
} ;# end while(ok)
S17F7R | Trace Delete Req |
Sent by Host Only |
Comment: Surprisingly, L:0 is not specified as a means to indicate all, but this feature has to be provided because there is no means to discover the existing traces.
Format:
# S17F7R Tcl Receive message - add next line to setup
$spname whenever S17F7 [list recv_S17F7R $spname]
# receive procedure
proc recv_S17F7R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:n TRID
# TRID A:n (varies) trace request ID
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach TRID [lreplace $TSN_data 0 0] {
#vset [split [lindex $TRID 0] :] {typeTRID lengthTRID}
set TRID [lindex $TRID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S17F8 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S17F7R
S17F8 | Trace Delete Ack |
Sent by Equipment Only |
# S17F8 Tcl Parse reply
set reply [secs_xact $spname S17F7R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 ACKA {L:m {L:3 TRID ERRCODE ERRTEXT}}
# ACKA TF:1 (always) request success
# TRID A:n (varies) trace request ID
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {ACKA Lm}
if {[lindex $ACKA 0] != "TF:1"} {set ok 0; break}
set ACKA [lindex $ACKA 1]
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach L3_1 [lreplace $Lm 0 0] {
if { [lindex $L3_1 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3_1 0 0] {TRID ERRCODE ERRTEXT}
#vset [split [lindex $TRID 0] :] {typeTRID lengthTRID}
set TRID [lindex $TRID 1]
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S17F9R | Collection Event Link Req |
Sent by Host Only |
# S17F9R Tcl Receive message - add next line to setup
$spname whenever S17F9 [list recv_S17F9R $spname]
# receive procedure
proc recv_S17F9R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 DATAID EVNTSRC CEID {L:n RPTID}
# DATAID U4:1 (varies) an identifier to correlate related messages
# EVNTSRC A:n (always) identifies an event source, use length 0 to specify the default
# CEID U4:1 (varies) collection event identifier, GEM requires type Un
# RPTID U4:1 (varies) report ID
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DATAID EVNTSRC CEID Ln}
#vset [split [lindex $DATAID 0] :] {typeDATAID lengthDATAID}
set DATAID [lindex $DATAID 1]
if {[string first "A:" [lindex $EVNTSRC 0]] != 0} {set ok 0; break}
set EVNTSRC [lindex $EVNTSRC 1]
#vset [split [lindex $CEID 0] :] {typeCEID lengthCEID}
set CEID [lindex $CEID 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach RPTID [lreplace $Ln 0 0] {
#vset [split [lindex $RPTID 0] :] {typeRPTID lengthRPTID}
set RPTID [lindex $RPTID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S17F10 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S17F9R
S17F10 | Collection Event Link Ack |
Sent by Equipment Only |
# S17F10 Tcl Parse reply
set reply [secs_xact $spname S17F9R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:3 EVNTSRC CEID ERRCODE
# EVNTSRC A:n (always) identifies an event source, use length 0 to specify the default
# CEID U4:1 (varies) collection event identifier, GEM requires type Un
# ERRCODE U4:1 (varies) error code
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {EVNTSRC CEID ERRCODE}
if {[string first "A:" [lindex $EVNTSRC 0]] != 0} {set ok 0; break}
set EVNTSRC [lindex $EVNTSRC 1]
#vset [split [lindex $CEID 0] :] {typeCEID lengthCEID}
set CEID [lindex $CEID 1]
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
return ;# finished ok
} ;# end while(ok)
S17F11R | Collection Event Unlink |
Sent by Host Only |
# S17F11R Tcl Receive message - add next line to setup
$spname whenever S17F11 [list recv_S17F11R $spname]
# receive procedure
proc recv_S17F11R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 EVNTSRC CEID RPTID
# EVNTSRC A:n (always) identifies an event source, use length 0 to specify the default
# CEID U4:1 (varies) collection event identifier, GEM requires type Un
# RPTID U4:1 (varies) report ID
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {EVNTSRC CEID RPTID}
if {[string first "A:" [lindex $EVNTSRC 0]] != 0} {set ok 0; break}
set EVNTSRC [lindex $EVNTSRC 1]
#vset [split [lindex $CEID 0] :] {typeCEID lengthCEID}
set CEID [lindex $CEID 1]
#vset [split [lindex $RPTID 0] :] {typeRPTID lengthRPTID}
set RPTID [lindex $RPTID 1]
if {$send_reply} {
# TBD create reply data
$spname put S17F12 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S17F11R
S17F12 | Collection Event Unlink Ack |
Sent by Equipment Only |
# S17F12 Tcl Parse reply
set reply [secs_xact $spname S17F11R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:4 EVNTSRC CEID RPTID ERRCODE
# EVNTSRC A:n (always) identifies an event source, use length 0 to specify the default
# CEID U4:1 (varies) collection event identifier, GEM requires type Un
# RPTID U4:1 (varies) report ID
# ERRCODE U4:1 (varies) error code
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {EVNTSRC CEID RPTID ERRCODE}
if {[string first "A:" [lindex $EVNTSRC 0]] != 0} {set ok 0; break}
set EVNTSRC [lindex $EVNTSRC 1]
#vset [split [lindex $CEID 0] :] {typeCEID lengthCEID}
set CEID [lindex $CEID 1]
#vset [split [lindex $RPTID 0] :] {typeRPTID lengthRPTID}
set RPTID [lindex $RPTID 1]
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
return ;# finished ok
} ;# end while(ok)
S17F13R | Trace Reset Req |
Sent by Host Only |
# S17F13R Tcl Receive message - add next line to setup
$spname whenever S17F13 [list recv_S17F13R $spname]
# receive procedure
proc recv_S17F13R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:n TRID
# TRID A:n (varies) trace request ID
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach TRID [lreplace $TSN_data 0 0] {
#vset [split [lindex $TRID 0] :] {typeTRID lengthTRID}
set TRID [lindex $TRID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S17F14 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S17F13R
S17F14 | Trace Reset Ack |
Sent by Equipment Only |
# S17F14 Tcl Parse reply
set reply [secs_xact $spname S17F13R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 ACKA {L:m {L:3 TRID ERRCODE ERRTEXT}}
# ACKA TF:1 (always) request success
# TRID A:n (varies) trace request ID
# ERRCODE U4:1 (varies) error code
# ERRTEXT A:80 (always) description of ERRCODE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {ACKA Lm}
if {[lindex $ACKA 0] != "TF:1"} {set ok 0; break}
set ACKA [lindex $ACKA 1]
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach L3_1 [lreplace $Lm 0 0] {
if { [lindex $L3_1 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3_1 0 0] {TRID ERRCODE ERRTEXT}
#vset [split [lindex $TRID 0] :] {typeTRID lengthTRID}
set TRID [lindex $TRID 1]
#vset [split [lindex $ERRCODE 0] :] {typeERRCODE lengthERRCODE}
set ERRCODE [lindex $ERRCODE 1]
if {[string first "A:" [lindex $ERRTEXT 0]] != 0} {set ok 0; break}
set ERRTEXT [lindex $ERRTEXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S18F1R | Read Attribute Req |
Sent by Host Only |
# S18F1R Tcl Receive message - add next line to setup
$spname whenever S18F1 [list recv_S18F1R $spname]
# receive procedure
proc recv_S18F1R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 TARGETID {L:n ATTRID}
# TARGETID A:n (always) the OBJSPEC for the target object
# ATTRID A:40 (varies) identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~. Does not begin or end with space.
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TARGETID Ln}
if {[string first "A:" [lindex $TARGETID 0]] != 0} {set ok 0; break}
set TARGETID [lindex $TARGETID 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach ATTRID [lreplace $Ln 0 0] {
#vset [split [lindex $ATTRID 0] :] {typeATTRID lengthATTRID}
set ATTRID [lindex $ATTRID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S18F2 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S18F1R
S18F2 | Read Attribute Data |
Sent by Equipment Only |
Comment: E5 differs from OEM tools
Format:
# S18F2 Tcl Parse reply
set reply [secs_xact $spname S18F1R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:4 TARGETID SSACK {L:n ATTRDATA} {L:s STATUS}
# TARGETID A:n (always) the OBJSPEC for the target object
# SSACK A:2 (always) two character codes for success or failure, NO Normal, EE exec. err, CE comm. err, HE h/w err, TE tag err
# ATTRDATA A:n (varies) a specific attribute value of any data type
# STATUS A:n (always) subsystem status data
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TARGETID SSACK Ln Ls_n1}
if {[string first "A:" [lindex $TARGETID 0]] != 0} {set ok 0; break}
set TARGETID [lindex $TARGETID 1]
if {[string first "A:" [lindex $SSACK 0]] != 0} {set ok 0; break}
set SSACK [lindex $SSACK 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach ATTRDATA [lreplace $Ln 0 0] {
#vset [split [lindex $ATTRDATA 0] :] {typeATTRDATA lengthATTRDATA}
set ATTRDATA [lindex $ATTRDATA 1]
}
if {!$ok} break
if {[string first L: [lindex $Ls_n1 0]] != 0} {set ok 0; break}
foreach STATUS [lreplace $Ls_n1 0 0] {
if {[string first "A:" [lindex $STATUS 0]] != 0} {set ok 0; break}
set STATUS [lindex $STATUS 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S18F3R | Write Attribute Req |
Sent by Host Only |
# S18F3R Tcl Receive message - add next line to setup
$spname whenever S18F3 [list recv_S18F3R $spname]
# receive procedure
proc recv_S18F3R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 TARGETID {L:n {L:2 ATTRID ATTRDATA}}
# TARGETID A:n (always) the OBJSPEC for the target object
# ATTRID A:40 (varies) identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~. Does not begin or end with space.
# ATTRDATA A:n (varies) a specific attribute value of any data type
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TARGETID Ln}
if {[string first "A:" [lindex $TARGETID 0]] != 0} {set ok 0; break}
set TARGETID [lindex $TARGETID 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {ATTRID ATTRDATA}
#vset [split [lindex $ATTRID 0] :] {typeATTRID lengthATTRID}
set ATTRID [lindex $ATTRID 1]
#vset [split [lindex $ATTRDATA 0] :] {typeATTRDATA lengthATTRDATA}
set ATTRDATA [lindex $ATTRDATA 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S18F4 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S18F3R
S18F4 | Write Attribute Ack |
Sent by Equipment Only |
Comment: fixed E5 mistake
Format:
# S18F4 Tcl Parse reply
set reply [secs_xact $spname S18F3R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:3 TARGETID SSACK {L:s STATUS}
# TARGETID A:n (always) the OBJSPEC for the target object
# SSACK A:2 (always) two character codes for success or failure, NO Normal, EE exec. err, CE comm. err, HE h/w err, TE tag err
# STATUS A:n (always) subsystem status data
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TARGETID SSACK Ls}
if {[string first "A:" [lindex $TARGETID 0]] != 0} {set ok 0; break}
set TARGETID [lindex $TARGETID 1]
if {[string first "A:" [lindex $SSACK 0]] != 0} {set ok 0; break}
set SSACK [lindex $SSACK 1]
if {[string first L: [lindex $Ls 0]] != 0} {set ok 0; break}
foreach STATUS [lreplace $Ls 0 0] {
if {[string first "A:" [lindex $STATUS 0]] != 0} {set ok 0; break}
set STATUS [lindex $STATUS 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S18F5R | Read Request |
Sent by Host Only |
# S18F5R Tcl Receive message - add next line to setup
$spname whenever S18F5 [list recv_S18F5R $spname]
# receive procedure
proc recv_S18F5R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 TARGETID DATASEG DATALENGTH
# TARGETID A:n (always) the OBJSPEC for the target object
# DATASEG A:n (varies) identifies data requested, E87 requires text
# DATALENGTH U4:1 (varies) total bytes of the message body
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TARGETID DATASEG DATALENGTH}
if {[string first "A:" [lindex $TARGETID 0]] != 0} {set ok 0; break}
set TARGETID [lindex $TARGETID 1]
#vset [split [lindex $DATASEG 0] :] {typeDATASEG lengthDATASEG}
set DATASEG [lindex $DATASEG 1]
#vset [split [lindex $DATALENGTH 0] :] {typeDATALENGTH lengthDATALENGTH}
set DATALENGTH [lindex $DATALENGTH 1]
if {$send_reply} {
# TBD create reply data
$spname put S18F6 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S18F5R
S18F6 | Read Data |
Sent by Equipment Only |
# S18F6 Tcl Parse reply
set reply [secs_xact $spname S18F5R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:4 TARGETID SSACK DATA {L:s STATUS}
# TARGETID A:n (always) the OBJSPEC for the target object
# SSACK A:2 (always) two character codes for success or failure, NO Normal, EE exec. err, CE comm. err, HE h/w err, TE tag err
# DATA A:n (varies) unformatted data
# STATUS A:n (always) subsystem status data
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TARGETID SSACK DATA Ls}
if {[string first "A:" [lindex $TARGETID 0]] != 0} {set ok 0; break}
set TARGETID [lindex $TARGETID 1]
if {[string first "A:" [lindex $SSACK 0]] != 0} {set ok 0; break}
set SSACK [lindex $SSACK 1]
#vset [split [lindex $DATA 0] :] {typeDATA lengthDATA}
set DATA [lindex $DATA 1]
if {[string first L: [lindex $Ls 0]] != 0} {set ok 0; break}
foreach STATUS [lreplace $Ls 0 0] {
if {[string first "A:" [lindex $STATUS 0]] != 0} {set ok 0; break}
set STATUS [lindex $STATUS 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S18F7R | Write Data Request |
Sent by Host Only |
# S18F7R Tcl Receive message - add next line to setup
$spname whenever S18F7 [list recv_S18F7R $spname]
# receive procedure
proc recv_S18F7R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 TARGETID DATASEG DATALENGTH DATA
# TARGETID A:n (always) the OBJSPEC for the target object
# DATASEG A:n (varies) identifies data requested, E87 requires text
# DATALENGTH U4:1 (varies) total bytes of the message body
# DATA A:n (varies) unformatted data
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TARGETID DATASEG DATALENGTH DATA}
if {[string first "A:" [lindex $TARGETID 0]] != 0} {set ok 0; break}
set TARGETID [lindex $TARGETID 1]
#vset [split [lindex $DATASEG 0] :] {typeDATASEG lengthDATASEG}
set DATASEG [lindex $DATASEG 1]
#vset [split [lindex $DATALENGTH 0] :] {typeDATALENGTH lengthDATALENGTH}
set DATALENGTH [lindex $DATALENGTH 1]
#vset [split [lindex $DATA 0] :] {typeDATA lengthDATA}
set DATA [lindex $DATA 1]
if {$send_reply} {
# TBD create reply data
$spname put S18F8 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S18F7R
S18F8 | Write Data Ack |
Sent by Equipment Only |
# S18F8 Tcl Parse reply
set reply [secs_xact $spname S18F7R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:3 TARGETID SSACK {L:s STATUS}
# TARGETID A:n (always) the OBJSPEC for the target object
# SSACK A:2 (always) two character codes for success or failure, NO Normal, EE exec. err, CE comm. err, HE h/w err, TE tag err
# STATUS A:n (always) subsystem status data
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TARGETID SSACK Ls}
if {[string first "A:" [lindex $TARGETID 0]] != 0} {set ok 0; break}
set TARGETID [lindex $TARGETID 1]
if {[string first "A:" [lindex $SSACK 0]] != 0} {set ok 0; break}
set SSACK [lindex $SSACK 1]
if {[string first L: [lindex $Ls 0]] != 0} {set ok 0; break}
foreach STATUS [lreplace $Ls 0 0] {
if {[string first "A:" [lindex $STATUS 0]] != 0} {set ok 0; break}
set STATUS [lindex $STATUS 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S18F9R | Read ID Req |
Sent by Host Only |
# S18F9R Tcl Receive message - add next line to setup
$spname whenever S18F9 [list recv_S18F9R $spname]
# receive procedure
proc recv_S18F9R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect TARGETID
# TARGETID A:n (always) the OBJSPEC for the target object
if {[string first "A:" [lindex $TSN_data 0]] != 0} {set ok 0; break}
set TARGETID [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S18F10 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S18F9R
S18F10 | Read ID Data |
Sent by Equipment Only |
# S18F10 Tcl Parse reply
set reply [secs_xact $spname S18F9R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:4 TARGETID SSACK MID {L:s STATUS}
# TARGETID A:n (always) the OBJSPEC for the target object
# SSACK A:2 (always) two character codes for success or failure, NO Normal, EE exec. err, CE comm. err, HE h/w err, TE tag err
# MID A:16 (varies) material ID, E40 restricts to A:n
# STATUS A:n (always) subsystem status data
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TARGETID SSACK MID Ls}
if {[string first "A:" [lindex $TARGETID 0]] != 0} {set ok 0; break}
set TARGETID [lindex $TARGETID 1]
if {[string first "A:" [lindex $SSACK 0]] != 0} {set ok 0; break}
set SSACK [lindex $SSACK 1]
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
if {[string first L: [lindex $Ls 0]] != 0} {set ok 0; break}
foreach STATUS [lreplace $Ls 0 0] {
if {[string first "A:" [lindex $STATUS 0]] != 0} {set ok 0; break}
set STATUS [lindex $STATUS 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S18F11R | Write ID Req |
Sent by Host Only |
# S18F11R Tcl Receive message - add next line to setup
$spname whenever S18F11 [list recv_S18F11R $spname]
# receive procedure
proc recv_S18F11R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 TARGETID MID
# TARGETID A:n (always) the OBJSPEC for the target object
# MID A:16 (varies) material ID, E40 restricts to A:n
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TARGETID MID}
if {[string first "A:" [lindex $TARGETID 0]] != 0} {set ok 0; break}
set TARGETID [lindex $TARGETID 1]
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
if {$send_reply} {
# TBD create reply data
$spname put S18F12 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S18F11R
S18F12 | Write ID Ack |
Sent by Equipment Only |
# S18F12 Tcl Parse reply
set reply [secs_xact $spname S18F11R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:3 TARGETID SSACK {L:s STATUS}
# TARGETID A:n (always) the OBJSPEC for the target object
# SSACK A:2 (always) two character codes for success or failure, NO Normal, EE exec. err, CE comm. err, HE h/w err, TE tag err
# STATUS A:n (always) subsystem status data
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TARGETID SSACK Ls}
if {[string first "A:" [lindex $TARGETID 0]] != 0} {set ok 0; break}
set TARGETID [lindex $TARGETID 1]
if {[string first "A:" [lindex $SSACK 0]] != 0} {set ok 0; break}
set SSACK [lindex $SSACK 1]
if {[string first L: [lindex $Ls 0]] != 0} {set ok 0; break}
foreach STATUS [lreplace $Ls 0 0] {
if {[string first "A:" [lindex $STATUS 0]] != 0} {set ok 0; break}
set STATUS [lindex $STATUS 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S18F13R | Subsystem Command |
Sent by Host Only |
# S18F13R Tcl Receive message - add next line to setup
$spname whenever S18F13 [list recv_S18F13R $spname]
# receive procedure
proc recv_S18F13R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 TARGETID SSCMD {L:n CPVAL}
# TARGETID A:n (always) the OBJSPEC for the target object
# SSCMD A:n (always) subsystem action command
# CPVAL A:n (varies) command parameter value, any scalar type
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TARGETID SSCMD Ln}
if {[string first "A:" [lindex $TARGETID 0]] != 0} {set ok 0; break}
set TARGETID [lindex $TARGETID 1]
if {[string first "A:" [lindex $SSCMD 0]] != 0} {set ok 0; break}
set SSCMD [lindex $SSCMD 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach CPVAL [lreplace $Ln 0 0] {
#vset [split [lindex $CPVAL 0] :] {typeCPVAL lengthCPVAL}
set CPVAL [lindex $CPVAL 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S18F14 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S18F13R
S18F14 | Subsystem Command Ack |
Sent by Equipment Only |
# S18F14 Tcl Parse reply
set reply [secs_xact $spname S18F13R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:3 TARGETID SSACK {L:s STATUS}
# TARGETID A:n (always) the OBJSPEC for the target object
# SSACK A:2 (always) two character codes for success or failure, NO Normal, EE exec. err, CE comm. err, HE h/w err, TE tag err
# STATUS A:n (always) subsystem status data
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TARGETID SSACK Ls}
if {[string first "A:" [lindex $TARGETID 0]] != 0} {set ok 0; break}
set TARGETID [lindex $TARGETID 1]
if {[string first "A:" [lindex $SSACK 0]] != 0} {set ok 0; break}
set SSACK [lindex $SSACK 1]
if {[string first L: [lindex $Ls 0]] != 0} {set ok 0; break}
foreach STATUS [lreplace $Ls 0 0] {
if {[string first "A:" [lindex $STATUS 0]] != 0} {set ok 0; break}
set STATUS [lindex $STATUS 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S18F15R | Read 2D Code Cond Req |
Sent by Host Only |
# S18F15R Tcl Receive message - add next line to setup
$spname whenever S18F15 [list recv_S18F15R $spname]
# receive procedure
proc recv_S18F15R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect TARGETID
# TARGETID A:n (always) the OBJSPEC for the target object
if {[string first "A:" [lindex $TSN_data 0]] != 0} {set ok 0; break}
set TARGETID [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S18F16 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S18F15R
S18F16 | Read 2D Code Cond Data |
Sent by Equipment Only |
# S18F16 Tcl Parse reply
set reply [secs_xact $spname S18F15R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:5 TARGETID SSACK MID {L:s STATUS} {L:c CONDITION}
# TARGETID A:n (always) the OBJSPEC for the target object
# SSACK A:2 (always) two character codes for success or failure, NO Normal, EE exec. err, CE comm. err, HE h/w err, TE tag err
# MID A:16 (varies) material ID, E40 restricts to A:n
# STATUS A:n (always) subsystem status data
# CONDITION A:n (always) sub-system condition info tag
if { [lindex $TSN_data 0] != "L:5" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TARGETID SSACK MID Ls Lc_n1}
if {[string first "A:" [lindex $TARGETID 0]] != 0} {set ok 0; break}
set TARGETID [lindex $TARGETID 1]
if {[string first "A:" [lindex $SSACK 0]] != 0} {set ok 0; break}
set SSACK [lindex $SSACK 1]
#vset [split [lindex $MID 0] :] {typeMID lengthMID}
set MID [lindex $MID 1]
if {[string first L: [lindex $Ls 0]] != 0} {set ok 0; break}
foreach STATUS [lreplace $Ls 0 0] {
if {[string first "A:" [lindex $STATUS 0]] != 0} {set ok 0; break}
set STATUS [lindex $STATUS 1]
}
if {!$ok} break
if {[string first L: [lindex $Lc_n1 0]] != 0} {set ok 0; break}
foreach CONDITION [lreplace $Lc_n1 0 0] {
if {[string first "A:" [lindex $CONDITION 0]] != 0} {set ok 0; break}
set CONDITION [lindex $CONDITION 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S19F1R | Request Process Definition Element (PDE) Directory |
Sent by Host and Equipment |
Comment: SEE SEMI E139. If m=0, all PDE's are returned. If n=0, no additional attributes are returned. Selection conditions are ANDed together.
Format:
# S19F1R Tcl Receive message - add next line to setup
$spname whenever S19F1 [list recv_S19F1R $spname]
# receive procedure
proc recv_S19F1R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 {L:m {L:3 PDEATTRIBUTENAME COMPARISONOPERATOR PDEATTRIBUTEVALUE}} {L:n PDEATTRIBUTE}
# PDEATTRIBUTENAME U1:1 (always) identifies a PDE attribute type
# COMPARISONOPERATOR U1:1 (always) choice of comparison operators. Interpreted as "target <op> <const>" where <op> is this value and <const> is supplied in the expression
# PDEATTRIBUTEVALUE A (varies) contains the value of a PDE Attribute, may be type L, A, TF, U1
# PDEATTRIBUTE U1:1 (always) a reportable PDE attribute type, not necessarily useable in a filter expression
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {Lm Ln_n1}
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach L3_1 [lreplace $Lm 0 0] {
if { [lindex $L3_1 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3_1 0 0] {PDEATTRIBUTENAME COMPARISONOPERATOR PDEATTRIBUTEVALUE}
if {[lindex $PDEATTRIBUTENAME 0] != "U1:1"} {set ok 0; break}
set PDEATTRIBUTENAME [lindex $PDEATTRIBUTENAME 1]
if {[lindex $COMPARISONOPERATOR 0] != "U1:1"} {set ok 0; break}
set COMPARISONOPERATOR [lindex $COMPARISONOPERATOR 1]
#vset [split [lindex $PDEATTRIBUTEVALUE 0] :] {typePDEATTRIBUTEVALUE lengthPDEATTRIBUTEVALUE}
set PDEATTRIBUTEVALUE [lindex $PDEATTRIBUTEVALUE 1]
}
if {!$ok} break
if {[string first L: [lindex $Ln_n1 0]] != 0} {set ok 0; break}
foreach PDEATTRIBUTE [lreplace $Ln_n1 0 0] {
if {[lindex $PDEATTRIBUTE 0] != "U1:1"} {set ok 0; break}
set PDEATTRIBUTE [lindex $PDEATTRIBUTE 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S19F2 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S19F1R
S19F2 | PDE Directory Data |
Sent by Host and Equipment |
Comment: the list of PDEs, and their attributes matching the request
Format:
# S19F2 Tcl Parse reply
set reply [secs_xact $spname S19F1R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:3 DIRRSPSTAT STATUSTXT {L:m {L:2 UID {L:n {L:2 PDEATTRIBUTE PDEATTRIBUTEVALUE}}}}
# DIRRSPSTAT U1:1 (always) get dir status response
# STATUSTXT A:80 (always) status response description
# UID A:36 (always) See SEMI E139. A unique identifier for a PDE consisting of a 36 character string with runs of 8, 4, 4, 4, and 12 characters separated by hyphens
# PDEATTRIBUTE U1:1 (always) a reportable PDE attribute type, not necessarily useable in a filter expression
# PDEATTRIBUTEVALUE A (varies) contains the value of a PDE Attribute, may be type L, A, TF, U1
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {DIRRSPSTAT STATUSTXT Lm}
if {[lindex $DIRRSPSTAT 0] != "U1:1"} {set ok 0; break}
set DIRRSPSTAT [lindex $DIRRSPSTAT 1]
if {[string first "A:" [lindex $STATUSTXT 0]] != 0} {set ok 0; break}
set STATUSTXT [lindex $STATUSTXT 1]
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lm 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {UID Ln_2}
if {[string first "A:" [lindex $UID 0]] != 0} {set ok 0; break}
set UID [lindex $UID 1]
if {[string first L: [lindex $Ln_2 0]] != 0} {set ok 0; break}
foreach L2_3 [lreplace $Ln_2 0 0] {
if { [lindex $L2_3 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_3 0 0] {PDEATTRIBUTE PDEATTRIBUTEVALUE}
if {[lindex $PDEATTRIBUTE 0] != "U1:1"} {set ok 0; break}
set PDEATTRIBUTE [lindex $PDEATTRIBUTE 1]
#vset [split [lindex $PDEATTRIBUTEVALUE 0] :] {typePDEATTRIBUTEVALUE lengthPDEATTRIBUTEVALUE}
set PDEATTRIBUTEVALUE [lindex $PDEATTRIBUTEVALUE 1]
}
if {!$ok} break
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S19F3R | PDE Delete Request |
Sent by Host Only |
Comment: L:0 is not allowed. Surprisingly the command is only defined for the host despite S19F1R being for both.
Format:
# S19F3R Tcl Receive message - add next line to setup
$spname whenever S19F3 [list recv_S19F3R $spname]
# receive procedure
proc recv_S19F3R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:n UID
# UID A:36 (always) See SEMI E139. A unique identifier for a PDE consisting of a 36 character string with runs of 8, 4, 4, 4, and 12 characters separated by hyphens
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach UID [lreplace $TSN_data 0 0] {
if {[string first "A:" [lindex $UID 0]] != 0} {set ok 0; break}
set UID [lindex $UID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S19F4 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S19F3R
S19F4 | PDE Delete Acknowledge |
Sent by Equipment Only |
Comment: Surprisingly L:0 is specified as the reply for L:0 input instead of S9F7.
Format:
# S19F4 Tcl Parse reply
set reply [secs_xact $spname S19F3R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:n {L:3 UID DELRSPSTAT STATUSTXT}
# UID A:36 (always) See SEMI E139. A unique identifier for a PDE consisting of a 36 character string with runs of 8, 4, 4, 4, and 12 characters separated by hyphens
# DELRSPSTAT U1:1 (always) Response code for the PDE deletion request, non-zero means not deleted
# STATUSTXT A:80 (always) status response description
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach L3 [lreplace $TSN_data 0 0] {
if { [lindex $L3 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3 0 0] {UID DELRSPSTAT STATUSTXT}
if {[string first "A:" [lindex $UID 0]] != 0} {set ok 0; break}
set UID [lindex $UID 1]
if {[lindex $DELRSPSTAT 0] != "U1:1"} {set ok 0; break}
set DELRSPSTAT [lindex $DELRSPSTAT 1]
if {[string first "A:" [lindex $STATUSTXT 0]] != 0} {set ok 0; break}
set STATUSTXT [lindex $STATUSTXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S19F5R | PDE Header Data Request |
Sent by Host and Equipment |
Comment: n = 0 is not allowed
Format:
# S19F5R Tcl Receive message - add next line to setup
$spname whenever S19F5 [list recv_S19F5R $spname]
# receive procedure
proc recv_S19F5R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:n UID
# UID A:36 (always) See SEMI E139. A unique identifier for a PDE consisting of a 36 character string with runs of 8, 4, 4, 4, and 12 characters separated by hyphens
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach UID [lreplace $TSN_data 0 0] {
if {[string first "A:" [lindex $UID 0]] != 0} {set ok 0; break}
set UID [lindex $UID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S19F6 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S19F5R
S19F6 | PDE Header Data Reply |
Sent by Host and Equipment |
Comment: A zero length TCID is sent if there are no code 0 PDEs. If L:0 S19F5R input then n=0 reply instead of S9F7!
Format:
# S19F6 Tcl Parse reply
set reply [secs_xact $spname S19F5R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 TCID {L:n {L:3 UID GETRSPSTAT STATUSTXT}}
# TCID A:36 (always) The identity of a transfer container specified as a 36 character string with runs of 8, 4, 4, 4, and 12 characters joined by hyphens
# UID A:36 (always) See SEMI E139. A unique identifier for a PDE consisting of a 36 character string with runs of 8, 4, 4, 4, and 12 characters separated by hyphens
# GETRSPSTAT U1:1 (always) Response code for PDE queries, non-zero indicates failure
# STATUSTXT A:80 (always) status response description
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TCID Ln}
if {[string first "A:" [lindex $TCID 0]] != 0} {set ok 0; break}
set TCID [lindex $TCID 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L3_1 [lreplace $Ln 0 0] {
if { [lindex $L3_1 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3_1 0 0] {UID GETRSPSTAT STATUSTXT}
if {[string first "A:" [lindex $UID 0]] != 0} {set ok 0; break}
set UID [lindex $UID 1]
if {[lindex $GETRSPSTAT 0] != "U1:1"} {set ok 0; break}
set GETRSPSTAT [lindex $GETRSPSTAT 1]
if {[string first "A:" [lindex $STATUSTXT 0]] != 0} {set ok 0; break}
set STATUSTXT [lindex $STATUSTXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S19F7R | request the transfer of PDEs via Stream 13 |
Sent by Host and Equipment |
Comment: n = 0 is not allowed
Format:
# S19F7R Tcl Receive message - add next line to setup
$spname whenever S19F7 [list recv_S19F7R $spname]
# receive procedure
proc recv_S19F7R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:n UID
# UID A:36 (always) See SEMI E139. A unique identifier for a PDE consisting of a 36 character string with runs of 8, 4, 4, 4, and 12 characters separated by hyphens
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach UID [lreplace $TSN_data 0 0] {
if {[string first "A:" [lindex $UID 0]] != 0} {set ok 0; break}
set UID [lindex $UID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S19F8 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S19F7R
S19F8 | PDE Transfer Reply |
Sent by Host and Equipment |
Comment: Each PDE data set with the GETRSPSTAT response code of 0 will be sent in a Stream 13 TransferContainer. A zero length TCID is sent if there are no code 0 PDEs. If L:0 S19F7R input then n=0 reply instead of S9F7!
Format:
# S19F8 Tcl Parse reply
set reply [secs_xact $spname S19F7R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 TCID {L:n {L:3 UID GETRSPSTAT STATUSTXT}}
# TCID A:36 (always) The identity of a transfer container specified as a 36 character string with runs of 8, 4, 4, 4, and 12 characters joined by hyphens
# UID A:36 (always) See SEMI E139. A unique identifier for a PDE consisting of a 36 character string with runs of 8, 4, 4, 4, and 12 characters separated by hyphens
# GETRSPSTAT U1:1 (always) Response code for PDE queries, non-zero indicates failure
# STATUSTXT A:80 (always) status response description
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TCID Ln}
if {[string first "A:" [lindex $TCID 0]] != 0} {set ok 0; break}
set TCID [lindex $TCID 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L3_1 [lreplace $Ln 0 0] {
if { [lindex $L3_1 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3_1 0 0] {UID GETRSPSTAT STATUSTXT}
if {[string first "A:" [lindex $UID 0]] != 0} {set ok 0; break}
set UID [lindex $UID 1]
if {[lindex $GETRSPSTAT 0] != "U1:1"} {set ok 0; break}
set GETRSPSTAT [lindex $GETRSPSTAT 1]
if {[string first "A:" [lindex $STATUSTXT 0]] != 0} {set ok 0; break}
set STATUSTXT [lindex $STATUSTXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S19F9R | Request to Send PDE |
Sent by Host and Equipment |
Comment: Request permission to initiate PDE transfer using S19F11R.
Format:
# S19F9R Tcl Receive message - add next line to setup
$spname whenever S19F9 [list recv_S19F9R $spname]
# receive procedure
proc recv_S19F9R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 TCID TRANSFERSIZE
# TCID A:36 (always) The identity of a transfer container specified as a 36 character string with runs of 8, 4, 4, 4, and 12 characters joined by hyphens
# TRANSFERSIZE U8:1 (always) SIze in bytes of the TransferContainer. An 8 byte value but HSMS uses 4 byte message lengths!!!
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TCID TRANSFERSIZE}
if {[string first "A:" [lindex $TCID 0]] != 0} {set ok 0; break}
set TCID [lindex $TCID 1]
if {[lindex $TRANSFERSIZE 0] != "U8:1"} {set ok 0; break}
set TRANSFERSIZE [lindex $TRANSFERSIZE 1]
if {$send_reply} {
# TBD create reply data
$spname put S19F10 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S19F9R
S19F10 | Initiate PDE transfer Reply |
Sent by Host and Equipment |
# S19F10 Tcl Parse reply
set reply [secs_xact $spname S19F9R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:3 TCID RTSRSPSTAT STATUSTXT
# TCID A:36 (always) The identity of a transfer container specified as a 36 character string with runs of 8, 4, 4, 4, and 12 characters joined by hyphens
# RTSRSPSTAT U1:1 (always) PDE transfer request reply code, non-zero means denied
# STATUSTXT A:80 (always) status response description
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TCID RTSRSPSTAT STATUSTXT}
if {[string first "A:" [lindex $TCID 0]] != 0} {set ok 0; break}
set TCID [lindex $TCID 1]
if {[lindex $RTSRSPSTAT 0] != "U1:1"} {set ok 0; break}
set RTSRSPSTAT [lindex $RTSRSPSTAT 1]
if {[string first "A:" [lindex $STATUSTXT 0]] != 0} {set ok 0; break}
set STATUSTXT [lindex $STATUSTXT 1]
return ;# finished ok
} ;# end while(ok)
S19F11R | Send PDE |
Sent by Host and Equipment |
Comment: tells the receiver to initiate a Stream 13 transfer with the DSNAME = TCID
Format:
# S19F11R Tcl Receive message - add next line to setup
$spname whenever S19F11 [list recv_S19F11R $spname]
# receive procedure
proc recv_S19F11R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect TCID
# TCID A:36 (always) The identity of a transfer container specified as a 36 character string with runs of 8, 4, 4, 4, and 12 characters joined by hyphens
if {[string first "A:" [lindex $TSN_data 0]] != 0} {set ok 0; break}
set TCID [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S19F12 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S19F11R
S19F12 | Send PDE Acknowledge |
Sent by Host and Equipment |
Comment: Header only. The transfer result status is sent in S19F13.
Format:
# S19F12 Tcl Parse reply
set reply [secs_xact $spname S19F11R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# no data expected
return ;# finished ok
} ;# end while(ok)
S19F13R | TransferContainer Report |
Sent by Host and Equipment |
Comment: Acknowledges the receipt of a TransferContainer using S13. Verification of transferred PDEs is rrequired when received by equipment.
Format:
# S19F13R Tcl Receive message - add next line to setup
$spname whenever S19F13 [list recv_S19F13R $spname]
# receive procedure
proc recv_S19F13R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:n {L:4 UID SENDRSPSTAT VERIFYRSPSTAT STATUSTXT}
# UID A:36 (always) See SEMI E139. A unique identifier for a PDE consisting of a 36 character string with runs of 8, 4, 4, 4, and 12 characters separated by hyphens
# SENDRSPSTAT U1:1 (always) Return codes for the Send PDE request, non-zero means failure
# VERIFYRSPSTAT U1:1 (always) PDE verification result, 0 success, 10 none, other error
# STATUSTXT A:80 (always) status response description
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach L4 [lreplace $TSN_data 0 0] {
if { [lindex $L4 0] != "L:4" } {set ok 0; break}
vset [lreplace $L4 0 0] {UID SENDRSPSTAT VERIFYRSPSTAT STATUSTXT}
if {[string first "A:" [lindex $UID 0]] != 0} {set ok 0; break}
set UID [lindex $UID 1]
if {[lindex $SENDRSPSTAT 0] != "U1:1"} {set ok 0; break}
set SENDRSPSTAT [lindex $SENDRSPSTAT 1]
if {[lindex $VERIFYRSPSTAT 0] != "U1:1"} {set ok 0; break}
set VERIFYRSPSTAT [lindex $VERIFYRSPSTAT 1]
if {[string first "A:" [lindex $STATUSTXT 0]] != 0} {set ok 0; break}
set STATUSTXT [lindex $STATUSTXT 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S19F14 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S19F13R
S19F14 | TransferContainer Report Ack |
Sent by Host and Equipment |
Comment: header only acknowledges the receipt S19F13R
Format:
# S19F14 Tcl Parse reply
set reply [secs_xact $spname S19F13R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# no data expected
return ;# finished ok
} ;# end while(ok)
S19F15R | Request PDE Resolution |
Sent by Host Only |
Comment: Request the equipment to resolve PDEs in the target. n can be 0 for no InputMap
Format:
# S19F15R Tcl Receive message - add next line to setup
$spname whenever S19F15 [list recv_S19F15R $spname]
# receive procedure
proc recv_S19F15R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 TARGETPDE {L:n {L:2 PDEREF RESOLUTION}}
# TARGETPDE A:36 (always) the UID of the target PDE, a 36 character string with runs of 8,4,4,4, and 12 characters joined by hyphens.
# PDEREF A:36 (always) The UID of a PDE or of a PDE group formatted as a 36 character string with runs of 8, 4, 4, 4, and 12 characters joined by hyphens.
# RESOLUTION A:36 (always) the UID of a PDE
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TARGETPDE Ln}
if {[string first "A:" [lindex $TARGETPDE 0]] != 0} {set ok 0; break}
set TARGETPDE [lindex $TARGETPDE 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {PDEREF RESOLUTION}
if {[string first "A:" [lindex $PDEREF 0]] != 0} {set ok 0; break}
set PDEREF [lindex $PDEREF 1]
if {[string first "A:" [lindex $RESOLUTION 0]] != 0} {set ok 0; break}
set RESOLUTION [lindex $RESOLUTION 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S19F16 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S19F15R
S19F16 | PDE Resolution Data |
Sent by Equipment Only |
Comment: The output map of the recipe structure. L:m has resolved PDEREF. n can be 0, n >= m
Format:
# S19F16 Tcl Parse reply
set reply [secs_xact $spname S19F15R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 {L:m {L:2 PDEREF RESOLUTION}} {L:n {L:3 UID RESPDESTAT STATUSTXT}}
# PDEREF A:36 (always) The UID of a PDE or of a PDE group formatted as a 36 character string with runs of 8, 4, 4, 4, and 12 characters joined by hyphens.
# RESOLUTION A:36 (always) the UID of a PDE
# UID A:36 (always) See SEMI E139. A unique identifier for a PDE consisting of a 36 character string with runs of 8, 4, 4, 4, and 12 characters separated by hyphens
# RESPDESTAT U1:1 (always) status codes for PDE resolution
# STATUSTXT A:80 (always) status response description
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {Lm Ln_n1}
if {[string first L: [lindex $Lm 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Lm 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {PDEREF RESOLUTION}
if {[string first "A:" [lindex $PDEREF 0]] != 0} {set ok 0; break}
set PDEREF [lindex $PDEREF 1]
if {[string first "A:" [lindex $RESOLUTION 0]] != 0} {set ok 0; break}
set RESOLUTION [lindex $RESOLUTION 1]
}
if {!$ok} break
if {[string first L: [lindex $Ln_n1 0]] != 0} {set ok 0; break}
foreach L3_1 [lreplace $Ln_n1 0 0] {
if { [lindex $L3_1 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3_1 0 0] {UID RESPDESTAT STATUSTXT}
if {[string first "A:" [lindex $UID 0]] != 0} {set ok 0; break}
set UID [lindex $UID 1]
if {[lindex $RESPDESTAT 0] != "U1:1"} {set ok 0; break}
set RESPDESTAT [lindex $RESPDESTAT 1]
if {[string first "A:" [lindex $STATUSTXT 0]] != 0} {set ok 0; break}
set STATUSTXT [lindex $STATUSTXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S19F17R | Verify PDE Request |
Sent by Host Only |
Comment: n can be 0 when there is no InputMap
Format:
# S19F17R Tcl Receive message - add next line to setup
$spname whenever S19F17 [list recv_S19F17R $spname]
# receive procedure
proc recv_S19F17R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 TARGETPDE {L:n {L:2 PDEREF RESOLUTION}} VERIFYTYPE VERIFYDEPTH
# TARGETPDE A:36 (always) the UID of the target PDE, a 36 character string with runs of 8,4,4,4, and 12 characters joined by hyphens.
# PDEREF A:36 (always) The UID of a PDE or of a PDE group formatted as a 36 character string with runs of 8, 4, 4, 4, and 12 characters joined by hyphens.
# RESOLUTION A:36 (always) the UID of a PDE
# VERIFYTYPE U1:1 (always) chooses the type of verification
# VERIFYDEPTH U1:1 (always) whether to check only the target, or the target and all referenced PDEs
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {TARGETPDE Ln VERIFYTYPE VERIFYDEPTH}
if {[string first "A:" [lindex $TARGETPDE 0]] != 0} {set ok 0; break}
set TARGETPDE [lindex $TARGETPDE 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L2_1 [lreplace $Ln 0 0] {
if { [lindex $L2_1 0] != "L:2" } {set ok 0; break}
vset [lreplace $L2_1 0 0] {PDEREF RESOLUTION}
if {[string first "A:" [lindex $PDEREF 0]] != 0} {set ok 0; break}
set PDEREF [lindex $PDEREF 1]
if {[string first "A:" [lindex $RESOLUTION 0]] != 0} {set ok 0; break}
set RESOLUTION [lindex $RESOLUTION 1]
}
if {!$ok} break
if {[lindex $VERIFYTYPE 0] != "U1:1"} {set ok 0; break}
set VERIFYTYPE [lindex $VERIFYTYPE 1]
if {[lindex $VERIFYDEPTH 0] != "U1:1"} {set ok 0; break}
set VERIFYDEPTH [lindex $VERIFYDEPTH 1]
if {$send_reply} {
# TBD create reply data
$spname put S19F18 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S19F17R
S19F18 | PDE Verification Result |
Sent by Equipment Only |
# S19F18 Tcl Parse reply
set reply [secs_xact $spname S19F17R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 VERIFYSUCCESS {L:n {L:3 UID VERIFYRSPSTAT STATUSTXT}}
# VERIFYSUCCESS TF:1 (always) True if no errors were found
# UID A:36 (always) See SEMI E139. A unique identifier for a PDE consisting of a 36 character string with runs of 8, 4, 4, 4, and 12 characters separated by hyphens
# VERIFYRSPSTAT U1:1 (always) PDE verification result, 0 success, 10 none, other error
# STATUSTXT A:80 (always) status response description
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {VERIFYSUCCESS Ln}
if {[lindex $VERIFYSUCCESS 0] != "TF:1"} {set ok 0; break}
set VERIFYSUCCESS [lindex $VERIFYSUCCESS 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L3_1 [lreplace $Ln 0 0] {
if { [lindex $L3_1 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3_1 0 0] {UID VERIFYRSPSTAT STATUSTXT}
if {[string first "A:" [lindex $UID 0]] != 0} {set ok 0; break}
set UID [lindex $UID 1]
if {[lindex $VERIFYRSPSTAT 0] != "U1:1"} {set ok 0; break}
set VERIFYRSPSTAT [lindex $VERIFYRSPSTAT 1]
if {[string first "A:" [lindex $STATUSTXT 0]] != 0} {set ok 0; break}
set STATUSTXT [lindex $STATUSTXT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S19F19R | S19 Multi-block Inquire |
Sent by Host and Equipment |
Comment: SECS-I request permission to send multi-block S19F1,3,5,6,13,15,17. Not required for HSMS.
Format:
# S19F19R Tcl Receive message - add next line to setup
$spname whenever S19F19 [list recv_S19F19R $spname]
# receive procedure
proc recv_S19F19R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect DATALENGTH
# DATALENGTH U4:1 (varies) total bytes of the message body
#vset [split [lindex $TSN_data 0] :] {typeDATALENGTH lengthDATALENGTH}
set DATALENGTH [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S19F20 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S19F19R
S19F20 | S19 Multi-block Grant |
Sent by Host and Equipment |
Comment: Usage is not required by the standard. Should not have been included in the standard.
Format:
# S19F20 Tcl Parse reply
set reply [secs_xact $spname S19F19R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect GRANT
# GRANT B:1 (always) multiblock grant code
if {[lindex $TSN_data 0] != "B:1"} {set ok 0; break}
set GRANT [expr [lindex $TSN_data 1]] ;# expr converts 0xhh to int
return ;# finished ok
} ;# end while(ok)
S20F1R | SetSRO Attributes Request |
Sent by Host Only |
Comment: E170 SRO intitialization, enums are inverted booleans so Hume has renamed them
Format:
# S20F1R Tcl Receive message - add next line to setup
$spname whenever S20F1 [list recv_S20F1R $spname]
# receive procedure
proc recv_S20F1R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:6 OBJID OBJTYPE AUTOPOST_DISABLE AUTOCLEAR_DISABLE RETAINRECIPE_DISABLE AUTOCLOSE
# OBJID A:80 (varies) E39 object identifier 1-80 chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OBJTYPE A:40 (varies) object class name, chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# AUTOPOST_DISABLE U1:1 (always) Disable automatic posting of recipes to RMS preceeding SRO move to Local state (E171)
# AUTOCLEAR_DISABLE U1:1 (always) Disable automatic clear of recipes on SRO transition to Local (E171)
# RETAINRECIPE_DISABLE U1:1 (always) Disable automatic retention of recipes on disconnect
# AUTOCLOSE U2:1 (always) Interaction timeout for closing operator session, 0 is no limit
if { [lindex $TSN_data 0] != "L:6" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJID OBJTYPE AUTOPOST_DISABLE AUTOCLEAR_DISABLE RETAINRECIPE_DISABLE AUTOCLOSE}
#vset [split [lindex $OBJID 0] :] {typeOBJID lengthOBJID}
set OBJID [lindex $OBJID 1]
#vset [split [lindex $OBJTYPE 0] :] {typeOBJTYPE lengthOBJTYPE}
set OBJTYPE [lindex $OBJTYPE 1]
if {[lindex $AUTOPOST_DISABLE 0] != "U1:1"} {set ok 0; break}
set AUTOPOST_DISABLE [lindex $AUTOPOST_DISABLE 1]
if {[lindex $AUTOCLEAR_DISABLE 0] != "U1:1"} {set ok 0; break}
set AUTOCLEAR_DISABLE [lindex $AUTOCLEAR_DISABLE 1]
if {[lindex $RETAINRECIPE_DISABLE 0] != "U1:1"} {set ok 0; break}
set RETAINRECIPE_DISABLE [lindex $RETAINRECIPE_DISABLE 1]
if {[lindex $AUTOCLOSE 0] != "U2:1"} {set ok 0; break}
set AUTOCLOSE [lindex $AUTOCLOSE 1]
if {$send_reply} {
# TBD create reply data
$spname put S20F2 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S20F1R
S20F2 | SetSRO Attributes Acknowledge |
Sent by Equipment Only |
# S20F2 Tcl Parse reply
set reply [secs_xact $spname S20F1R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect SSAACK
# SSAACK U1:1 (always) service completion code
if {[lindex $TSN_data 0] != "U1:1"} {set ok 0; break}
set SSAACK [lindex $TSN_data 1]
return ;# finished ok
} ;# end while(ok)
S20F3R | GetOperationIDList Request |
Sent by Host Only |
# S20F3R Tcl Receive message - add next line to setup
$spname whenever S20F3 [list recv_S20F3R $spname]
# receive procedure
proc recv_S20F3R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:3 OBJID OBJTYPE OPETYPE
# OBJID A:80 (varies) E39 object identifier 1-80 chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OBJTYPE A:40 (varies) object class name, chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OPETYPE U1:1 (always) recipe operation type
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJID OBJTYPE OPETYPE}
#vset [split [lindex $OBJID 0] :] {typeOBJID lengthOBJID}
set OBJID [lindex $OBJID 1]
#vset [split [lindex $OBJTYPE 0] :] {typeOBJTYPE lengthOBJTYPE}
set OBJTYPE [lindex $OBJTYPE 1]
if {[lindex $OPETYPE 0] != "U1:1"} {set ok 0; break}
set OPETYPE [lindex $OPETYPE 1]
if {$send_reply} {
# TBD create reply data
$spname put S20F4 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S20F3R
S20F4 | GetOperationIDList Acknowledge |
Sent by Equipment Only |
# S20F4 Tcl Parse reply
set reply [secs_xact $spname S20F3R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 {L:n OPEID} GOILACK
# OPEID A:16 (always) recipe operation identifier
# GOILACK U1:1 (always) completion code
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {Ln GOILACK}
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach OPEID [lreplace $Ln 0 0] {
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
}
if {!$ok} break
if {[lindex $GOILACK 0] != "U1:1"} {set ok 0; break}
set GOILACK [lindex $GOILACK 1]
return ;# finished ok
} ;# end while(ok)
S20F5R | OpenConnectionEvent Send |
Sent by Equipment Only |
# S20F5R Tcl Receive message - add next line to setup
$spname whenever S20F5 [list recv_S20F5R $spname]
# receive procedure
proc recv_S20F5R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:7 OBJID OBJTYPE OPETYPE RMSUSERID RMSPWD EQUSERID OPEID
# OBJID A:80 (varies) E39 object identifier 1-80 chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OBJTYPE A:40 (varies) object class name, chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OPETYPE U1:1 (always) recipe operation type
# RMSUSERID A:64 (always) SRO userID
# RMSPWD A:64 (always) password of SRO user
# EQUSERID A:64 (always) Equipment userID for recipe use authentication
# OPEID A:16 (always) recipe operation identifier
if { [lindex $TSN_data 0] != "L:7" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJID OBJTYPE OPETYPE RMSUSERID RMSPWD EQUSERID OPEID}
#vset [split [lindex $OBJID 0] :] {typeOBJID lengthOBJID}
set OBJID [lindex $OBJID 1]
#vset [split [lindex $OBJTYPE 0] :] {typeOBJTYPE lengthOBJTYPE}
set OBJTYPE [lindex $OBJTYPE 1]
if {[lindex $OPETYPE 0] != "U1:1"} {set ok 0; break}
set OPETYPE [lindex $OPETYPE 1]
if {[string first "A:" [lindex $RMSUSERID 0]] != 0} {set ok 0; break}
set RMSUSERID [lindex $RMSUSERID 1]
if {[string first "A:" [lindex $RMSPWD 0]] != 0} {set ok 0; break}
set RMSPWD [lindex $RMSPWD 1]
if {[string first "A:" [lindex $EQUSERID 0]] != 0} {set ok 0; break}
set EQUSERID [lindex $EQUSERID 1]
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if {$send_reply} {
# TBD create reply data
$spname put S20F6 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S20F5R
S20F6 | OpenConnectionEvent Acknowledge |
Sent by Host Only |
# S20F6 Tcl Parse reply
set reply [secs_xact $spname S20F5R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 OPEID OCEACK
# OPEID A:16 (always) recipe operation identifier
# OCEACK U1:1 (always) event completion code
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OPEID OCEACK}
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if {[lindex $OCEACK 0] != "U1:1"} {set ok 0; break}
set OCEACK [lindex $OCEACK 1]
return ;# finished ok
} ;# end while(ok)
S20F7R | CloseConnectionEvent Send |
Sent by Equipment Only |
Comment: a request to close a connection
Format:
# S20F7R Tcl Receive message - add next line to setup
$spname whenever S20F7 [list recv_S20F7R $spname]
# receive procedure
proc recv_S20F7R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 OBJID OBJTYPE OPETYPE OPEID
# OBJID A:80 (varies) E39 object identifier 1-80 chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OBJTYPE A:40 (varies) object class name, chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OPETYPE U1:1 (always) recipe operation type
# OPEID A:16 (always) recipe operation identifier
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJID OBJTYPE OPETYPE OPEID}
#vset [split [lindex $OBJID 0] :] {typeOBJID lengthOBJID}
set OBJID [lindex $OBJID 1]
#vset [split [lindex $OBJTYPE 0] :] {typeOBJTYPE lengthOBJTYPE}
set OBJTYPE [lindex $OBJTYPE 1]
if {[lindex $OPETYPE 0] != "U1:1"} {set ok 0; break}
set OPETYPE [lindex $OPETYPE 1]
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if {$send_reply} {
# TBD create reply data
$spname put S20F8 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S20F7R
S20F8 | CloseConnectionEvent Acknowledge |
Sent by Host Only |
# S20F8 Tcl Parse reply
set reply [secs_xact $spname S20F7R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 OPEID CCEACK
# OPEID A:16 (always) recipe operation identifier
# CCEACK U1:1 (always) event completion code
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OPEID CCEACK}
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if {[lindex $CCEACK 0] != "U1:1"} {set ok 0; break}
set CCEACK [lindex $CCEACK 1]
return ;# finished ok
} ;# end while(ok)
S20F9R | ClearOperation Request |
Sent by Host Only |
Comment: clear all recipes for the Operation ID
Format:
# S20F9R Tcl Receive message - add next line to setup
$spname whenever S20F9 [list recv_S20F9R $spname]
# receive procedure
proc recv_S20F9R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 OBJID OBJTYPE OPETYPE OPEID
# OBJID A:80 (varies) E39 object identifier 1-80 chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OBJTYPE A:40 (varies) object class name, chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OPETYPE U1:1 (always) recipe operation type
# OPEID A:16 (always) recipe operation identifier
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJID OBJTYPE OPETYPE OPEID}
#vset [split [lindex $OBJID 0] :] {typeOBJID lengthOBJID}
set OBJID [lindex $OBJID 1]
#vset [split [lindex $OBJTYPE 0] :] {typeOBJTYPE lengthOBJTYPE}
set OBJTYPE [lindex $OBJTYPE 1]
if {[lindex $OPETYPE 0] != "U1:1"} {set ok 0; break}
set OPETYPE [lindex $OPETYPE 1]
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if {$send_reply} {
# TBD create reply data
$spname put S20F10 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S20F9R
S20F10 | ClearOperation Acknowledge |
Sent by Equipment Only |
# S20F10 Tcl Parse reply
set reply [secs_xact $spname S20F9R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect COACK
# COACK U1:1 (always) service completion code
if {[lindex $TSN_data 0] != "U1:1"} {set ok 0; break}
set COACK [lindex $TSN_data 1]
return ;# finished ok
} ;# end while(ok)
S20F11R | GetRecipeXIDList Request |
Sent by Host Only |
Comment: query recipes for the Operation ID
Format:
# S20F11R Tcl Receive message - add next line to setup
$spname whenever S20F11 [list recv_S20F11R $spname]
# receive procedure
proc recv_S20F11R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 OBJID OBJTYPE OPETYPE OPEID
# OBJID A:80 (varies) E39 object identifier 1-80 chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OBJTYPE A:40 (varies) object class name, chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OPETYPE U1:1 (always) recipe operation type
# OPEID A:16 (always) recipe operation identifier
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJID OBJTYPE OPETYPE OPEID}
#vset [split [lindex $OBJID 0] :] {typeOBJID lengthOBJID}
set OBJID [lindex $OBJID 1]
#vset [split [lindex $OBJTYPE 0] :] {typeOBJTYPE lengthOBJTYPE}
set OBJTYPE [lindex $OBJTYPE 1]
if {[lindex $OPETYPE 0] != "U1:1"} {set ok 0; break}
set OPETYPE [lindex $OPETYPE 1]
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if {$send_reply} {
# TBD create reply data
$spname put S20F12 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S20F11R
S20F12 | GetRecipeXIDList Acknowledge |
Sent by Equipment Only |
# S20F12 Tcl Parse reply
set reply [secs_xact $spname S20F11R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 {L:n {L:9 TIMESTAMP OPEID ASSGNID COPYID REVID RecID VERID TYPEID EQID}} GRXLACK
# TIMESTAMP A:32 (always) ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
# OPEID A:16 (always) recipe operation identifier
# ASSGNID U1:1 (always) Assigner of the RecipeXID Base Part
# COPYID U1:1 (always) Recipe copy type
# REVID A:256 (always) recipe revision information related to SRO
# RecID A:n (always) recipe spec or ppid
# VERID A:n (always) composite key with RecipeID to identify a unique recipe
# TYPEID U1:1 (always) recipe type
# EQID A:256 (always) recipe specification of compatible equipment
# GRXLACK U1:1 (always) service completion code
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {Ln GRXLACK}
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L9_1 [lreplace $Ln 0 0] {
if { [lindex $L9_1 0] != "L:9" } {set ok 0; break}
vset [lreplace $L9_1 0 0] {TIMESTAMP OPEID ASSGNID COPYID REVID RecID VERID TYPEID EQID}
if {[string first "A:" [lindex $TIMESTAMP 0]] != 0} {set ok 0; break}
set TIMESTAMP [lindex $TIMESTAMP 1]
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if {[lindex $ASSGNID 0] != "U1:1"} {set ok 0; break}
set ASSGNID [lindex $ASSGNID 1]
if {[lindex $COPYID 0] != "U1:1"} {set ok 0; break}
set COPYID [lindex $COPYID 1]
if {[string first "A:" [lindex $REVID 0]] != 0} {set ok 0; break}
set REVID [lindex $REVID 1]
if {[string first "A:" [lindex $RecID 0]] != 0} {set ok 0; break}
set RecID [lindex $RecID 1]
if {[string first "A:" [lindex $VERID 0]] != 0} {set ok 0; break}
set VERID [lindex $VERID 1]
if {[lindex $TYPEID 0] != "U1:1"} {set ok 0; break}
set TYPEID [lindex $TYPEID 1]
if {[string first "A:" [lindex $EQID 0]] != 0} {set ok 0; break}
set EQID [lindex $EQID 1]
}
if {!$ok} break
if {[lindex $GRXLACK 0] != "U1:1"} {set ok 0; break}
set GRXLACK [lindex $GRXLACK 1]
return ;# finished ok
} ;# end while(ok)
S20F13R | DeleteRecipe Request |
Sent by Host Only |
Comment: delete specified recipes
Format:
# S20F13R Tcl Receive message - add next line to setup
$spname whenever S20F13 [list recv_S20F13R $spname]
# receive procedure
proc recv_S20F13R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:5 OBJID OBJTYPE OPETYPE OPEID {L:9 TIMESTAMP OPEID ASSGNID COPYID REVID RecID VERID TYPEID EQID}
# OBJID A:80 (varies) E39 object identifier 1-80 chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OBJTYPE A:40 (varies) object class name, chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OPETYPE U1:1 (always) recipe operation type
# OPEID A:16 (always) recipe operation identifier
# TIMESTAMP A:32 (always) ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
# OPEID A:16 (always) recipe operation identifier
# ASSGNID U1:1 (always) Assigner of the RecipeXID Base Part
# COPYID U1:1 (always) Recipe copy type
# REVID A:256 (always) recipe revision information related to SRO
# RecID A:n (always) recipe spec or ppid
# VERID A:n (always) composite key with RecipeID to identify a unique recipe
# TYPEID U1:1 (always) recipe type
# EQID A:256 (always) recipe specification of compatible equipment
if { [lindex $TSN_data 0] != "L:5" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJID OBJTYPE OPETYPE OPEID L9}
#vset [split [lindex $OBJID 0] :] {typeOBJID lengthOBJID}
set OBJID [lindex $OBJID 1]
#vset [split [lindex $OBJTYPE 0] :] {typeOBJTYPE lengthOBJTYPE}
set OBJTYPE [lindex $OBJTYPE 1]
if {[lindex $OPETYPE 0] != "U1:1"} {set ok 0; break}
set OPETYPE [lindex $OPETYPE 1]
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if { [lindex $L9 0] != "L:9" } {set ok 0; break}
vset [lreplace $L9 0 0] {TIMESTAMP OPEID ASSGNID COPYID REVID RecID VERID TYPEID EQID}
if {[string first "A:" [lindex $TIMESTAMP 0]] != 0} {set ok 0; break}
set TIMESTAMP [lindex $TIMESTAMP 1]
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if {[lindex $ASSGNID 0] != "U1:1"} {set ok 0; break}
set ASSGNID [lindex $ASSGNID 1]
if {[lindex $COPYID 0] != "U1:1"} {set ok 0; break}
set COPYID [lindex $COPYID 1]
if {[string first "A:" [lindex $REVID 0]] != 0} {set ok 0; break}
set REVID [lindex $REVID 1]
if {[string first "A:" [lindex $RecID 0]] != 0} {set ok 0; break}
set RecID [lindex $RecID 1]
if {[string first "A:" [lindex $VERID 0]] != 0} {set ok 0; break}
set VERID [lindex $VERID 1]
if {[lindex $TYPEID 0] != "U1:1"} {set ok 0; break}
set TYPEID [lindex $TYPEID 1]
if {[string first "A:" [lindex $EQID 0]] != 0} {set ok 0; break}
set EQID [lindex $EQID 1]
if {$send_reply} {
# TBD create reply data
$spname put S20F14 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S20F13R
S20F14 | DeleteRecipe Acknowledge |
Sent by Equipment Only |
# S20F14 Tcl Parse reply
set reply [secs_xact $spname S20F13R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect DRRACK
# DRRACK U1:1 (always) service completion code
if {[lindex $TSN_data 0] != "U1:1"} {set ok 0; break}
set DRRACK [lindex $TSN_data 1]
return ;# finished ok
} ;# end while(ok)
S20F15R | WriteRecipe Request |
Sent by Host Only |
Comment: n is the number of recipes
Format:
# S20F15R Tcl Receive message - add next line to setup
$spname whenever S20F15 [list recv_S20F15R $spname]
# receive procedure
proc recv_S20F15R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:5 OBJID OBJTYPE OPETYPE OPEID {L:n {L:10 TIMESTAMP OPEID ASSGNID COPYID REVID RecID VERID TYPEID EQID RCPBODYA}}
# OBJID A:80 (varies) E39 object identifier 1-80 chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OBJTYPE A:40 (varies) object class name, chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OPETYPE U1:1 (always) recipe operation type
# OPEID A:16 (always) recipe operation identifier
# TIMESTAMP A:32 (always) ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
# OPEID A:16 (always) recipe operation identifier
# ASSGNID U1:1 (always) Assigner of the RecipeXID Base Part
# COPYID U1:1 (always) Recipe copy type
# REVID A:256 (always) recipe revision information related to SRO
# RecID A:n (always) recipe spec or ppid
# VERID A:n (always) composite key with RecipeID to identify a unique recipe
# TYPEID U1:1 (always) recipe type
# EQID A:256 (always) recipe specification of compatible equipment
# RCPBODYA A:n (varies) user defined recipe body, list allowed
if { [lindex $TSN_data 0] != "L:5" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJID OBJTYPE OPETYPE OPEID Ln}
#vset [split [lindex $OBJID 0] :] {typeOBJID lengthOBJID}
set OBJID [lindex $OBJID 1]
#vset [split [lindex $OBJTYPE 0] :] {typeOBJTYPE lengthOBJTYPE}
set OBJTYPE [lindex $OBJTYPE 1]
if {[lindex $OPETYPE 0] != "U1:1"} {set ok 0; break}
set OPETYPE [lindex $OPETYPE 1]
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L10_1 [lreplace $Ln 0 0] {
if { [lindex $L10_1 0] != "L:10" } {set ok 0; break}
vset [lreplace $L10_1 0 0] {TIMESTAMP OPEID ASSGNID COPYID REVID RecID VERID TYPEID EQID RCPBODYA}
if {[string first "A:" [lindex $TIMESTAMP 0]] != 0} {set ok 0; break}
set TIMESTAMP [lindex $TIMESTAMP 1]
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if {[lindex $ASSGNID 0] != "U1:1"} {set ok 0; break}
set ASSGNID [lindex $ASSGNID 1]
if {[lindex $COPYID 0] != "U1:1"} {set ok 0; break}
set COPYID [lindex $COPYID 1]
if {[string first "A:" [lindex $REVID 0]] != 0} {set ok 0; break}
set REVID [lindex $REVID 1]
if {[string first "A:" [lindex $RecID 0]] != 0} {set ok 0; break}
set RecID [lindex $RecID 1]
if {[string first "A:" [lindex $VERID 0]] != 0} {set ok 0; break}
set VERID [lindex $VERID 1]
if {[lindex $TYPEID 0] != "U1:1"} {set ok 0; break}
set TYPEID [lindex $TYPEID 1]
if {[string first "A:" [lindex $EQID 0]] != 0} {set ok 0; break}
set EQID [lindex $EQID 1]
#vset [split [lindex $RCPBODYA 0] :] {typeRCPBODYA lengthRCPBODYA}
set RCPBODYA [lindex $RCPBODYA 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S20F16 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S20F15R
S20F16 | WriteRecipe Acknowledge |
Sent by Equipment Only |
# S20F16 Tcl Parse reply
set reply [secs_xact $spname S20F15R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect WRACK
# WRACK U1:1 (always) service completion code
if {[lindex $TSN_data 0] != "U1:1"} {set ok 0; break}
set WRACK [lindex $TSN_data 1]
return ;# finished ok
} ;# end while(ok)
S20F17R | ReadRecipe Request |
Sent by Host Only |
Comment: n is the number of recipes
Format:
# S20F17R Tcl Receive message - add next line to setup
$spname whenever S20F17 [list recv_S20F17R $spname]
# receive procedure
proc recv_S20F17R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:5 OBJID OBJTYPE OPETYPE OPEID {L:n {L:9 TIMESTAMP OPEID ASSGNID COPYID REVID RecID VERID TYPEID EQID}}
# OBJID A:80 (varies) E39 object identifier 1-80 chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OBJTYPE A:40 (varies) object class name, chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OPETYPE U1:1 (always) recipe operation type
# OPEID A:16 (always) recipe operation identifier
# TIMESTAMP A:32 (always) ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
# OPEID A:16 (always) recipe operation identifier
# ASSGNID U1:1 (always) Assigner of the RecipeXID Base Part
# COPYID U1:1 (always) Recipe copy type
# REVID A:256 (always) recipe revision information related to SRO
# RecID A:n (always) recipe spec or ppid
# VERID A:n (always) composite key with RecipeID to identify a unique recipe
# TYPEID U1:1 (always) recipe type
# EQID A:256 (always) recipe specification of compatible equipment
if { [lindex $TSN_data 0] != "L:5" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJID OBJTYPE OPETYPE OPEID Ln}
#vset [split [lindex $OBJID 0] :] {typeOBJID lengthOBJID}
set OBJID [lindex $OBJID 1]
#vset [split [lindex $OBJTYPE 0] :] {typeOBJTYPE lengthOBJTYPE}
set OBJTYPE [lindex $OBJTYPE 1]
if {[lindex $OPETYPE 0] != "U1:1"} {set ok 0; break}
set OPETYPE [lindex $OPETYPE 1]
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L9_1 [lreplace $Ln 0 0] {
if { [lindex $L9_1 0] != "L:9" } {set ok 0; break}
vset [lreplace $L9_1 0 0] {TIMESTAMP OPEID ASSGNID COPYID REVID RecID VERID TYPEID EQID}
if {[string first "A:" [lindex $TIMESTAMP 0]] != 0} {set ok 0; break}
set TIMESTAMP [lindex $TIMESTAMP 1]
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if {[lindex $ASSGNID 0] != "U1:1"} {set ok 0; break}
set ASSGNID [lindex $ASSGNID 1]
if {[lindex $COPYID 0] != "U1:1"} {set ok 0; break}
set COPYID [lindex $COPYID 1]
if {[string first "A:" [lindex $REVID 0]] != 0} {set ok 0; break}
set REVID [lindex $REVID 1]
if {[string first "A:" [lindex $RecID 0]] != 0} {set ok 0; break}
set RecID [lindex $RecID 1]
if {[string first "A:" [lindex $VERID 0]] != 0} {set ok 0; break}
set VERID [lindex $VERID 1]
if {[lindex $TYPEID 0] != "U1:1"} {set ok 0; break}
set TYPEID [lindex $TYPEID 1]
if {[string first "A:" [lindex $EQID 0]] != 0} {set ok 0; break}
set EQID [lindex $EQID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S20F18 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S20F17R
S20F18 | ReadRecipe Acknowledge |
Sent by Equipment Only |
# S20F18 Tcl Parse reply
set reply [secs_xact $spname S20F17R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 {L:n {L:10 TIMESTAMP OPEID ASSGNID COPYID REVID RecID VERID TYPEID EQID RCPBODYA}} RRACK_S20
# TIMESTAMP A:32 (always) ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
# OPEID A:16 (always) recipe operation identifier
# ASSGNID U1:1 (always) Assigner of the RecipeXID Base Part
# COPYID U1:1 (always) Recipe copy type
# REVID A:256 (always) recipe revision information related to SRO
# RecID A:n (always) recipe spec or ppid
# VERID A:n (always) composite key with RecipeID to identify a unique recipe
# TYPEID U1:1 (always) recipe type
# EQID A:256 (always) recipe specification of compatible equipment
# RCPBODYA A:n (varies) user defined recipe body, list allowed
# RRACK_S20 U1:1 (always) service completion code
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {Ln RRACK_S20}
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L10_1 [lreplace $Ln 0 0] {
if { [lindex $L10_1 0] != "L:10" } {set ok 0; break}
vset [lreplace $L10_1 0 0] {TIMESTAMP OPEID ASSGNID COPYID REVID RecID VERID TYPEID EQID RCPBODYA}
if {[string first "A:" [lindex $TIMESTAMP 0]] != 0} {set ok 0; break}
set TIMESTAMP [lindex $TIMESTAMP 1]
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if {[lindex $ASSGNID 0] != "U1:1"} {set ok 0; break}
set ASSGNID [lindex $ASSGNID 1]
if {[lindex $COPYID 0] != "U1:1"} {set ok 0; break}
set COPYID [lindex $COPYID 1]
if {[string first "A:" [lindex $REVID 0]] != 0} {set ok 0; break}
set REVID [lindex $REVID 1]
if {[string first "A:" [lindex $RecID 0]] != 0} {set ok 0; break}
set RecID [lindex $RecID 1]
if {[string first "A:" [lindex $VERID 0]] != 0} {set ok 0; break}
set VERID [lindex $VERID 1]
if {[lindex $TYPEID 0] != "U1:1"} {set ok 0; break}
set TYPEID [lindex $TYPEID 1]
if {[string first "A:" [lindex $EQID 0]] != 0} {set ok 0; break}
set EQID [lindex $EQID 1]
#vset [split [lindex $RCPBODYA 0] :] {typeRCPBODYA lengthRCPBODYA}
set RCPBODYA [lindex $RCPBODYA 1]
}
if {!$ok} break
if {[lindex $RRACK_S20 0] != "U1:1"} {set ok 0; break}
set RRACK_S20 [lindex $RRACK_S20 1]
return ;# finished ok
} ;# end while(ok)
S20F19R | QueryRecipeXIDList Event Send |
Sent by Equipment Only |
# S20F19R Tcl Receive message - add next line to setup
$spname whenever S20F19 [list recv_S20F19R $spname]
# receive procedure
proc recv_S20F19R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 OBJID OBJTYPE OPETYPE OPEID
# OBJID A:80 (varies) E39 object identifier 1-80 chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OBJTYPE A:40 (varies) object class name, chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OPETYPE U1:1 (always) recipe operation type
# OPEID A:16 (always) recipe operation identifier
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJID OBJTYPE OPETYPE OPEID}
#vset [split [lindex $OBJID 0] :] {typeOBJID lengthOBJID}
set OBJID [lindex $OBJID 1]
#vset [split [lindex $OBJTYPE 0] :] {typeOBJTYPE lengthOBJTYPE}
set OBJTYPE [lindex $OBJTYPE 1]
if {[lindex $OPETYPE 0] != "U1:1"} {set ok 0; break}
set OPETYPE [lindex $OPETYPE 1]
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if {$send_reply} {
# TBD create reply data
$spname put S20F20 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S20F19R
S20F20 | QueryRecipeXIDList Event Acknowledge |
Sent by Host Only |
# S20F20 Tcl Parse reply
set reply [secs_xact $spname S20F19R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:3 OPEID {L:n {L:9 TIMESTAMP OPEID ASSGNID COPYID REVID RecID VERID TYPEID EQID}} QRXLEACK
# OPEID A:16 (always) recipe operation identifier
# TIMESTAMP A:32 (always) ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
# OPEID A:16 (always) recipe operation identifier
# ASSGNID U1:1 (always) Assigner of the RecipeXID Base Part
# COPYID U1:1 (always) Recipe copy type
# REVID A:256 (always) recipe revision information related to SRO
# RecID A:n (always) recipe spec or ppid
# VERID A:n (always) composite key with RecipeID to identify a unique recipe
# TYPEID U1:1 (always) recipe type
# EQID A:256 (always) recipe specification of compatible equipment
# QRXLEACK U1:1 (always) event completion code
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OPEID Ln QRXLEACK}
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L9_1 [lreplace $Ln 0 0] {
if { [lindex $L9_1 0] != "L:9" } {set ok 0; break}
vset [lreplace $L9_1 0 0] {TIMESTAMP OPEID ASSGNID COPYID REVID RecID VERID TYPEID EQID}
if {[string first "A:" [lindex $TIMESTAMP 0]] != 0} {set ok 0; break}
set TIMESTAMP [lindex $TIMESTAMP 1]
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if {[lindex $ASSGNID 0] != "U1:1"} {set ok 0; break}
set ASSGNID [lindex $ASSGNID 1]
if {[lindex $COPYID 0] != "U1:1"} {set ok 0; break}
set COPYID [lindex $COPYID 1]
if {[string first "A:" [lindex $REVID 0]] != 0} {set ok 0; break}
set REVID [lindex $REVID 1]
if {[string first "A:" [lindex $RecID 0]] != 0} {set ok 0; break}
set RecID [lindex $RecID 1]
if {[string first "A:" [lindex $VERID 0]] != 0} {set ok 0; break}
set VERID [lindex $VERID 1]
if {[lindex $TYPEID 0] != "U1:1"} {set ok 0; break}
set TYPEID [lindex $TYPEID 1]
if {[string first "A:" [lindex $EQID 0]] != 0} {set ok 0; break}
set EQID [lindex $EQID 1]
}
if {!$ok} break
if {[lindex $QRXLEACK 0] != "U1:1"} {set ok 0; break}
set QRXLEACK [lindex $QRXLEACK 1]
return ;# finished ok
} ;# end while(ok)
S20F21R | QueryRecipe Event Send |
Sent by Equipment Only |
# S20F21R Tcl Receive message - add next line to setup
$spname whenever S20F21 [list recv_S20F21R $spname]
# receive procedure
proc recv_S20F21R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:5 OBJID OBJTYPE OPETYPE OPEID {L:n {L:9 TIMESTAMP OPEID ASSGNID COPYID REVID RecID VERID TYPEID EQID}}
# OBJID A:80 (varies) E39 object identifier 1-80 chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OBJTYPE A:40 (varies) object class name, chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OPETYPE U1:1 (always) recipe operation type
# OPEID A:16 (always) recipe operation identifier
# TIMESTAMP A:32 (always) ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
# OPEID A:16 (always) recipe operation identifier
# ASSGNID U1:1 (always) Assigner of the RecipeXID Base Part
# COPYID U1:1 (always) Recipe copy type
# REVID A:256 (always) recipe revision information related to SRO
# RecID A:n (always) recipe spec or ppid
# VERID A:n (always) composite key with RecipeID to identify a unique recipe
# TYPEID U1:1 (always) recipe type
# EQID A:256 (always) recipe specification of compatible equipment
if { [lindex $TSN_data 0] != "L:5" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJID OBJTYPE OPETYPE OPEID Ln}
#vset [split [lindex $OBJID 0] :] {typeOBJID lengthOBJID}
set OBJID [lindex $OBJID 1]
#vset [split [lindex $OBJTYPE 0] :] {typeOBJTYPE lengthOBJTYPE}
set OBJTYPE [lindex $OBJTYPE 1]
if {[lindex $OPETYPE 0] != "U1:1"} {set ok 0; break}
set OPETYPE [lindex $OPETYPE 1]
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L9_1 [lreplace $Ln 0 0] {
if { [lindex $L9_1 0] != "L:9" } {set ok 0; break}
vset [lreplace $L9_1 0 0] {TIMESTAMP OPEID ASSGNID COPYID REVID RecID VERID TYPEID EQID}
if {[string first "A:" [lindex $TIMESTAMP 0]] != 0} {set ok 0; break}
set TIMESTAMP [lindex $TIMESTAMP 1]
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if {[lindex $ASSGNID 0] != "U1:1"} {set ok 0; break}
set ASSGNID [lindex $ASSGNID 1]
if {[lindex $COPYID 0] != "U1:1"} {set ok 0; break}
set COPYID [lindex $COPYID 1]
if {[string first "A:" [lindex $REVID 0]] != 0} {set ok 0; break}
set REVID [lindex $REVID 1]
if {[string first "A:" [lindex $RecID 0]] != 0} {set ok 0; break}
set RecID [lindex $RecID 1]
if {[string first "A:" [lindex $VERID 0]] != 0} {set ok 0; break}
set VERID [lindex $VERID 1]
if {[lindex $TYPEID 0] != "U1:1"} {set ok 0; break}
set TYPEID [lindex $TYPEID 1]
if {[string first "A:" [lindex $EQID 0]] != 0} {set ok 0; break}
set EQID [lindex $EQID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S20F22 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S20F21R
S20F22 | QueryRecipe Event Acknowledge |
Sent by Host Only |
# S20F22 Tcl Parse reply
set reply [secs_xact $spname S20F21R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect QREACK
# QREACK U1:1 (always) event completion code
if {[lindex $TSN_data 0] != "U1:1"} {set ok 0; break}
set QREACK [lindex $TSN_data 1]
return ;# finished ok
} ;# end while(ok)
S20F23R | PostRecipe Event Send |
Sent by Equipment Only |
# S20F23R Tcl Receive message - add next line to setup
$spname whenever S20F23 [list recv_S20F23R $spname]
# receive procedure
proc recv_S20F23R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:5 OBJID OBJTYPE OPETYPE OPEID {L:n {L:10 TIMESTAMP OPEID ASSGNID COPYID REVID RecID VERID TYPEID EQID RCPBODYA}}
# OBJID A:80 (varies) E39 object identifier 1-80 chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OBJTYPE A:40 (varies) object class name, chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OPETYPE U1:1 (always) recipe operation type
# OPEID A:16 (always) recipe operation identifier
# TIMESTAMP A:32 (always) ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
# OPEID A:16 (always) recipe operation identifier
# ASSGNID U1:1 (always) Assigner of the RecipeXID Base Part
# COPYID U1:1 (always) Recipe copy type
# REVID A:256 (always) recipe revision information related to SRO
# RecID A:n (always) recipe spec or ppid
# VERID A:n (always) composite key with RecipeID to identify a unique recipe
# TYPEID U1:1 (always) recipe type
# EQID A:256 (always) recipe specification of compatible equipment
# RCPBODYA A:n (varies) user defined recipe body, list allowed
if { [lindex $TSN_data 0] != "L:5" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJID OBJTYPE OPETYPE OPEID Ln}
#vset [split [lindex $OBJID 0] :] {typeOBJID lengthOBJID}
set OBJID [lindex $OBJID 1]
#vset [split [lindex $OBJTYPE 0] :] {typeOBJTYPE lengthOBJTYPE}
set OBJTYPE [lindex $OBJTYPE 1]
if {[lindex $OPETYPE 0] != "U1:1"} {set ok 0; break}
set OPETYPE [lindex $OPETYPE 1]
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L10_1 [lreplace $Ln 0 0] {
if { [lindex $L10_1 0] != "L:10" } {set ok 0; break}
vset [lreplace $L10_1 0 0] {TIMESTAMP OPEID ASSGNID COPYID REVID RecID VERID TYPEID EQID RCPBODYA}
if {[string first "A:" [lindex $TIMESTAMP 0]] != 0} {set ok 0; break}
set TIMESTAMP [lindex $TIMESTAMP 1]
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if {[lindex $ASSGNID 0] != "U1:1"} {set ok 0; break}
set ASSGNID [lindex $ASSGNID 1]
if {[lindex $COPYID 0] != "U1:1"} {set ok 0; break}
set COPYID [lindex $COPYID 1]
if {[string first "A:" [lindex $REVID 0]] != 0} {set ok 0; break}
set REVID [lindex $REVID 1]
if {[string first "A:" [lindex $RecID 0]] != 0} {set ok 0; break}
set RecID [lindex $RecID 1]
if {[string first "A:" [lindex $VERID 0]] != 0} {set ok 0; break}
set VERID [lindex $VERID 1]
if {[lindex $TYPEID 0] != "U1:1"} {set ok 0; break}
set TYPEID [lindex $TYPEID 1]
if {[string first "A:" [lindex $EQID 0]] != 0} {set ok 0; break}
set EQID [lindex $EQID 1]
#vset [split [lindex $RCPBODYA 0] :] {typeRCPBODYA lengthRCPBODYA}
set RCPBODYA [lindex $RCPBODYA 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S20F24 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S20F23R
S20F24 | PostRecipe Event Acknowledge |
Sent by Host Only |
# S20F24 Tcl Parse reply
set reply [secs_xact $spname S20F23R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect PREACK
# PREACK U1:1 (always) event completion code
if {[lindex $TSN_data 0] != "U1:1"} {set ok 0; break}
set PREACK [lindex $TSN_data 1]
return ;# finished ok
} ;# end while(ok)
S20F25R | SetPRC Attributes Request |
Sent by Host Only |
Comment: MAXNUMBERLIST is {L:n MAXNUMBER}
Format:
# S20F25R Tcl Receive message - add next line to setup
$spname whenever S20F25 [list recv_S20F25R $spname]
# receive procedure
proc recv_S20F25R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:5 OBJID OBJTYPE {L:n MAXNUMBER} MAXTIME PRCPREEXECHK
# OBJID A:80 (varies) E39 object identifier 1-80 chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OBJTYPE A:40 (varies) object class name, chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# MAXNUMBER U2:1 (always) subspace maximum
# MAXTIME U2:1 (always) maximum minutes for a PEM recipe to be preserved in PRC post use, 0 means NA
# PRCPREEXECHK U1:1 (always) Enable Pre-Execution checking
if { [lindex $TSN_data 0] != "L:5" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJID OBJTYPE Ln MAXTIME PRCPREEXECHK}
#vset [split [lindex $OBJID 0] :] {typeOBJID lengthOBJID}
set OBJID [lindex $OBJID 1]
#vset [split [lindex $OBJTYPE 0] :] {typeOBJTYPE lengthOBJTYPE}
set OBJTYPE [lindex $OBJTYPE 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach MAXNUMBER [lreplace $Ln 0 0] {
if {[lindex $MAXNUMBER 0] != "U2:1"} {set ok 0; break}
set MAXNUMBER [lindex $MAXNUMBER 1]
}
if {!$ok} break
if {[lindex $MAXTIME 0] != "U2:1"} {set ok 0; break}
set MAXTIME [lindex $MAXTIME 1]
if {[lindex $PRCPREEXECHK 0] != "U1:1"} {set ok 0; break}
set PRCPREEXECHK [lindex $PRCPREEXECHK 1]
if {$send_reply} {
# TBD create reply data
$spname put S20F26 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S20F25R
S20F26 | SetPRC Attributes Acknowledge |
Sent by Equipment Only |
# S20F26 Tcl Parse reply
set reply [secs_xact $spname S20F25R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect SPAACK
# SPAACK U1:1 (always) service completion code
if {[lindex $TSN_data 0] != "U1:1"} {set ok 0; break}
set SPAACK [lindex $TSN_data 1]
return ;# finished ok
} ;# end while(ok)
S20F27R | PreSpecifyRecipe Request |
Sent by Host Only |
# S20F27R Tcl Receive message - add next line to setup
$spname whenever S20F27 [list recv_S20F27R $spname]
# receive procedure
proc recv_S20F27R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:6 OBJID OBJTYPE OPETYPE OPEID PRJOBID {L:n {L:9 TIMESTAMP OPEID ASSGNID COPYID REVID RecID VERID TYPEID EQID}}
# OBJID A:80 (varies) E39 object identifier 1-80 chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OBJTYPE A:40 (varies) object class name, chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OPETYPE U1:1 (always) recipe operation type
# OPEID A:16 (always) recipe operation identifier
# PRJOBID A:n (always) process job identifier
# TIMESTAMP A:32 (always) ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
# OPEID A:16 (always) recipe operation identifier
# ASSGNID U1:1 (always) Assigner of the RecipeXID Base Part
# COPYID U1:1 (always) Recipe copy type
# REVID A:256 (always) recipe revision information related to SRO
# RecID A:n (always) recipe spec or ppid
# VERID A:n (always) composite key with RecipeID to identify a unique recipe
# TYPEID U1:1 (always) recipe type
# EQID A:256 (always) recipe specification of compatible equipment
if { [lindex $TSN_data 0] != "L:6" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJID OBJTYPE OPETYPE OPEID PRJOBID Ln}
#vset [split [lindex $OBJID 0] :] {typeOBJID lengthOBJID}
set OBJID [lindex $OBJID 1]
#vset [split [lindex $OBJTYPE 0] :] {typeOBJTYPE lengthOBJTYPE}
set OBJTYPE [lindex $OBJTYPE 1]
if {[lindex $OPETYPE 0] != "U1:1"} {set ok 0; break}
set OPETYPE [lindex $OPETYPE 1]
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if {[string first "A:" [lindex $PRJOBID 0]] != 0} {set ok 0; break}
set PRJOBID [lindex $PRJOBID 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L9_1 [lreplace $Ln 0 0] {
if { [lindex $L9_1 0] != "L:9" } {set ok 0; break}
vset [lreplace $L9_1 0 0] {TIMESTAMP OPEID ASSGNID COPYID REVID RecID VERID TYPEID EQID}
if {[string first "A:" [lindex $TIMESTAMP 0]] != 0} {set ok 0; break}
set TIMESTAMP [lindex $TIMESTAMP 1]
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if {[lindex $ASSGNID 0] != "U1:1"} {set ok 0; break}
set ASSGNID [lindex $ASSGNID 1]
if {[lindex $COPYID 0] != "U1:1"} {set ok 0; break}
set COPYID [lindex $COPYID 1]
if {[string first "A:" [lindex $REVID 0]] != 0} {set ok 0; break}
set REVID [lindex $REVID 1]
if {[string first "A:" [lindex $RecID 0]] != 0} {set ok 0; break}
set RecID [lindex $RecID 1]
if {[string first "A:" [lindex $VERID 0]] != 0} {set ok 0; break}
set VERID [lindex $VERID 1]
if {[lindex $TYPEID 0] != "U1:1"} {set ok 0; break}
set TYPEID [lindex $TYPEID 1]
if {[string first "A:" [lindex $EQID 0]] != 0} {set ok 0; break}
set EQID [lindex $EQID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S20F28 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S20F27R
S20F28 | PreSpecifyRecipe Acknowledge |
Sent by Equipment Only |
# S20F28 Tcl Parse reply
set reply [secs_xact $spname S20F27R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect PSRACK
# PSRACK U1:1 (always) service completion code
if {[lindex $TSN_data 0] != "U1:1"} {set ok 0; break}
set PSRACK [lindex $TSN_data 1]
return ;# finished ok
} ;# end while(ok)
S20F29R | QueryPJRecipeXIDList Event Send |
Sent by Equipment Only |
# S20F29R Tcl Receive message - add next line to setup
$spname whenever S20F29 [list recv_S20F29R $spname]
# receive procedure
proc recv_S20F29R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:5 OBJID OBJTYPE OPETYPE OPEID PRJOBID
# OBJID A:80 (varies) E39 object identifier 1-80 chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OBJTYPE A:40 (varies) object class name, chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OPETYPE U1:1 (always) recipe operation type
# OPEID A:16 (always) recipe operation identifier
# PRJOBID A:n (always) process job identifier
if { [lindex $TSN_data 0] != "L:5" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJID OBJTYPE OPETYPE OPEID PRJOBID}
#vset [split [lindex $OBJID 0] :] {typeOBJID lengthOBJID}
set OBJID [lindex $OBJID 1]
#vset [split [lindex $OBJTYPE 0] :] {typeOBJTYPE lengthOBJTYPE}
set OBJTYPE [lindex $OBJTYPE 1]
if {[lindex $OPETYPE 0] != "U1:1"} {set ok 0; break}
set OPETYPE [lindex $OPETYPE 1]
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if {[string first "A:" [lindex $PRJOBID 0]] != 0} {set ok 0; break}
set PRJOBID [lindex $PRJOBID 1]
if {$send_reply} {
# TBD create reply data
$spname put S20F30 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S20F29R
S20F30 | QueryPJRecipeXIDList Event Acknowledge |
Sent by Host Only |
# S20F30 Tcl Parse reply
set reply [secs_xact $spname S20F29R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 {L:n {L:9 TIMESTAMP OPEID ASSGNID COPYID REVID RecID VERID TYPEID EQID}} QPRKEACK
# TIMESTAMP A:32 (always) ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
# OPEID A:16 (always) recipe operation identifier
# ASSGNID U1:1 (always) Assigner of the RecipeXID Base Part
# COPYID U1:1 (always) Recipe copy type
# REVID A:256 (always) recipe revision information related to SRO
# RecID A:n (always) recipe spec or ppid
# VERID A:n (always) composite key with RecipeID to identify a unique recipe
# TYPEID U1:1 (always) recipe type
# EQID A:256 (always) recipe specification of compatible equipment
# QPRKEACK U1:1 (always) event completion code
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {Ln QPRKEACK}
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L9_1 [lreplace $Ln 0 0] {
if { [lindex $L9_1 0] != "L:9" } {set ok 0; break}
vset [lreplace $L9_1 0 0] {TIMESTAMP OPEID ASSGNID COPYID REVID RecID VERID TYPEID EQID}
if {[string first "A:" [lindex $TIMESTAMP 0]] != 0} {set ok 0; break}
set TIMESTAMP [lindex $TIMESTAMP 1]
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if {[lindex $ASSGNID 0] != "U1:1"} {set ok 0; break}
set ASSGNID [lindex $ASSGNID 1]
if {[lindex $COPYID 0] != "U1:1"} {set ok 0; break}
set COPYID [lindex $COPYID 1]
if {[string first "A:" [lindex $REVID 0]] != 0} {set ok 0; break}
set REVID [lindex $REVID 1]
if {[string first "A:" [lindex $RecID 0]] != 0} {set ok 0; break}
set RecID [lindex $RecID 1]
if {[string first "A:" [lindex $VERID 0]] != 0} {set ok 0; break}
set VERID [lindex $VERID 1]
if {[lindex $TYPEID 0] != "U1:1"} {set ok 0; break}
set TYPEID [lindex $TYPEID 1]
if {[string first "A:" [lindex $EQID 0]] != 0} {set ok 0; break}
set EQID [lindex $EQID 1]
}
if {!$ok} break
if {[lindex $QPRKEACK 0] != "U1:1"} {set ok 0; break}
set QPRKEACK [lindex $QPRKEACK 1]
return ;# finished ok
} ;# end while(ok)
S20F31R | Pre-Exe Check Event Send |
Sent by Equipment Only |
# S20F31R Tcl Receive message - add next line to setup
$spname whenever S20F31 [list recv_S20F31R $spname]
# receive procedure
proc recv_S20F31R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:6 OBJID OBJTYPE OPETYPE OPEID PRJOBID CHKINFO
# OBJID A:80 (varies) E39 object identifier 1-80 chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OBJTYPE A:40 (varies) object class name, chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OPETYPE U1:1 (always) recipe operation type
# OPEID A:16 (always) recipe operation identifier
# PRJOBID A:n (always) process job identifier
# CHKINFO A:n (varies) User defined value, any type
if { [lindex $TSN_data 0] != "L:6" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJID OBJTYPE OPETYPE OPEID PRJOBID CHKINFO}
#vset [split [lindex $OBJID 0] :] {typeOBJID lengthOBJID}
set OBJID [lindex $OBJID 1]
#vset [split [lindex $OBJTYPE 0] :] {typeOBJTYPE lengthOBJTYPE}
set OBJTYPE [lindex $OBJTYPE 1]
if {[lindex $OPETYPE 0] != "U1:1"} {set ok 0; break}
set OPETYPE [lindex $OPETYPE 1]
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if {[string first "A:" [lindex $PRJOBID 0]] != 0} {set ok 0; break}
set PRJOBID [lindex $PRJOBID 1]
#vset [split [lindex $CHKINFO 0] :] {typeCHKINFO lengthCHKINFO}
set CHKINFO [lindex $CHKINFO 1]
if {$send_reply} {
# TBD create reply data
$spname put S20F32 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S20F31R
S20F32 | Pre-Exe Check Event Acknowledge |
Sent by Host Only |
# S20F32 Tcl Parse reply
set reply [secs_xact $spname S20F31R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:3 PECRSLT {L:n {L:10 TIMESTAMP OPEID ASSGNID COPYID REVID RecID VERID TYPEID EQID RCPBODYA}} PECEACK
# PECRSLT U1:1 (always) RMS result
# TIMESTAMP A:32 (always) ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
# OPEID A:16 (always) recipe operation identifier
# ASSGNID U1:1 (always) Assigner of the RecipeXID Base Part
# COPYID U1:1 (always) Recipe copy type
# REVID A:256 (always) recipe revision information related to SRO
# RecID A:n (always) recipe spec or ppid
# VERID A:n (always) composite key with RecipeID to identify a unique recipe
# TYPEID U1:1 (always) recipe type
# EQID A:256 (always) recipe specification of compatible equipment
# RCPBODYA A:n (varies) user defined recipe body, list allowed
# PECEACK U1:1 (always) event completion code
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {PECRSLT Ln PECEACK}
if {[lindex $PECRSLT 0] != "U1:1"} {set ok 0; break}
set PECRSLT [lindex $PECRSLT 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L10_1 [lreplace $Ln 0 0] {
if { [lindex $L10_1 0] != "L:10" } {set ok 0; break}
vset [lreplace $L10_1 0 0] {TIMESTAMP OPEID ASSGNID COPYID REVID RecID VERID TYPEID EQID RCPBODYA}
if {[string first "A:" [lindex $TIMESTAMP 0]] != 0} {set ok 0; break}
set TIMESTAMP [lindex $TIMESTAMP 1]
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if {[lindex $ASSGNID 0] != "U1:1"} {set ok 0; break}
set ASSGNID [lindex $ASSGNID 1]
if {[lindex $COPYID 0] != "U1:1"} {set ok 0; break}
set COPYID [lindex $COPYID 1]
if {[string first "A:" [lindex $REVID 0]] != 0} {set ok 0; break}
set REVID [lindex $REVID 1]
if {[string first "A:" [lindex $RecID 0]] != 0} {set ok 0; break}
set RecID [lindex $RecID 1]
if {[string first "A:" [lindex $VERID 0]] != 0} {set ok 0; break}
set VERID [lindex $VERID 1]
if {[lindex $TYPEID 0] != "U1:1"} {set ok 0; break}
set TYPEID [lindex $TYPEID 1]
if {[string first "A:" [lindex $EQID 0]] != 0} {set ok 0; break}
set EQID [lindex $EQID 1]
#vset [split [lindex $RCPBODYA 0] :] {typeRCPBODYA lengthRCPBODYA}
set RCPBODYA [lindex $RCPBODYA 1]
}
if {!$ok} break
if {[lindex $PECEACK 0] != "U1:1"} {set ok 0; break}
set PECEACK [lindex $PECEACK 1]
return ;# finished ok
} ;# end while(ok)
S20F33R | PreSpecifyRecipe Event Send |
Sent by Equipment Only |
# S20F33R Tcl Receive message - add next line to setup
$spname whenever S20F33 [list recv_S20F33R $spname]
# receive procedure
proc recv_S20F33R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:5 OBJID OBJTYPE OPETYPE OPEID PRJOBID
# OBJID A:80 (varies) E39 object identifier 1-80 chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OBJTYPE A:40 (varies) object class name, chars 0x20-0x7e but not >, ?, *, or ~. Does not begin or end with space.
# OPETYPE U1:1 (always) recipe operation type
# OPEID A:16 (always) recipe operation identifier
# PRJOBID A:n (always) process job identifier
if { [lindex $TSN_data 0] != "L:5" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {OBJID OBJTYPE OPETYPE OPEID PRJOBID}
#vset [split [lindex $OBJID 0] :] {typeOBJID lengthOBJID}
set OBJID [lindex $OBJID 1]
#vset [split [lindex $OBJTYPE 0] :] {typeOBJTYPE lengthOBJTYPE}
set OBJTYPE [lindex $OBJTYPE 1]
if {[lindex $OPETYPE 0] != "U1:1"} {set ok 0; break}
set OPETYPE [lindex $OPETYPE 1]
if {[string first "A:" [lindex $OPEID 0]] != 0} {set ok 0; break}
set OPEID [lindex $OPEID 1]
if {[string first "A:" [lindex $PRJOBID 0]] != 0} {set ok 0; break}
set PRJOBID [lindex $PRJOBID 1]
if {$send_reply} {
# TBD create reply data
$spname put S20F34 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S20F33R
S20F34 | PreSpecifyRecipe Event Acknowledge |
Sent by Host Only |
# S20F34 Tcl Parse reply
set reply [secs_xact $spname S20F33R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect PSREACK
# PSREACK U1:1 (always) event completion code
if {[lindex $TSN_data 0] != "U1:1"} {set ok 0; break}
set PSREACK [lindex $TSN_data 1]
return ;# finished ok
} ;# end while(ok)
S21F1R | Item Load Inquire |
Sent by Host and Equipment |
# S21F1R Tcl Receive message - add next line to setup
$spname whenever S21F1 [list recv_S21F1R $spname]
# receive procedure
proc recv_S21F1R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:4 ITEMTYPE ITEMID ITEMLENGTH ITEMVERSION
# ITEMTYPE A:n (always) case-sensitve type of an item
# ITEMID A:256 (always) item identifier
# ITEMLENGTH U4:1 (varies) sum of item part lengths in bytes, not a message length, type U4 or U8
# ITEMVERSION A:n (always) version value, empty for unknown, default is time last modified YYYYMMDDhhmmsscc in the equipment timezone
if { [lindex $TSN_data 0] != "L:4" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {ITEMTYPE ITEMID ITEMLENGTH ITEMVERSION}
if {[string first "A:" [lindex $ITEMTYPE 0]] != 0} {set ok 0; break}
set ITEMTYPE [lindex $ITEMTYPE 1]
if {[string first "A:" [lindex $ITEMID 0]] != 0} {set ok 0; break}
set ITEMID [lindex $ITEMID 1]
#vset [split [lindex $ITEMLENGTH 0] :] {typeITEMLENGTH lengthITEMLENGTH}
set ITEMLENGTH [lindex $ITEMLENGTH 1]
if {[string first "A:" [lindex $ITEMVERSION 0]] != 0} {set ok 0; break}
set ITEMVERSION [lindex $ITEMVERSION 1]
if {$send_reply} {
# TBD create reply data
$spname put S21F2 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S21F1R
S21F2 | Item Load Grant |
Sent by Host and Equipment |
# S21F2 Tcl Parse reply
set reply [secs_xact $spname S21F1R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 ITEMACK ITEMERROR
# ITEMACK B:1 (always) item request return code
# ITEMERROR A:1024 (always) error description, empty on success
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {ITEMACK ITEMERROR}
if {[lindex $ITEMACK 0] != "B:1"} {set ok 0; break}
set ITEMACK [expr [lindex $ITEMACK 1]] ;# expr converts 0xhh to int
if {[string first "A:" [lindex $ITEMERROR 0]] != 0} {set ok 0; break}
set ITEMERROR [lindex $ITEMERROR 1]
return ;# finished ok
} ;# end while(ok)
S21F3R | Item Send |
Sent by Host and Equipment |
Comment: Each part except the last one is max size.
Format:
# S21F3R Tcl Receive message - add next line to setup
$spname whenever S21F3 [list recv_S21F3R $spname]
# receive procedure
proc recv_S21F3R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:5 ITEMTYPE ITEMID ITEMLENGTH ITEMVERSION {L:n ITEMPART}
# ITEMTYPE A:n (always) case-sensitve type of an item
# ITEMID A:256 (always) item identifier
# ITEMLENGTH U4:1 (varies) sum of item part lengths in bytes, not a message length, type U4 or U8
# ITEMVERSION A:n (always) version value, empty for unknown, default is time last modified YYYYMMDDhhmmsscc in the equipment timezone
# ITEMPART A:n (varies) component part of an item, may be data type A:n or B:n
if { [lindex $TSN_data 0] != "L:5" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {ITEMTYPE ITEMID ITEMLENGTH ITEMVERSION Ln}
if {[string first "A:" [lindex $ITEMTYPE 0]] != 0} {set ok 0; break}
set ITEMTYPE [lindex $ITEMTYPE 1]
if {[string first "A:" [lindex $ITEMID 0]] != 0} {set ok 0; break}
set ITEMID [lindex $ITEMID 1]
#vset [split [lindex $ITEMLENGTH 0] :] {typeITEMLENGTH lengthITEMLENGTH}
set ITEMLENGTH [lindex $ITEMLENGTH 1]
if {[string first "A:" [lindex $ITEMVERSION 0]] != 0} {set ok 0; break}
set ITEMVERSION [lindex $ITEMVERSION 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach ITEMPART [lreplace $Ln 0 0] {
#vset [split [lindex $ITEMPART 0] :] {typeITEMPART lengthITEMPART}
set ITEMPART [lindex $ITEMPART 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S21F4 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S21F3R
S21F4 | Item Send Acknowledge |
Sent by Host and Equipment |
# S21F4 Tcl Parse reply
set reply [secs_xact $spname S21F3R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 ITEMACK ITEMERROR
# ITEMACK B:1 (always) item request return code
# ITEMERROR A:1024 (always) error description, empty on success
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {ITEMACK ITEMERROR}
if {[lindex $ITEMACK 0] != "B:1"} {set ok 0; break}
set ITEMACK [expr [lindex $ITEMACK 1]] ;# expr converts 0xhh to int
if {[string first "A:" [lindex $ITEMERROR 0]] != 0} {set ok 0; break}
set ITEMERROR [lindex $ITEMERROR 1]
return ;# finished ok
} ;# end while(ok)
S21F5R | Item Request |
Sent by Host and Equipment |
# S21F5R Tcl Receive message - add next line to setup
$spname whenever S21F5 [list recv_S21F5R $spname]
# receive procedure
proc recv_S21F5R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 ITEMTYPE ITEMID
# ITEMTYPE A:n (always) case-sensitve type of an item
# ITEMID A:256 (always) item identifier
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {ITEMTYPE ITEMID}
if {[string first "A:" [lindex $ITEMTYPE 0]] != 0} {set ok 0; break}
set ITEMTYPE [lindex $ITEMTYPE 1]
if {[string first "A:" [lindex $ITEMID 0]] != 0} {set ok 0; break}
set ITEMID [lindex $ITEMID 1]
if {$send_reply} {
# TBD create reply data
$spname put S21F6 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S21F5R
S21F6 | Item Data |
Sent by Host and Equipment |
# S21F6 Tcl Parse reply
set reply [secs_xact $spname S21F5R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:7 ITEMACK ITEMERROR ITEMTYPE ITEMID ITEMLENGTH ITEMVERSION {L:n ITEMPART}
# ITEMACK B:1 (always) item request return code
# ITEMERROR A:1024 (always) error description, empty on success
# ITEMTYPE A:n (always) case-sensitve type of an item
# ITEMID A:256 (always) item identifier
# ITEMLENGTH U4:1 (varies) sum of item part lengths in bytes, not a message length, type U4 or U8
# ITEMVERSION A:n (always) version value, empty for unknown, default is time last modified YYYYMMDDhhmmsscc in the equipment timezone
# ITEMPART A:n (varies) component part of an item, may be data type A:n or B:n
if { [lindex $TSN_data 0] != "L:7" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {ITEMACK ITEMERROR ITEMTYPE ITEMID ITEMLENGTH ITEMVERSION Ln}
if {[lindex $ITEMACK 0] != "B:1"} {set ok 0; break}
set ITEMACK [expr [lindex $ITEMACK 1]] ;# expr converts 0xhh to int
if {[string first "A:" [lindex $ITEMERROR 0]] != 0} {set ok 0; break}
set ITEMERROR [lindex $ITEMERROR 1]
if {[string first "A:" [lindex $ITEMTYPE 0]] != 0} {set ok 0; break}
set ITEMTYPE [lindex $ITEMTYPE 1]
if {[string first "A:" [lindex $ITEMID 0]] != 0} {set ok 0; break}
set ITEMID [lindex $ITEMID 1]
#vset [split [lindex $ITEMLENGTH 0] :] {typeITEMLENGTH lengthITEMLENGTH}
set ITEMLENGTH [lindex $ITEMLENGTH 1]
if {[string first "A:" [lindex $ITEMVERSION 0]] != 0} {set ok 0; break}
set ITEMVERSION [lindex $ITEMVERSION 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach ITEMPART [lreplace $Ln 0 0] {
#vset [split [lindex $ITEMPART 0] :] {typeITEMPART lengthITEMPART}
set ITEMPART [lindex $ITEMPART 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S21F7R | Item Type List Request |
Sent by Host and Equipment |
# S21F7R Tcl Receive message - add next line to setup
$spname whenever S21F7 [list recv_S21F7R $spname]
# receive procedure
proc recv_S21F7R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect ITEMTYPE
# ITEMTYPE A:n (always) case-sensitve type of an item
if {[string first "A:" [lindex $TSN_data 0]] != 0} {set ok 0; break}
set ITEMTYPE [lindex $TSN_data 1]
if {$send_reply} {
# TBD create reply data
$spname put S21F8 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S21F7R
S21F8 | Item Type List Results |
Sent by Host and Equipment |
# S21F8 Tcl Parse reply
set reply [secs_xact $spname S21F7R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:7 ITEMACK ITEMERROR ITEMTYPE {L:n {L:3 ITEMID ITEMLENGTH ITEMVERSION}}
# ITEMACK B:1 (always) item request return code
# ITEMERROR A:1024 (always) error description, empty on success
# ITEMTYPE A:n (always) case-sensitve type of an item
# ITEMID A:256 (always) item identifier
# ITEMLENGTH U4:1 (varies) sum of item part lengths in bytes, not a message length, type U4 or U8
# ITEMVERSION A:n (always) version value, empty for unknown, default is time last modified YYYYMMDDhhmmsscc in the equipment timezone
if { [lindex $TSN_data 0] != "L:7" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {ITEMACK ITEMERROR ITEMTYPE Ln}
if {[lindex $ITEMACK 0] != "B:1"} {set ok 0; break}
set ITEMACK [expr [lindex $ITEMACK 1]] ;# expr converts 0xhh to int
if {[string first "A:" [lindex $ITEMERROR 0]] != 0} {set ok 0; break}
set ITEMERROR [lindex $ITEMERROR 1]
if {[string first "A:" [lindex $ITEMTYPE 0]] != 0} {set ok 0; break}
set ITEMTYPE [lindex $ITEMTYPE 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L3_1 [lreplace $Ln 0 0] {
if { [lindex $L3_1 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3_1 0 0] {ITEMID ITEMLENGTH ITEMVERSION}
if {[string first "A:" [lindex $ITEMID 0]] != 0} {set ok 0; break}
set ITEMID [lindex $ITEMID 1]
#vset [split [lindex $ITEMLENGTH 0] :] {typeITEMLENGTH lengthITEMLENGTH}
set ITEMLENGTH [lindex $ITEMLENGTH 1]
if {[string first "A:" [lindex $ITEMVERSION 0]] != 0} {set ok 0; break}
set ITEMVERSION [lindex $ITEMVERSION 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S21F9R | Supported Item Type List Request |
Sent by Host and Equipment |
# S21F9R Tcl Receive message - add next line to setup
$spname whenever S21F9 [list recv_S21F9R $spname]
# receive procedure
proc recv_S21F9R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# no data expected
if {$send_reply} {
# TBD create reply data
$spname put S21F10 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S21F9R
S21F10 | Supported Item Type List Result |
Sent by Host and Equipment |
# S21F10 Tcl Parse reply
set reply [secs_xact $spname S21F9R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:3 ITEMACK ITEMERROR {L:n ITEMTYPE}
# ITEMACK B:1 (always) item request return code
# ITEMERROR A:1024 (always) error description, empty on success
# ITEMTYPE A:n (always) case-sensitve type of an item
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {ITEMACK ITEMERROR Ln}
if {[lindex $ITEMACK 0] != "B:1"} {set ok 0; break}
set ITEMACK [expr [lindex $ITEMACK 1]] ;# expr converts 0xhh to int
if {[string first "A:" [lindex $ITEMERROR 0]] != 0} {set ok 0; break}
set ITEMERROR [lindex $ITEMERROR 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach ITEMTYPE [lreplace $Ln 0 0] {
if {[string first "A:" [lindex $ITEMTYPE 0]] != 0} {set ok 0; break}
set ITEMTYPE [lindex $ITEMTYPE 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S21F11 | Item Delete |
Sent by Host Only |
# S21F11 Tcl Receive message - add next line to setup
$spname whenever S21F11 [list recv_S21F11 $spname]
# receive procedure
proc recv_S21F11 {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 ITEMTYPE {L:n ITEMID}
# ITEMTYPE A:n (always) case-sensitve type of an item
# ITEMID A:256 (always) item identifier
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {ITEMTYPE Ln}
if {[string first "A:" [lindex $ITEMTYPE 0]] != 0} {set ok 0; break}
set ITEMTYPE [lindex $ITEMTYPE 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach ITEMID [lreplace $Ln 0 0] {
if {[string first "A:" [lindex $ITEMID 0]] != 0} {set ok 0; break}
set ITEMID [lindex $ITEMID 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S21F12 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
# bad data
eq_S9_reply $spname 7
} ;# end recv_S21F11
S21F12 | Item Delete Acknowledge |
Sent by Host and Equipment |
# S21F12 Tcl Parse reply
set reply [secs_xact $spname S21F11R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:3 ITEMACK ITEMTYPE {L:n {L:3 ITEMID ITEMACK ITEMERROR}}
# ITEMACK B:1 (always) item request return code
# ITEMTYPE A:n (always) case-sensitve type of an item
# ITEMID A:256 (always) item identifier
# ITEMACK B:1 (always) item request return code
# ITEMERROR A:1024 (always) error description, empty on success
if { [lindex $TSN_data 0] != "L:3" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {ITEMACK ITEMTYPE Ln}
if {[lindex $ITEMACK 0] != "B:1"} {set ok 0; break}
set ITEMACK [expr [lindex $ITEMACK 1]] ;# expr converts 0xhh to int
if {[string first "A:" [lindex $ITEMTYPE 0]] != 0} {set ok 0; break}
set ITEMTYPE [lindex $ITEMTYPE 1]
if {[string first L: [lindex $Ln 0]] != 0} {set ok 0; break}
foreach L3_1 [lreplace $Ln 0 0] {
if { [lindex $L3_1 0] != "L:3" } {set ok 0; break}
vset [lreplace $L3_1 0 0] {ITEMID ITEMACK ITEMERROR}
if {[string first "A:" [lindex $ITEMID 0]] != 0} {set ok 0; break}
set ITEMID [lindex $ITEMID 1]
if {[lindex $ITEMACK 0] != "B:1"} {set ok 0; break}
set ITEMACK [expr [lindex $ITEMACK 1]] ;# expr converts 0xhh to int
if {[string first "A:" [lindex $ITEMERROR 0]] != 0} {set ok 0; break}
set ITEMERROR [lindex $ITEMERROR 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)
S21F13R | Request Permission To Send Item |
Sent by Host and Equipment |
# S21F13R Tcl Receive message - add next line to setup
$spname whenever S21F13 [list recv_S21F13R $spname]
# receive procedure
proc recv_S21F13R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:5 ITEMTYPE ITEMID ITEMLENGTH ITEMVERSION ITEMPARTCOUNT
# ITEMTYPE A:n (always) case-sensitve type of an item
# ITEMID A:256 (always) item identifier
# ITEMLENGTH U4:1 (varies) sum of item part lengths in bytes, not a message length, type U4 or U8
# ITEMVERSION A:n (always) version value, empty for unknown, default is time last modified YYYYMMDDhhmmsscc in the equipment timezone
# ITEMPARTCOUNT U4:1 (always) total number of item parts as split for transfer
if { [lindex $TSN_data 0] != "L:5" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {ITEMTYPE ITEMID ITEMLENGTH ITEMVERSION ITEMPARTCOUNT}
if {[string first "A:" [lindex $ITEMTYPE 0]] != 0} {set ok 0; break}
set ITEMTYPE [lindex $ITEMTYPE 1]
if {[string first "A:" [lindex $ITEMID 0]] != 0} {set ok 0; break}
set ITEMID [lindex $ITEMID 1]
#vset [split [lindex $ITEMLENGTH 0] :] {typeITEMLENGTH lengthITEMLENGTH}
set ITEMLENGTH [lindex $ITEMLENGTH 1]
if {[string first "A:" [lindex $ITEMVERSION 0]] != 0} {set ok 0; break}
set ITEMVERSION [lindex $ITEMVERSION 1]
if {[lindex $ITEMPARTCOUNT 0] != "U4:1"} {set ok 0; break}
set ITEMPARTCOUNT [lindex $ITEMPARTCOUNT 1]
if {$send_reply} {
# TBD create reply data
$spname put S21F14 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S21F13R
S21F14 | Grant Permission To Send Item |
Sent by Host and Equipment |
# S21F14 Tcl Parse reply
set reply [secs_xact $spname S21F13R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 ITEMACK ITEMERROR
# ITEMACK B:1 (always) item request return code
# ITEMERROR A:1024 (always) error description, empty on success
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {ITEMACK ITEMERROR}
if {[lindex $ITEMACK 0] != "B:1"} {set ok 0; break}
set ITEMACK [expr [lindex $ITEMACK 1]] ;# expr converts 0xhh to int
if {[string first "A:" [lindex $ITEMERROR 0]] != 0} {set ok 0; break}
set ITEMERROR [lindex $ITEMERROR 1]
return ;# finished ok
} ;# end while(ok)
S21F15R | Item Request |
Sent by Host and Equipment |
# S21F15R Tcl Receive message - add next line to setup
$spname whenever S21F15 [list recv_S21F15R $spname]
# receive procedure
proc recv_S21F15R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:2 ITEMTYPE ITEMID
# ITEMTYPE A:n (always) case-sensitve type of an item
# ITEMID A:256 (always) item identifier
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {ITEMTYPE ITEMID}
if {[string first "A:" [lindex $ITEMTYPE 0]] != 0} {set ok 0; break}
set ITEMTYPE [lindex $ITEMTYPE 1]
if {[string first "A:" [lindex $ITEMID 0]] != 0} {set ok 0; break}
set ITEMID [lindex $ITEMID 1]
if {$send_reply} {
# TBD create reply data
$spname put S21F16 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S21F15R
S21F16 | Item Request Grant |
Sent by Host and Equipment |
# S21F16 Tcl Parse reply
set reply [secs_xact $spname S21F15R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:7 ITEMACK ITEMERROR ITEMTYPE ITEMID ITEMLENGTH ITEMVERSION ITEMPARTCOUNT
# ITEMACK B:1 (always) item request return code
# ITEMERROR A:1024 (always) error description, empty on success
# ITEMTYPE A:n (always) case-sensitve type of an item
# ITEMID A:256 (always) item identifier
# ITEMLENGTH U4:1 (varies) sum of item part lengths in bytes, not a message length, type U4 or U8
# ITEMVERSION A:n (always) version value, empty for unknown, default is time last modified YYYYMMDDhhmmsscc in the equipment timezone
# ITEMPARTCOUNT U4:1 (always) total number of item parts as split for transfer
if { [lindex $TSN_data 0] != "L:7" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {ITEMACK ITEMERROR ITEMTYPE ITEMID ITEMLENGTH ITEMVERSION ITEMPARTCOUNT}
if {[lindex $ITEMACK 0] != "B:1"} {set ok 0; break}
set ITEMACK [expr [lindex $ITEMACK 1]] ;# expr converts 0xhh to int
if {[string first "A:" [lindex $ITEMERROR 0]] != 0} {set ok 0; break}
set ITEMERROR [lindex $ITEMERROR 1]
if {[string first "A:" [lindex $ITEMTYPE 0]] != 0} {set ok 0; break}
set ITEMTYPE [lindex $ITEMTYPE 1]
if {[string first "A:" [lindex $ITEMID 0]] != 0} {set ok 0; break}
set ITEMID [lindex $ITEMID 1]
#vset [split [lindex $ITEMLENGTH 0] :] {typeITEMLENGTH lengthITEMLENGTH}
set ITEMLENGTH [lindex $ITEMLENGTH 1]
if {[string first "A:" [lindex $ITEMVERSION 0]] != 0} {set ok 0; break}
set ITEMVERSION [lindex $ITEMVERSION 1]
if {[lindex $ITEMPARTCOUNT 0] != "U4:1"} {set ok 0; break}
set ITEMPARTCOUNT [lindex $ITEMPARTCOUNT 1]
return ;# finished ok
} ;# end while(ok)
S21F17R | Send Item Part |
Sent by Host and Equipment |
Comment: Each part message is not sent until the reply for the previous part is received.
Format:
# S21F17R Tcl Receive message - add next line to setup
$spname whenever S21F17 [list recv_S21F17R $spname]
# receive procedure
proc recv_S21F17R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:8 ITEMTYPE ITEMID ITEMLENGTH ITEMVERSION ITEMINDEX ITEMPARTCOUNT ITEMPARTLENGTH ITEMPART
# ITEMTYPE A:n (always) case-sensitve type of an item
# ITEMID A:256 (always) item identifier
# ITEMLENGTH U4:1 (varies) sum of item part lengths in bytes, not a message length, type U4 or U8
# ITEMVERSION A:n (always) version value, empty for unknown, default is time last modified YYYYMMDDhhmmsscc in the equipment timezone
# ITEMINDEX U4:1 (always) 1-based index of a component part, 0 means done, 0xFFFFFFFF means abort
# ITEMPARTCOUNT U4:1 (always) total number of item parts as split for transfer
# ITEMPARTLENGTH U4:1 (always) length of a specific item part presumably in bytes
# ITEMPART A:n (varies) component part of an item, may be data type A:n or B:n
if { [lindex $TSN_data 0] != "L:8" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {ITEMTYPE ITEMID ITEMLENGTH ITEMVERSION ITEMINDEX ITEMPARTCOUNT ITEMPARTLENGTH ITEMPART}
if {[string first "A:" [lindex $ITEMTYPE 0]] != 0} {set ok 0; break}
set ITEMTYPE [lindex $ITEMTYPE 1]
if {[string first "A:" [lindex $ITEMID 0]] != 0} {set ok 0; break}
set ITEMID [lindex $ITEMID 1]
#vset [split [lindex $ITEMLENGTH 0] :] {typeITEMLENGTH lengthITEMLENGTH}
set ITEMLENGTH [lindex $ITEMLENGTH 1]
if {[string first "A:" [lindex $ITEMVERSION 0]] != 0} {set ok 0; break}
set ITEMVERSION [lindex $ITEMVERSION 1]
if {[lindex $ITEMINDEX 0] != "U4:1"} {set ok 0; break}
set ITEMINDEX [lindex $ITEMINDEX 1]
if {[lindex $ITEMPARTCOUNT 0] != "U4:1"} {set ok 0; break}
set ITEMPARTCOUNT [lindex $ITEMPARTCOUNT 1]
if {[lindex $ITEMPARTLENGTH 0] != "U4:1"} {set ok 0; break}
set ITEMPARTLENGTH [lindex $ITEMPARTLENGTH 1]
#vset [split [lindex $ITEMPART 0] :] {typeITEMPART lengthITEMPART}
set ITEMPART [lindex $ITEMPART 1]
if {$send_reply} {
# TBD create reply data
$spname put S21F18 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S21F17R
S21F18 | Send Item Part Acknowledge |
Sent by Host and Equipment |
Comment: Non-zero ITEMACK causes retry (32) or abort
Format:
# S21F18 Tcl Parse reply
set reply [secs_xact $spname S21F17R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:2 ITEMACK ITEMERROR
# ITEMACK B:1 (always) item request return code
# ITEMERROR A:1024 (always) error description, empty on success
if { [lindex $TSN_data 0] != "L:2" } {set ok 0; break}
vset [lreplace $TSN_data 0 0] {ITEMACK ITEMERROR}
if {[lindex $ITEMACK 0] != "B:1"} {set ok 0; break}
set ITEMACK [expr [lindex $ITEMACK 1]] ;# expr converts 0xhh to int
if {[string first "A:" [lindex $ITEMERROR 0]] != 0} {set ok 0; break}
set ITEMERROR [lindex $ITEMERROR 1]
return ;# finished ok
} ;# end while(ok)
S21F19R | Item Type Feature Support |
Sent by Host and Equipment |
Comment: a zero-length list requests for all supported item types, new 6/2022
Format:
# S21F19R Tcl Receive message - add next line to setup
$spname whenever S21F19 [list recv_S21F19R $spname]
# receive procedure
proc recv_S21F19R {spname} {
global $spname
set TSN_data [set ${spname}(lastrmsg)]
set send_reply [expr [string first R [set ${spname}(lastrSFR)]] > 0]
set ok 1
while {$ok} { ;# break out of loop on error
# expect L:n ITEMTYPE
# ITEMTYPE A:n (always) case-sensitve type of an item
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach ITEMTYPE [lreplace $TSN_data 0 0] {
if {[string first "A:" [lindex $ITEMTYPE 0]] != 0} {set ok 0; break}
set ITEMTYPE [lindex $ITEMTYPE 1]
}
if {!$ok} break
if {$send_reply} {
# TBD create reply data
$spname put S21F20 $TBD_replydata
}
return ;# finished ok
} ;# end while(ok)
} ;# end recv_S21F19R
S21F20 | Item Type Feature Support Results |
Sent by Host and Equipment |
Comment: On success, ITEMACK is zero and ITEMERROR shall be zero-length
Format:
# S21F20 Tcl Parse reply
set reply [secs_xact $spname S21F19R $TBD_senddata]
set ok 1
while {$ok} { ;# break out of loop on error
if { $reply == "TIMEOUT" } { ;# abort, S9, or timeout
set failure [secs_xact_failure $spname]
set ok 0 ; break ;# TBD handle failure here and return?
}
set TSN_data $reply
# expect L:n {L:4 ITEMACK ITEMERROR ITEMTYPE ITEMTYPESUPPORT}
# ITEMACK B:1 (always) item request return code
# ITEMERROR A:1024 (always) error description, empty on success
# ITEMTYPE A:n (always) case-sensitve type of an item
# ITEMTYPESUPPORT U4:1 (always) bitfield to specify which S21Fx messages accepted
if {[string first L: [lindex $TSN_data 0]] != 0} {set ok 0; break}
foreach L4 [lreplace $TSN_data 0 0] {
if { [lindex $L4 0] != "L:4" } {set ok 0; break}
vset [lreplace $L4 0 0] {ITEMACK ITEMERROR ITEMTYPE ITEMTYPESUPPORT}
if {[lindex $ITEMACK 0] != "B:1"} {set ok 0; break}
set ITEMACK [expr [lindex $ITEMACK 1]] ;# expr converts 0xhh to int
if {[string first "A:" [lindex $ITEMERROR 0]] != 0} {set ok 0; break}
set ITEMERROR [lindex $ITEMERROR 1]
if {[string first "A:" [lindex $ITEMTYPE 0]] != 0} {set ok 0; break}
set ITEMTYPE [lindex $ITEMTYPE 1]
if {[lindex $ITEMTYPESUPPORT 0] != "U4:1"} {set ok 0; break}
set ITEMTYPESUPPORT [lindex $ITEMTYPESUPPORT 1]
}
if {!$ok} break
return ;# finished ok
} ;# end while(ok)