Not in the the testing tool – this error happens when I watch the output as the process is starting.
I have two TCL procs on this thread and have determined the one is causing the error. The proc is supposed to filter transactions. Being new to TCL as well, I’m not sure what exactly it could be. Here is my code and I put the section in bold I think I don’t need, but I could be wrong:
proc hbr_filter { args } {
keylget args MODE mode ;# Fetch mode
global HciConnName
set module “[lindex [info level 0] 0]/$HciConnName: “
set debug 1 ;# Set debug flag to turn on echo statements
set dispList {} ;# Nothing to return
switch -exact — $mode {
start {
# Perform special init functions
# N.B.: there may or may not be a MSGID key in args
}
run {
# ‘run’ mode always has a MSGID; fetch and process it
keylget args MSGID mh
set msgData [msgget $mh]
set time [fmtclock [getclock] “%Y%m%d%H%M”]
set fieldsep [cindex $msgData 3]
#set fieldsep [string index $msgData 3]
#set msgData [split $msgData $fieldsep]
set segs [split $msgData r]
#set msgData [lreplace $msgData 6 7 $time TEST]
#set msgData [join $msgData $fieldsep]
set i -1
foreach segment $segs {
incr i
set fields [split $segment $fieldsep]
switch -exact [lindex $fields 0] {
MSH {
}
EVN {
set evn1 [lindex $fields 1]
}
PV1 {
set pv1_2 [lindex $fields 2]
set pv1_14 [lindex $fields 14]
}
}
}
if {[cequal $evn1 A06] && ![cequal $pv1_14 E]
|| [cequal $evn1 P01] && ![cequal $pv1_2 E]} {
lappend dispList “KILL $mh”
} else {
lappend dispList “CONTINUE $mh”
if {$debug} {echo In $module > ER Patient}
}
if {$debug} {echo In $module> $msgData}
lappend dispList “CONTINUE $mh”
}
time {
# Timer-based processing
# N.B.: there may or may not be a MSGID key in args
}
shutdown {
# Doing some clean-up work
}
}
return $dispList
}