SICS-638 Send a pause to the histmem when SICS receives an INT1712 interrupt.
This is done by mapping AnstoHttpPauseNoCon() to Halt in the histmem interface. An ANSTO stop command astop has been added to send a Stop to the histmem which is needed when uploading a new configuration.
This commit is contained in:
@@ -663,6 +663,9 @@ pPriv->pause = 1;
|
||||
|
||||
return OKOK;
|
||||
}
|
||||
static int AnstoHttpPauseNoCon(pHistDriver self) {
|
||||
return AnstoHttpPause(self, NULL);
|
||||
}
|
||||
/*---------------------------------------------------------------------*/
|
||||
static int AnstoHttpContinue(pHistDriver self, SConnection *pCon){
|
||||
pAnstoHttp pPriv = NULL;
|
||||
@@ -934,7 +937,7 @@ pHistDriver CreateAnstoHttpDriver(pStringDict pOption){
|
||||
/* configure all those functions */
|
||||
pNew->Configure = AnstoHttpConfigure;
|
||||
pNew->Start = AnstoHttpStart;
|
||||
pNew->Halt = AnstoHttpHalt;
|
||||
pNew->Halt = AnstoHttpPauseNoCon;
|
||||
pNew->GetCountStatus = AnstoHttpStatus;
|
||||
pNew->GetError = AnstoHttpError;
|
||||
pNew->TryAndFixIt = AnstoHttpFixIt;
|
||||
@@ -967,6 +970,14 @@ pHistDriver CreateAnstoHttpDriver(pStringDict pOption){
|
||||
|
||||
|
||||
self = (pHistMem)pData;
|
||||
if(strcmp(argv[1],"astop") == 0) {
|
||||
if(!SCMatchRights(pCon,usUser)) {
|
||||
return 0;
|
||||
}
|
||||
AnstoHttpHalt(self->pDriv);
|
||||
SCSendOK(pCon);
|
||||
return 1;
|
||||
}
|
||||
if(strcmp(argv[1],"pause") == 0) {
|
||||
if(!SCMatchRights(pCon,usUser)) {
|
||||
return 0;
|
||||
|
||||
@@ -1263,7 +1263,7 @@ proc ::histogram_memory::upload_config {filler_defaults} {
|
||||
if [ catch {
|
||||
::histogram_memory::synch_tables
|
||||
::histogram_memory::filler_defaults $filler_defaults
|
||||
hmm stop
|
||||
hmm astop
|
||||
hmm configure init 1
|
||||
hmm init
|
||||
# Restore the init level to 0
|
||||
@@ -1275,7 +1275,7 @@ proc ::histogram_memory::upload_config {filler_defaults} {
|
||||
# This not only makes sure it's stopped, but lets us see certain configuration variables
|
||||
# which get placed in the dictionary as part of the status checking done during the stop.
|
||||
hmm configure statuscheck true
|
||||
hmm stop
|
||||
hmm astop
|
||||
hmm configure statuscheck false
|
||||
# ::histogram_memory::configure_dims
|
||||
# foreach axis {X Y T} {
|
||||
@@ -1650,7 +1650,7 @@ Publish SAT_TABLE user
|
||||
if [ catch {
|
||||
hmm pause
|
||||
hmm configure statuscheck true
|
||||
hmm stop
|
||||
hmm astop
|
||||
hmm configure statuscheck false
|
||||
set reply [SplitReply [hmm configure daq]]
|
||||
if {$histmem_simulation==false && $reply != "Stopped"} {
|
||||
@@ -1710,7 +1710,7 @@ Publish SAT_TABLE user
|
||||
} else {
|
||||
set monitor_controlled "false"
|
||||
}
|
||||
hmm stop
|
||||
hmm astop
|
||||
hmm init
|
||||
hmm_mode $method
|
||||
} message ] {
|
||||
|
||||
Reference in New Issue
Block a user