Help: ICE_NETWORK_SERVICE
communications with ICE services using SNAPAPP or SNAPPER macros
The /SERVER=port switch runs the NeXtMidas SNAPPER macro in server mode.
The /SERVICE=port switch runs the NeXtMidas SNAPAPP macro and its SNAPPER children in server mode.
It then has a browser interface at http://localhost:<port>.
This page has links to /System, /Controls, /Registry, /Results, /Files, /System, and /Displays.
The Http /System interface supports any parameter with results access.
The GC result is a table of all control widgets for the macro.
For example, to start a real time SNAPPER archive:
http://<host>:<port>/System/Set?GC.MODE.ACTION=RTARCHIVE
To get the current state of a transfer:
http://<host>:<port>/System/Get?GC.MODE.ACTION
To get the current state of an ARCHIVE file transfer:
http://<host>:<port>/System/Get?REG.NOOP.PROGRESS
this returns REG.NOOP.PROGRESS=frac or null if completed.
The Http /Controls, /Results and /Registry interfaces support a table syntax for control also used
by the ICENET interface. Developers may write their own code to exercise this control mechanism.
For example:
To start a SNAPPER macro in archive mode:
http://<host>:<port>/Controls/Set?MODE=RTARCHIVE
To change the freq and decimation control widgets of the macro:
http://<host>:<port>/Controls/Set?{FREQ=1.2,DEC=256}
To access members of the snapper macro's sourcepic primitive directly:
http://<host>:<port>/Registry/SP/Get?{FREQ=,DEC=,GAIN=}
To set and get multiple parameters in an atomic manner:
http://<host>:<port>/Controls/Set?{CHAN=11,FREQ=,DEC=}
where the entries without values execute as Gets.
Some controls trigger popup menus that produce messages to complete the desired action.
To affect these actions through the web interface, bypass the popup trigger event and send the
control message directly to the macro. These will be listed in the explain file for that macro.
To send a save configuration message to the TUNIQ macro, use the syntax:
http://<host>:<port>/Message/Send?{NAME=CFG_SAVE,DATA=filename}
It will acknowledge with the message it issued to the macro.
http://<host>:<port>/Message/Ack?{NAME=CFG_SAVE,DATA=filename}
If the message is a request that the macro needs to respond to, use the syntax:
http://<host>:<port>/Message/Recv?{NAME=GETCFG,INFO=chn,TIMEOUT=n}
where n is the number of seconds [def=10] to wait for the data object to be populated.
In this case with the configuration key=value pairs for channel=chn.
For the last log message in SNAPPER, ICEAWG and TUNIQ, use
http://<host>:<port>/Message/Recv?{NAME=GETLOG,INFO=0}
or to setup the configuration in those same macros
http://<host>:<port>/Message/Send?{NAME=SETCFG,INFO=chan,DATA={FREQ=1010,GAIN=-6}}
If snapper is invoked with the /NBX=chns switch, the tuner export sourcepics are accessed as:
http://<host>:<port>/Registry/SPX<n>/Get?{FREQ=,DEC=,GAIN=,REPLAY=}
where <n> is the 1 based channel number.
For example:
http://<host>:<port>/Registry/SPX5/Set?{FREQ=1.23,DEC=32,GAIN=0,REPLAY=Cont}
will start channel 5 in continuous mode with the given freq/dec/gain parameters.
http://<host>:<port>/Registry/SPX30/Set?{REPLAY=Stop}
will stop channel 30.
To view the entire application GUI from a webpage, use the link:
http://<host>:<port>/Display/js/Pane0
Or for a specific plotter pane in the application GUI:
http://<host>:<port>/Display/js/Pane# where #=1..N
To adust the window offsets, use the insets parameter table:
http://<host>:<port>/Display/js/Pane0?insets=(Left,Right,Top,Bottom)
where the insets are in pixels.
Insets for the outermost PaneI are typically (0,0,20,0) for the default Window Manager.
Insets for an internal PaneI are typically (0,0,-20,20) for the default Window Manager.
There are two special keys intercepted by the HTTP server:
/WAIT=n waits for N seconds before processing the next key
/SYNC waits until the previous key has been processed
If /SYNC is the last key, the socket will not return an HTTP status ACK until
the command has been processed.
The system status of the machine hosting an ICE service is available at:
http://<host>:<port>/System/<sub>
where <sub> is:
Top - CPU usage
Ice-Disks - status of disk drives
Ice-Health - low-level status on an Ice-Block
Ice-Driver - card status and temps recorded by the driver
Ice-PICs - configuration of ICE-PICS
Ice-NICs - configuration of ICE-NICS
Ice-QICs - configuration of ICE-QICS
If ".tbl" is appended to <sub> the output will be in serialized table format for easy parsing.
For example:
http://<host>:<port>/System/Ice-PICs.tbl
gets the ICEPIC configuration in table form.