allow numeric -timestamp

show alarm states together with limits
This commit is contained in:
zimoch
2011-07-04 08:07:07 +00:00
parent 34d644ff66
commit 6c51934037

32
ca
View File

@@ -2,12 +2,12 @@
# ca* by Dirk Zimoch
# $Source: /cvs/G/EPICS/App/scripts/ca,v $
# $Date: 2009/11/12 14:35:03 $
# $Date: 2011/07/04 08:07:07 $
regsub -all {\$} {ca* by Dirk Zimoch
$Source: /cvs/G/EPICS/App/scripts/ca,v $
$Revision: 1.16 $
$Date: 2009/11/12 14:35:03 $} {} version
$Revision: 1.17 $
$Date: 2011/07/04 08:07:07 $} {} version
set auto_path [concat $env(SLSBASE)/lib/tcl $auto_path]
@@ -157,6 +157,7 @@ proc formatval {channel {value {}} {sevr {}} {stat {}} {time {}}} {
"-localdate" {lappend time [clock format $clock -format "%d.%m.%y"]}
"-time" {lappend time [format "%02d:%02d:%05.2f" $H $M $S]}
"-localtime" {lappend time [clock format $clock -format "%H:%M:%S"]}
"-timestamp" {lappend time [format "%.9f" [expr [clock scan "$m/$d/$y $H:$M"]+$S]]}
"-noname" {set channel ""}
"-nounit" {set EGU ""}
"-nostat" {set status ""}
@@ -313,9 +314,30 @@ foreach channel $channels {
}
"info" {
if [info exists info($channel)] {
puts "$channel:\n$info($channel)"
puts "$channel:"
regexp {^[^\.]*} $channel base
set HHSV ""
set HSV ""
set LSV ""
set LLSV ""
foreach {field value} $info($channel) {
set extra ""
switch $field {
HIHI {catch {
set HHSV "\t([pvget $base.HHSV])"
set HSV "\t([pvget $base.HSV])"
set LSV "\t([pvget $base.LSV])"
set LLSV "\t([pvget $base.LSV])"
set extra $HHSV
}
}
HIGH {set extra $HSV}
LOW {set extra $LSV}
LOLO {set extra $LLSV}
}
puts "$field\t[list $value]$extra"
}
}
regexp {^[^\.]*} $channel base
catch {
set rtyp [pvget $base.RTYP]
puts "RTYP\t$rtyp"