SICS-128: Added a reactor status protocol handler called OPALSTAT for the asyncqueue.
OPALSTAT uses HTTP/1.1 and sets the UserAgent to SICS to avoid re-directs. It also sends the SICS version and revision numbers in the UserAgent string.
This commit is contained in:
@@ -12,8 +12,8 @@ driver reactor_status = {
|
||||
var status = {
|
||||
type = text;
|
||||
priv = spy;
|
||||
readable = 10;
|
||||
read_command = 'GET /Bragg/proposal/reactor.jsp?type=ALL HTTP/1.0';
|
||||
readable = 30;
|
||||
read_command = 'GET /Bragg/proposal/reactor.jsp?type=ALL';
|
||||
read_function = rdAll;
|
||||
fetch_function = getState;
|
||||
data = false;
|
||||
|
||||
@@ -252,7 +252,7 @@ proc ::scobj::reactor_status::mk_sct_reactor_status { sct_controller name } {
|
||||
hsetprop ${scobj_hpath}/power nxalias "${name}_power"
|
||||
|
||||
hfactory ${scobj_hpath}/status plain spy text
|
||||
hsetprop ${scobj_hpath}/status read ${ns}::getState ${scobj_hpath} rdAll {GET /Bragg/proposal/reactor.jsp?type=ALL HTTP/1.0}
|
||||
hsetprop ${scobj_hpath}/status read ${ns}::getState ${scobj_hpath} rdAll {GET /Bragg/proposal/reactor.jsp?type=ALL}
|
||||
hsetprop ${scobj_hpath}/status rdAll ${ns}::rdAll ${scobj_hpath}
|
||||
hsetprop ${scobj_hpath}/status control false
|
||||
hsetprop ${scobj_hpath}/status data false
|
||||
@@ -289,7 +289,7 @@ proc ::scobj::reactor_status::mk_sct_reactor_status { sct_controller name } {
|
||||
hsetprop ${scobj_hpath} data "true"
|
||||
|
||||
if {[SplitReply [opal_simulation]]=="false"} {
|
||||
${sct_controller} poll ${scobj_hpath}/status 10
|
||||
${sct_controller} poll ${scobj_hpath}/status 30
|
||||
}
|
||||
hsetprop ${scobj_hpath} klass NXsource
|
||||
# hook code starts
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
fileeval $cfPath(source)/sct_reactor_status.tcl
|
||||
|
||||
if {[SplitReply [opal_simulation]]=="false"} {
|
||||
MakeAsyncProtocol std
|
||||
std sendterminator \r\n\r\n
|
||||
std replyterminator 0x03
|
||||
MakeAsyncQueue aqreactor std portal.nbi.ansto.gov.au 80
|
||||
MakeAsyncQueue aqreactor OPALSTAT neutron.ansto.gov.au 80
|
||||
aqreactor timeout 2000
|
||||
}
|
||||
add_reactor_status source aqadapter aqreactor
|
||||
|
||||
@@ -16,7 +16,7 @@ set quieckport 60004
|
||||
# icsval column = settings when running on the Instrument Control Server (ie SICS_SIMULATION not defined)
|
||||
# fakedev column = settings for test platforms (ie SICS_SIMULATION=fakedev)
|
||||
foreach {simflag icsval fakedev} {
|
||||
opal_simulation true true
|
||||
opal_simulation false true
|
||||
detector_simulation false true
|
||||
hmm_simulation false true
|
||||
environment_simulation false true
|
||||
|
||||
Reference in New Issue
Block a user