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:
Ferdi Franceschini
2014-04-29 11:55:35 +10:00
parent 29583c51c0
commit 19f6c8541c
8 changed files with 160 additions and 9 deletions

View File

@@ -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;

View File

@@ -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

View File

@@ -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