- Many fixes to accomodate a nitty picky TRICS wishlist
- Added a log facility to scan which includes a variable which is logged but not driven during a scan. - Fixed normal beam operation
This commit is contained in:
@@ -28,16 +28,17 @@ if { [info exists sycinit] == 0 } {
|
||||
# 'tag' and 'msgString' parameters must be passed within braces
|
||||
# eg sycFormat con0004 t000005 s1 event {s1} {type.position status.HWBusy}
|
||||
proc sycformat {connID transID devID msgFlag tag msgString} {
|
||||
global statusMap cache
|
||||
global statusMap
|
||||
|
||||
set fullmatch ""; set msg ""; set eventType ""; set status ""
|
||||
set position ""
|
||||
|
||||
proc _prefix {flag} {
|
||||
upvar connID cID transID tID devID dID
|
||||
return "\[$cID:$tID:$dID:$flag\]"
|
||||
upvar connID cID transID tID devID dID
|
||||
return "\[$cID:$tID:$dID:$flag\]"
|
||||
}
|
||||
|
||||
set msgString [string trim $msgString]
|
||||
regexp {<(.*)>} $msgString match msg
|
||||
regexp {type\.(\w*)} $msgString match eventType
|
||||
regexp {status\.(\w*)} $msgString match status
|
||||
@@ -48,16 +49,15 @@ if { [info exists sycinit] == 0 } {
|
||||
}
|
||||
|
||||
switch $msgFlag {
|
||||
"start" {
|
||||
set output "[_prefix start] $msgString"
|
||||
|
||||
}
|
||||
"event" {
|
||||
switch $eventType {
|
||||
"POSITION" {
|
||||
regexp {(\w+)\.position *= *(\d+(?:\.\d+)?)} $msgString match device position
|
||||
set output "[_prefix event] $tag={type=$eventType,$devID.position=$position}"
|
||||
}
|
||||
"STATUS" {
|
||||
set output "[_prefix event] $tag={type=$eventType,$devID.status=$statusMap($status)}"
|
||||
}
|
||||
default {
|
||||
# Error
|
||||
}
|
||||
@@ -83,7 +83,7 @@ if { [info exists sycinit] == 0 } {
|
||||
}
|
||||
}
|
||||
default {
|
||||
set output "[_prefix $msgFlag] $msgString"
|
||||
set output "[_prefix $msgFlag] $tag=\{$msgString\}"
|
||||
}
|
||||
}
|
||||
return $output
|
||||
|
||||
Reference in New Issue
Block a user