Help: ICE_STATUS_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 /Systen, /Controls, /Registry, /Results, /Files, 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 controls 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.

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 send a message to a macro using icenet :

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.