evalINDI ======== Name ---- evalINDI − evaluate an expression of INDI property values Synopsis -------- :: evalINDI [options] [exp] Description ----------- evalINDI connects to an indiserver and listens for the values of properties to evaluate an arithmetic expression. Each property is specified using three components enclosed in double quotes in the following form: :: "device.property.element" The last component of the property specification is usually the element name, but may be a reserved name to indicate an attribute of the property as a whole. These reserved names are as follows: .. raw:: html
.. raw:: html | .. raw:: html
.. raw:: html
\_STATE .. raw:: html .. raw:: html |
.. raw:: html
.. raw:: html
the state attribute, where for the purposes of evaluation the usual keywords Idle, Ok, Busy and Alert are converted to the numeric values of 0, 1, 2 and 3 respectively. .. raw:: html .. raw:: html |
.. raw:: html
.. raw:: html | .. raw:: html
.. raw:: html
\_TS .. raw:: html .. raw:: html |
.. raw:: html
.. raw:: html
evaluate the timestamp attribute as the number of UNIX seconds from epoch .. raw:: html .. raw:: html |
.. raw:: html
.. raw:: html | .. raw:: html
.. raw:: html
-b .. raw:: html .. raw:: html |
.. raw:: html
.. raw:: html
Ring the terminal bell when expression evaluates as true. .. raw:: html .. raw:: html |
.. raw:: html
.. raw:: html | .. raw:: html
.. raw:: html
-d |
.. raw:: html
.. raw:: html
use file descriptor f already open as a socket to the indiserver. This is useful for scripts to make a session connection one time then reuse it for each invocation. If the file descriptor seems to be being closed, check that the close-on-exec flag is off; for example in perl use something like: .. raw:: html ``#!/usr/bin/perl``\ ``use Socket;``\ ``use Fcntl;``\ ``socket(SOCK, PF_INET, SOCK_STREAM, getprotobyname(’tcp’));``\ ``connect(SOCK, sockaddr_in(7624,inet_aton(’localhost’)));``\ ``fcntl(SOCK,F_SETFD,0);``\ ``$directfd = fileno(SOCK);``\ ``&runindi ("./evalINDI", "-d", "$directfd", "\"x.y.z\"==1");``\ ``sub runindi { if (fork()) { wait(); } else { exec @_; } }``\ .. raw:: html |
.. raw:: html
.. raw:: html | .. raw:: html
.. raw:: html
-e .. raw:: html .. raw:: html |
.. raw:: html
.. raw:: html
print each updated expression value after each evaluation .. raw:: html .. raw:: html |
.. raw:: html
.. raw:: html | .. raw:: html
.. raw:: html
-f .. raw:: html .. raw:: html |
.. raw:: html
.. raw:: html
print the final expression value .. raw:: html .. raw:: html |
.. raw:: html
.. raw:: html | .. raw:: html
.. raw:: html
-h |
.. raw:: html
.. raw:: html
connect to alternate host h; the default is localhost. .. raw:: html .. raw:: html |
.. raw:: html
.. raw:: html | .. raw:: html
.. raw:: html
-i .. raw:: html .. raw:: html |
.. raw:: html
.. raw:: html
read the expression from stdin .. raw:: html .. raw:: html |
.. raw:: html
.. raw:: html | .. raw:: html
.. raw:: html
-o .. raw:: html .. raw:: html |
.. raw:: html
.. raw:: html
print each operand each time it changes value in the form property=value .. raw:: html .. raw:: html |
.. raw:: html
.. raw:: html | .. raw:: html
.. raw:: html
-p .. raw:: html .. raw:: html |
.. raw:: html
.. raw:: html
connect using alternate port p; the default is 7624. .. raw:: html .. raw:: html |
.. raw:: html
.. raw:: html | .. raw:: html
.. raw:: html
-t |
.. raw:: html
.. raw:: html
wait no longer than t seconds to gather the initial values for all the specified properties; 0 means forever, the default is 2 seconds. .. raw:: html .. raw:: html |
.. raw:: html
.. raw:: html | .. raw:: html
.. raw:: html
-v .. raw:: html .. raw:: html |
.. raw:: html
.. raw:: html
generate additional information on stderr. This is cumulative in that specifying more -v options will generate more output. .. raw:: html .. raw:: html |
.. raw:: html
.. raw:: html | .. raw:: html
.. raw:: html
-w .. raw:: html .. raw:: html |
.. raw:: html
.. raw:: html
evaluate the expression as many times as necessary until it evaluates to a value other than zero. .. raw:: html .. raw:: html |
.. raw:: html