INDI Library v0.3 July 17th, 2005 Running an INDI server ====================== Client applications communiate to INDI driver through the INDI server. Usage: indiserver [options] [driver ...] Purpose: INDI Server Options: -p p : alternate IP port, default 7624 -r n : max restart attempts, default 2 -vv : more verbose to stderr Remaining args are names of INDI drivers to run. For example, to run LX200GPS driver on port 8000, type in: indiserver -p 8000 lx200gps Different clients have different methods of connecting to the indiserver. Refer to your client documenation for more details. Developing device drivers ========================= Developers interested in developing their own device drivers under INDI should refer to the INDI Developers Manual at http://indi.sf.net/manual Supported Devices: ================== ** Telescope + LX200 Generic + LX200 Classic + LX200 Autostar + LX200 16" + LX200 GPS + NewGT + NexStar 5i/8i + NexStar GPS, CGE, AS-GT + Astro-Physics AP + Astro-Electronic FS-2 + Losmandy Gemini + Mel Bartels Controllers + Vixen SkySensor 2000 + Argo Navis + SkyCommander + Temma Takahashi ** CCD + Finger Lakes Instruments + Apogee (Experimental) + SBIG (Experimental) ** Video + Any Video4Linux (V4L 1 and V4L 2) compatible camera + Philips webcam + Meade Lunar Planetary Imager (Experimental) ** Focuser + Meade LX200GPS Microfocuser + Meade 1206 Primary Mirror Focuser + JMI NGF Series + JMI MOTOFOCUS ** Filter Wheel + Finger Lakes Instruments filter wheel INDI Architecture and Construction ================================== The code here demonstrates the use of INDI, an Instrument-Neutral Device Interface protocol. See http://www.clearskyinstitute.com/INDI/INDI.pdf. Architecture: Typical INDI Client / Server / Driver / Device connectivity: INDI Client 1 ----| |---- INDI Driver A ---- Dev X | | INDI Client 2 ----| |---- INDI Driver B ---- Dev Y | | | ... |--- indiserver ---| |-- Dev Z | | | | INDI Client n ----| |---- INDI Driver C ---- Dev T Client INET Server UNIX Driver Hardware processes sockets process pipes processes devices Indiserver is the public network access point where one or more INDI Clients may contact one or more INDI Drivers. Indiserver launches each driver process and arranges for it to receive the INDI protocol from Clients on its stdin and expects to find commands destined for Clients on the driver's stdout. Anything arriving from a driver process' stderr is copied to indiserver's stderr. Indiserver only provides convenient port, fork and data steering services. If desired, a Client may run and connect to INDI Drivers directly. Construction: An INDI driver typically consists of one .c file, eg, mydriver.c, which #includes indiapi.h to access the reference API declarations. It is compiled then linked with indidrivermain.o, eventloop.o ,liblilxml.a, and indicom.a (optional) to form an INDI process. These supporting files contain the implementation of the INDI Driver API and need not be changed in any way. Note that evenloop.[ch] provide a nice callback facility independent of INDI which may be used in other projects if desired. The driver implementation, again in our example mydriver.c, does not contain a main() but is expected to operate as an event-driver program. The driver must implement each ISxxx() function but never call them. The IS() functions are called by the reference implementation main() as messages arrive from Clients. Within each IS function the driver performs the desired tasks then may report back to the Client by calling the IDxxx() functions. The reference API provides IE() functions to allow the driver to add its own callback functions if desired. The driver can arrange for functions to be called when reading a file descriptor will not block; when a time interval has expired; or when there is no other client traffic in progress. The sample indiserver is a stand alone process that may be used to run one or more INDI-compliant drivers. It takes the names of each driver process to run in its command line args.