4.5 One line 'set' via Command TCP/IP

Command parameters to the power sensor are appended as CGI form parameters to the URL (see RFC-1738). The first parameter always is 'fmt=txt' which tells the unit to reply a one line text document instead of a voluminous HTML page.

urldesc.gif

To set the operational parameters the power sensor, request the 'set' document with a HTTP GET command and append the parameters which shall be set to the URL. The path which must be sent with the GET request is

/set?fmt=txt&...

where ... stands for an arbitrary number of parameter definitions, each consisting of a key word and the associated parameter value, separated by a '=' character. Assuming the power sensor listens to the IP address 10.0.0.1, an example URL for this request is:

http://10.0.0.1/set?fmt=txt&smod=AUTO&offs=0

The 'fmt=txt' parameter forces the power sensor to reply a one line text document rather than the HTML coded page which is normally displayed by the web browser. The parameter definitions 'smod=AUTO' and 'offs=0' shown in the above example make the power sensor to select it's sensivity range automatically and to clear any user defined offset to the measurement value. For a complete list of keywords see the table below.

The power sensor replies to every 'set' request with a complete list of parameters in one line. Like with the 'read' command, the line consists of a set of keyword - value pairs, separated by '&' characters. Within each pair, keyword and value are separated by the '=' character.

smod=AUTO&fltr=OFF&thrh=-99.99&freq=0&fcor=0.00&offs=0.00&snr=0D8F9

The values contained in this list are the values which actually are applying, including the new values read from the 'set' URL. The power sensor does not give a fault message if it receives an invalid parameter definition. It limits parameter values to a valid range or selections instead. If a keyword is not known, it ignores this parameter completely. To read the parameters actually set with changing a value, send a HTTP GET request with 'fmt=txt' as the only parameter. A description of the parameters is given in the chapter Parameter list above.