33 lines
901 B
Tcl
33 lines
901 B
Tcl
source $cfPath(counter)/counter_common_1.tcl
|
|
|
|
## TODO Put all the counter macros in the counter namespace
|
|
namespace eval counter {
|
|
variable isc_numchannels
|
|
variable isc_monitor_address
|
|
variable isc_portlist
|
|
variable isc_beam_monitor_list
|
|
proc set_sobj_attributes {} {
|
|
}
|
|
}
|
|
|
|
proc ::counter::isc_initialize {} {
|
|
if [catch {
|
|
variable isc_numchannels
|
|
variable isc_monitor_address
|
|
variable isc_portlist
|
|
|
|
dict for {k v} $::MONITOR_HOSTPORT {
|
|
lappend monlist $k
|
|
lappend hostlist [dict get $v HOST]
|
|
lappend isc_portlist [dict get $v PORT]
|
|
}
|
|
variable isc_beam_monitor_list $monlist
|
|
set isc_monitor_address [lindex $hostlist 0]
|
|
set isc_numchannels [llength $isc_beam_monitor_list]
|
|
::counter::ic_initialize MONITOR_SOURCE "HISTOGRAM_SERVER"
|
|
} message ] {
|
|
if {$::errorCode=="NONE"} {return $message}
|
|
return -code error "$message"
|
|
}
|
|
}
|