Instrument Neutral Distributed Interface INDI  1.9.2
Classes | Macros | Typedefs | Enumerations
indiapi.h File Reference

Constants and Data structure definitions for the interface to the reference INDI C API implementation. More...

#include <stdio.h>

Go to the source code of this file.

Classes

struct  _IText
 
struct  _ITextVectorProperty
 Text vector property descriptor. More...
 
struct  _INumber
 
struct  _INumberVectorProperty
 Number vector property descriptor. More...
 
struct  _ISwitch
 
struct  _ISwitchVectorProperty
 Switch vector property descriptor. More...
 
struct  _ILight
 
struct  _ILightVectorProperty
 Light vector property descriptor. More...
 
struct  _IBLOB
 
struct  _IBLOBVectorProperty
 BLOB (Binary Large Object) vector property descriptor. More...
 

Macros

#define INDIV   1.7
 
#define INDI_VERSION_MAJOR   1
 
#define INDI_VERSION_MINOR   9
 
#define INDI_VERSION_RELEASE   2
 
#define MAXINDINAME   64
 
#define MAXINDILABEL   64
 
#define MAXINDIDEVICE   64
 
#define MAXINDIGROUP   64
 
#define MAXINDIFORMAT   64
 
#define MAXINDIBLOBFMT   64
 
#define MAXINDITSTAMP   64
 
#define MAXINDIMESSAGE   255
 
#define NARRAY(a)   (sizeof(a) / sizeof(a[0]))
 Handy macro to find the number of elements in array a[]. Must be used with actual array, not pointer. More...
 
#define assert_mem(p)   if((p) == 0) { fprintf(stderr, "%s(%s): Failed to allocate memory\n", __FILE__, __func__); exit(1); }
 Bails out if memory pointer is 0. Prints file and function. More...
 

Typedefs

typedef struct _IText IText
 
typedef struct _ITextVectorProperty ITextVectorProperty
 
typedef struct _INumber INumber
 
typedef struct _INumberVectorProperty INumberVectorProperty
 
typedef struct _ISwitch ISwitch
 
typedef struct _ISwitchVectorProperty ISwitchVectorProperty
 
typedef struct _ILight ILight
 
typedef struct _ILightVectorProperty ILightVectorProperty
 
typedef struct _IBLOB IBLOB
 
typedef struct _IBLOBVectorProperty IBLOBVectorProperty
 

Enumerations

enum  ISState { ISS_OFF = 0, ISS_ON }
 Switch state. More...
 
enum  IPState { IPS_IDLE = 0, IPS_OK, IPS_BUSY, IPS_ALERT }
 Property state. More...
 
enum  ISRule { ISR_1OFMANY, ISR_ATMOST1, ISR_NOFMANY }
 Switch vector rule hint. More...
 
enum  IPerm { IP_RO, IP_WO, IP_RW }
 Permission hint, with respect to client. More...
 

Detailed Description

Constants and Data structure definitions for the interface to the reference INDI C API implementation.

Author
Elwood C. Downey

Definition in file indiapi.h.

Macro Definition Documentation

◆ assert_mem

#define assert_mem (   p)    if((p) == 0) { fprintf(stderr, "%s(%s): Failed to allocate memory\n", __FILE__, __func__); exit(1); }

Bails out if memory pointer is 0. Prints file and function.

Definition at line 504 of file indiapi.h.

◆ INDI_VERSION_MAJOR

#define INDI_VERSION_MAJOR   1

Definition at line 136 of file indiapi.h.

◆ INDI_VERSION_MINOR

#define INDI_VERSION_MINOR   9

Definition at line 137 of file indiapi.h.

◆ INDI_VERSION_RELEASE

#define INDI_VERSION_RELEASE   2

Definition at line 138 of file indiapi.h.

◆ INDIV

#define INDIV   1.7

Definition at line 133 of file indiapi.h.

◆ MAXINDIBLOBFMT

#define MAXINDIBLOBFMT   64

Definition at line 195 of file indiapi.h.

◆ MAXINDIDEVICE

#define MAXINDIDEVICE   64

Definition at line 192 of file indiapi.h.

◆ MAXINDIFORMAT

#define MAXINDIFORMAT   64

Definition at line 194 of file indiapi.h.

◆ MAXINDIGROUP

#define MAXINDIGROUP   64

Definition at line 193 of file indiapi.h.

◆ MAXINDILABEL

#define MAXINDILABEL   64

Definition at line 191 of file indiapi.h.

◆ MAXINDIMESSAGE

#define MAXINDIMESSAGE   255

Definition at line 197 of file indiapi.h.

◆ MAXINDINAME

#define MAXINDINAME   64

Definition at line 190 of file indiapi.h.

◆ MAXINDITSTAMP

#define MAXINDITSTAMP   64

Definition at line 196 of file indiapi.h.

◆ NARRAY

#define NARRAY (   a)    (sizeof(a) / sizeof(a[0]))

Handy macro to find the number of elements in array a[]. Must be used with actual array, not pointer.

Definition at line 499 of file indiapi.h.

Typedef Documentation

◆ IBLOB

typedef struct _IBLOB IBLOB

◆ IBLOBVectorProperty

◆ ILight

typedef struct _ILight ILight

◆ ILightVectorProperty

◆ INumber

typedef struct _INumber INumber

◆ INumberVectorProperty

◆ ISwitch

typedef struct _ISwitch ISwitch

◆ ISwitchVectorProperty

◆ IText

typedef struct _IText IText

◆ ITextVectorProperty

Enumeration Type Documentation

◆ IPerm

enum IPerm

Permission hint, with respect to client.

Enumerator
IP_RO 

Read Only

IP_WO 

Write Only

IP_RW 

Read & Write

Definition at line 181 of file indiapi.h.

◆ IPState

enum IPState

Property state.

Enumerator
IPS_IDLE 

State is idle

IPS_OK 

State is ok

IPS_BUSY 

State is busy

IPS_ALERT 

State is alert

Examples
simpleskeleton.cpp.

Definition at line 158 of file indiapi.h.

◆ ISRule

enum ISRule

Switch vector rule hint.

Enumerator
ISR_1OFMANY 

Only 1 switch of many can be ON (e.g. radio buttons)

ISR_ATMOST1 

At most one switch can be ON, but all switches can be off. It is similar to ISR_1OFMANY with the exception that all switches can be off.

ISR_NOFMANY 

Any number of switches can be ON (e.g. check boxes)

Definition at line 170 of file indiapi.h.

◆ ISState

enum ISState

Switch state.

Enumerator
ISS_OFF 

Switch is OFF

ISS_ON 

Switch is ON

Definition at line 148 of file indiapi.h.