sicshipacaba.c

SICS-418 Make sure hnotify sends messages as hdbevents when using the
JSON protocl

site_ansto/instrument/config/hmm/hmm_object.tcl
Initialise the hmm object to make sure the read type is set.

nxscripts_common_1.tcl
Set the read type when saving the hmm data.

server_config.tcl
Fix the autosave command so that you can enable/disable autosave while
the histogram memory is running.

protocol.c
Reduce noise in log files when using the JSON protocol.  Don't log
messages generated during macro execution (ie within a TCL proc).

motor.c:MotorStatus
Abort the current operation, the scan command and batch files when a
motor object returns a hardware fault status value.

motor_dmc2280.c
set driver status to HWFault when the driver is in the error state.

r3251 | ffr | 2011-09-23 08:49:00 +1000 (Fri, 23 Sep 2011) | 25 lines
This commit is contained in:
Ferdi Franceschini
2011-09-23 08:49:00 +10:00
committed by Douglas Clowes
parent c765c33f6d
commit d778dd2bfe
7 changed files with 37 additions and 21 deletions

View File

@@ -173,7 +173,6 @@ proc ::histogram_memory::hmm_set_read_type {type} {
set hmm_ext [select_read_type $type]
}
$HMOBJ configure hmm_ext $hmm_ext
$HMOBJ init
} msg ] {
return -code error "([info level 0]) $msg"
}

View File

@@ -861,6 +861,7 @@ proc ::nexus::histmem::save {hm nxalias hpath data_type filestatus args} {
} elseif { $max_period > 0} {
$HMOBJ configure read_data_period_number $point
}
::histogram_memory::hmm_set_read_type [hgetpropval $::histogram_memory::HP_HMM datatype_savelist]
nxscript putslab $nxalias [join [list $point $hmmslabstart ]] [join [list 1 $hmmslabend]] $HMOBJ 0 $datsize 1
#####
if {$filestatus == "newfile"} {

View File

@@ -233,6 +233,8 @@ proc server_set_sobj_attributes {} {
}
proc server_init {} {
global AUTOSAVE_STATE
set catch_status [ catch {
::source::isc_initialize
::counter::isc_initialize
@@ -259,8 +261,7 @@ proc server_init {} {
sicslist setatt sics_suid nxsave true
sicslist setatt sics_suid long_name sics_suid
VarMake AUTOSAVE_STATE Text user
AUTOSAVE_STATE "DISABLED"
set AUTOSAVE_STATE "DISABLED"
if [file exists ../extraconfig.tcl] {
fileeval ../extraconfig.tcl
@@ -273,8 +274,10 @@ proc server_init {} {
}
proc doAutosave {} {
global AUTOSAVE_STATE
# Reset the AUTOSAVE_STATE variable in case some naughty user sets it directly
AUTOSAVE_STATE "ENABLED"
set AUTOSAVE_STATE "ENABLED"
set HMSTATE [SplitReply [hmm configure daq]]
set FSTATE [SplitReply [file_status]]
#broadcast CALLED: [info level 0], HMSTATE = $HMSTATE, FSTATE = $FSTATE
@@ -286,20 +289,25 @@ proc doAutosave {} {
}
publish doAutosave user
proc autosave { {interval 300} } {
set stateVal [SplitReply [AUTOSAVE_STATE]]
global AUTOSAVE_STATE
if {$interval == "check"} {
return [AUTOSAVE_STATE]
if { $AUTOSAVE_STATE == "ENABLED" } {
return "AUTOSAVE $AUTOSAVE_STATE [sicspoll intervall doAutosave]"
} else {
return "AUTOSAVE $AUTOSAVE_STATE"
}
} elseif {[string is integer $interval]} {
if {$interval <= 0} {
if { $stateVal == "ENABLED" } {
if { $AUTOSAVE_STATE == "ENABLED" } {
sicspoll del doAutosave
AUTOSAVE_STATE "DISABLED"
set AUTOSAVE_STATE "DISABLED"
}
} else {
if {$stateVal == "DISABLED"} {
if {$AUTOSAVE_STATE == "DISABLED"} {
sicspoll add doAutosave script $interval doAutosave
sicspoll listen
AUTOSAVE_STATE "ENABLED"
# sicspoll listen # WARNING:When the listening client exits it leaves SICSPOLL task with a corrupt connection object.
set AUTOSAVE_STATE "ENABLED"
} else {
sicspoll intervall doAutosave $interval
}