Instrument Neutral Distributed Interface INDI 2.2.5
indidevapi.h
Go to the documentation of this file.
1
25#pragma once
26
96#include <stdarg.h>
97#include "indiapi.h"
98#include "lilxml.h"
99
100/*******************************************************************************
101 *******************************************************************************
102 *
103 * Functions the INDI device driver framework defines which the Driver may call
104 *
105 *******************************************************************************
106 *******************************************************************************
107 */
108
109#ifdef __cplusplus
110extern "C" {
111#endif
112
130/* Handy readability macro to avoid unused variables warnings */
131#ifndef INDI_UNUSED
132# define INDI_UNUSED(x) (void)x
133#endif
134
135/* enable warnings for printf-style functions */
136#ifndef ATTRIBUTE_FORMAT_PRINTF
137# ifdef __GNUC__
138# define ATTRIBUTE_FORMAT_PRINTF(A, B) __attribute__((format(printf, (A), (B))))
139# else
140# define ATTRIBUTE_FORMAT_PRINTF(A, B)
141# endif
142#endif
143
144/* @{ */
145
150extern void IDDefText(const ITextVectorProperty *t, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
151extern void IDDefTextVA(const ITextVectorProperty *t, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
152
157extern void IDDefNumber(const INumberVectorProperty *n, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
158extern void IDDefNumberVA(const INumberVectorProperty *n, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
159
164extern void IDDefSwitch(const ISwitchVectorProperty *s, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
165extern void IDDefSwitchVA(const ISwitchVectorProperty *s, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
166
171extern void IDDefLight(const ILightVectorProperty *l, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
172extern void IDDefLightVA(const ILightVectorProperty *l, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
173
178extern void IDDefBLOB(const IBLOBVectorProperty *b, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
179extern void IDDefBLOBVA(const IBLOBVectorProperty *b, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
180
181/* @} */
182
187/* @{ */
188
193extern void IDSetText(const ITextVectorProperty *t, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
194extern void IDSetTextVA(const ITextVectorProperty *t, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
195
200extern void IDSetNumber(const INumberVectorProperty *n, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
201extern void IDSetNumberVA(const INumberVectorProperty *n, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
202
207extern void IDSetSwitch(const ISwitchVectorProperty *s, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
208extern void IDSetSwitchVA(const ISwitchVectorProperty *s, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
209
214extern void IDSetLight(const ILightVectorProperty *l, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
215extern void IDSetLightVA(const ILightVectorProperty *l, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
216
221extern void IDSetBLOB(const IBLOBVectorProperty *b, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
222extern void IDSetBLOBVA(const IBLOBVectorProperty *b, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
223
224/* @} */
225
230/* @{ */
231
237extern void IDMessage(const char *dev, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
238extern void IDMessageVA(const char *dev, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
239
245extern void IDDelete(const char *dev, const char *name, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(3, 4);
246extern void IDDeleteVA(const char *dev, const char *name, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(3, 0);
247
252extern void IDLog(const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(1, 2);
253extern void IDLogVA(const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(1, 0);
254
255/* @} */
256
261/* @{ */
262
266typedef enum
267{
270 B_ONLY
272
277extern void IDSnoopDevice(const char *snooped_device, const char *snooped_property);
278
284extern void IDSnoopBLOBs(const char *snooped_device, const char *snooped_property, BLOBHandling bh);
285
286/* @} */
287
293/* @{ */
294
295/* signature of a callback, timeout caller and work procedure function */
296
300typedef void(IE_CBF)(int readfiledes, void *userpointer);
301
305typedef void(IE_TCF)(void *userpointer);
306
310typedef void(IE_WPF)(void *userpointer);
311
312/* functions to add and remove callbacks, timers and work procedures */
313
320extern int IEAddCallback(int readfiledes, IE_CBF *fp, void *userpointer);
321
325extern void IERmCallback(int callbackid);
326
333extern int IEAddTimer(int millisecs, IE_TCF *fp, void *userpointer);
334
341extern int IEAddPeriodicTimer(int millisecs, IE_TCF *fp, void *userpointer);
342
347extern int IERemainingTimer(int timerid);
348
353extern int IENSecRemainingTimer(int tid);
354
358extern void IERmTimer(int timerid);
359
365extern int IEAddWorkProc(IE_WPF *fp, void *userpointer);
366
370extern void IERmWorkProc(int workprocid);
371
373extern int IEDeferLoop(int maxms, int *flagp);
374extern int IEDeferLoop0(int maxms, int *flagp);
375
376/* @} */
377
387/* @{ */
388
393extern int IULoadConfigNumber(const INumberVectorProperty *nvp);
394
399extern int IULoadConfigText(const ITextVectorProperty *tvp);
400
405extern int IULoadConfigSwitch(const ISwitchVectorProperty *svp);
406
411extern void IUSaveText(IText *tp, const char *newtext);
412
417extern void IUSaveConfigNumber(FILE *fp, const INumberVectorProperty *nvp);
418
423extern void IUSaveConfigText(FILE *fp, const ITextVectorProperty *tvp);
424
429extern void IUSaveConfigSwitch(FILE *fp, const ISwitchVectorProperty *svp);
430
436extern void IUSaveConfigBLOB(FILE *fp, const IBLOBVectorProperty *bvp);
437
442extern void IUSaveText(IText *tp, const char *newtext);
443
452extern int IUSaveBLOB(IBLOB *bp, int size, int blobsize, char *blob, char *format);
453
459extern IText *IUFindText(const ITextVectorProperty *tvp, const char *name);
460
466extern INumber *IUFindNumber(const INumberVectorProperty *nvp, const char *name);
467
473extern ISwitch *IUFindSwitch(const ISwitchVectorProperty *svp, const char *name);
474
480extern ILight *IUFindLight(const ILightVectorProperty *lvp, const char *name);
481
487extern IBLOB *IUFindBLOB(const IBLOBVectorProperty *bvp, const char *name);
488
495
502extern int IUFindIndex(const char *needle, char **hay, unsigned int n);
503
509extern int IUFindOnSwitchIndex(const ISwitchVectorProperty *sp);
510
517extern int IUFindOnStateIndex(ISState *states, int n);
518
527extern const char *IUFindOnSwitchName(ISState *states, char *names[], int n);
528
532extern void IUResetSwitch(ISwitchVectorProperty *svp);
533
540extern void IUFillSwitch(ISwitch *sp, const char *name, const char *label, ISState s);
541
548extern void IUFillLight(ILight *lp, const char *name, const char *label, IPState s);
549
560extern void IUFillNumber(INumber *np, const char *name, const char *label, const char *format, double min, double max,
561 double step, double value);
562
569extern void IUFillText(IText *tp, const char *name, const char *label, const char *initialText);
570
577extern void IUFillBLOB(IBLOB *bp, const char *name, const char *label, const char *format);
578
592extern void IUFillSwitchVector(ISwitchVectorProperty *svp, ISwitch *sp, int nsp, const char *dev, const char *name,
593 const char *label, const char *group, IPerm p, ISRule r, double timeout, IPState s);
594
605extern void IUFillLightVector(ILightVectorProperty *lvp, ILight *lp, int nlp, const char *dev, const char *name,
606 const char *label, const char *group, IPState s);
607
620extern void IUFillNumberVector(INumberVectorProperty *nvp, INumber *np, int nnp, const char *dev, const char *name,
621 const char *label, const char *group, IPerm p, double timeout, IPState s);
622
635extern void IUFillTextVector(ITextVectorProperty *tvp, IText *tp, int ntp, const char *dev, const char *name,
636 const char *label, const char *group, IPerm p, double timeout, IPState s);
637
650extern void IUFillBLOBVector(IBLOBVectorProperty *bvp, IBLOB *bp, int nbp, const char *dev, const char *name,
651 const char *label, const char *group, IPerm p, double timeout, IPState s);
652
658extern int IUSnoopNumber(XMLEle *root, INumberVectorProperty *nvp);
659
665extern int IUSnoopText(XMLEle *root, ITextVectorProperty *tvp);
666
672extern int IUSnoopLight(XMLEle *root, ILightVectorProperty *lvp);
673
679extern int IUSnoopSwitch(XMLEle *root, ISwitchVectorProperty *svp);
680
686extern int IUSnoopBLOB(XMLEle *root, IBLOBVectorProperty *bvp);
687
688/* @} */
689
690/*******************************************************************************
691 *******************************************************************************
692 *
693 * Functions the INDI Device Driver framework calls which the Driver must
694 * define.
695 *
696 *******************************************************************************
697 *******************************************************************************
698 */
699
708/* @{ */
709
723extern void ISGetProperties(const char *dev);
724
733extern void ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n);
734
743extern void ISNewNumber(const char *dev, const char *name, double *values, char *names[], int n);
744
753extern void ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n);
754
767extern void ISNewBLOB(const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[],
768 char *names[], int n);
769
774extern void ISSnoopDevice(XMLEle *root);
775
776/* @} */
777
787extern int crackDN(XMLEle *root, char **dev, char **name, char msg[]);
788
794extern int crackIPState(const char *str, IPState *ip);
795
801extern int crackISState(const char *str, ISState *ip);
802
808extern int crackIPerm(const char *str, IPerm *ip);
809
815extern int crackISRule(const char *str, ISRule *ip);
816
818extern const char *pstateStr(IPState s);
819
821extern const char *sstateStr(ISState s);
822
824extern const char *ruleStr(ISRule r);
825
827extern const char *permStr(IPerm p);
828
830extern void xmlv1();
831
832#ifdef __cplusplus
833}
834#endif
double max(void)
#define min(a, b)
Constants and Data structure definitions for the interface to the reference INDI C API implementation...
ISState
Switch state.
Definition indiapi.h:148
IPerm
Permission hint, with respect to client.
Definition indiapi.h:181
IPState
Property state.
Definition indiapi.h:158
ISRule
Switch vector rule hint.
Definition indiapi.h:170
int IUSnoopSwitch(XMLEle *root, ISwitchVectorProperty *svp)
Update a snooped switch vector property from the given XML root element.
Definition indidevapi.c:678
void IUSaveConfigSwitch(FILE *fp, const ISwitchVectorProperty *svp)
Add a switch vector property value to the configuration file.
Definition indidevapi.c:33
void void void void void void void IDSetLight(const ILightVectorProperty *l, const char *msg,...) ATTRIBUTE_FORMAT_PRINTF(2
Tell client to update an existing light vector property.
void IUFillLight(ILight *lp, const char *name, const char *label, IPState s)
Assign attributes for a light property. The light's auxiliary elements will be set to NULL.
Definition indidevapi.c:387
void() IE_CBF(int readfiledes, void *userpointer)
Definition indidevapi.h:300
void void IDMessageVA(const char *dev, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2
void void void void void void void void void void IDSetBLOBVA(const IBLOBVectorProperty *b, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2
int IUFindOnSwitchIndex(const ISwitchVectorProperty *sp)
Returns the index of first ON switch it finds in the vector switch property.
Definition indidevapi.c:337
void IDSnoopBLOBs(const char *snooped_device, const char *snooped_property, BLOBHandling bh)
Function a Driver calls to control whether they will receive BLOBs from snooped devices.
Definition indidriver.c:161
int IULoadConfigSwitch(const ISwitchVectorProperty *svp)
Add a switch vector property value to the configuration file.
Definition indidevapi.c:214
void void void void void void void void IDDefLightVA(const ILightVectorProperty *l, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2
void void void void void void IDDefSwitchVA(const ISwitchVectorProperty *s, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2
void IERmCallback(int callbackid)
Remove a callback function.
Definition eventloop.c:581
IText * IUFindText(const ITextVectorProperty *tvp, const char *name)
Find an IText member in a vector text property.
Definition indidevapi.c:265
void void void void void void void void void IDSetBLOB(const IBLOBVectorProperty *b, const char *msg,...) ATTRIBUTE_FORMAT_PRINTF(2
Tell client to update an existing BLOB vector property.
void IERmWorkProc(int workprocid)
Remove a work procedure.
Definition eventloop.c:616
void IUFillNumberVector(INumberVectorProperty *nvp, INumber *np, int nnp, const char *dev, const char *name, const char *label, const char *group, IPerm p, double timeout, IPState s)
Assign attributes for a number vector property. The vector's auxiliary elements will be set to NULL.
Definition indidevapi.c:490
ISwitch * IUFindOnSwitch(const ISwitchVectorProperty *sp)
Returns the first ON switch it finds in the vector switch property.
Definition indidevapi.c:317
const char * ruleStr(ISRule r)
Definition indidevapi.c:877
ILight * IUFindLight(const ILightVectorProperty *lvp, const char *name)
Find an ILight member in a vector Light property.
Definition indidevapi.c:295
void ISNewNumber(const char *dev, const char *name, double *values, char *names[], int n)
Update the value of an existing number vector property.
int IULoadConfigNumber(const INumberVectorProperty *nvp)
Load a number vector property value from the configuration file.
Definition indidevapi.c:126
BLOBHandling
How drivers handle BLOBs incoming from snooping drivers.
Definition indidevapi.h:267
@ B_ONLY
Definition indidevapi.h:270
@ B_ALSO
Definition indidevapi.h:269
@ B_NEVER
Definition indidevapi.h:268
void void IDSetTextVA(const ITextVectorProperty *t, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2
void ISNewBLOB(const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n)
Update data of an existing blob vector property.
void void IDDefTextVA(const ITextVectorProperty *t, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2
void IDSetText(const ITextVectorProperty *t, const char *msg,...) ATTRIBUTE_FORMAT_PRINTF(2
Tell client to update an existing text vector property.
void IUResetSwitch(ISwitchVectorProperty *svp)
Reset all switches in a switch vector property to OFF.
Definition indidevapi.c:366
void IUFillLightVector(ILightVectorProperty *lvp, ILight *lp, int nlp, const char *dev, const char *name, const char *label, const char *group, IPState s)
Assign attributes for a light vector property. The vector's auxiliary elements will be set to NULL.
Definition indidevapi.c:473
void IUFillTextVector(ITextVectorProperty *tvp, IText *tp, int ntp, const char *dev, const char *name, const char *label, const char *group, IPerm p, double timeout, IPState s)
Assign attributes for a text vector property. The vector's auxiliary elements will be set to NULL.
Definition indidevapi.c:509
INumber * IUFindNumber(const INumberVectorProperty *nvp, const char *name)
Find an INumber member in a number text property.
Definition indidevapi.c:275
void void void void void void IDSetSwitchVA(const ISwitchVectorProperty *s, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2
void IUSaveText(IText *tp, const char *newtext)
Function to reliably save new text in a IText.
Definition indidevapi.c:44
void void void IDSetNumber(const INumberVectorProperty *n, const char *msg,...) ATTRIBUTE_FORMAT_PRINTF(2
Tell client to update an existing number vector property.
int IUFindIndex(const char *needle, char **hay, unsigned int n)
Returns the index of the string in a string array.
Definition indidevapi.c:326
int IUSnoopBLOB(XMLEle *root, IBLOBVectorProperty *bvp)
Update a snooped BLOB vector property from the given XML root element.
Definition indidevapi.c:720
int crackDN(XMLEle *root, char **dev, char **name, char msg[])
Extract dev and name attributes from an XML element.
Definition indidevapi.c:770
void void void void void void IDLogVA(const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(1
int IUSnoopLight(XMLEle *root, ILightVectorProperty *lvp)
Update a snooped light vector property from the given XML root element.
Definition indidevapi.c:636
void ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n)
Update the value of an existing switch vector property.
ISwitch * IUFindSwitch(const ISwitchVectorProperty *svp, const char *name)
Find an ISwitch member in a vector switch property.
Definition indidevapi.c:285
void void void void void void void IDDefLight(const ILightVectorProperty *l, const char *msg,...) ATTRIBUTE_FORMAT_PRINTF(2
Tell client to create a light vector property.
void void void void IDDefNumberVA(const INumberVectorProperty *n, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2
void ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n)
Update the value of an existing text vector property.
int IUSaveBLOB(IBLOB *bp, int size, int blobsize, char *blob, char *format)
Function to save blob metadata in the corresponding blob.
Definition indidevapi.c:52
void IUSaveConfigBLOB(FILE *fp, const IBLOBVectorProperty *bvp)
Add a BLOB vector property value to the configuration file.
Definition indidevapi.c:38
void void void IDDefNumber(const INumberVectorProperty *n, const char *msg,...) ATTRIBUTE_FORMAT_PRINTF(2
Tell client to create a number number property.
void void void void IDDeleteVA(const char *dev, const char *name, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(3
void IERmTimer(int timerid)
Remove the timer with the given timerid, as returned from IEAddTimer() or IEAddPeriodicTimer().
Definition eventloop.c:606
void void void void void void void void void IDDefBLOB(const IBLOBVectorProperty *b, const char *msg,...) ATTRIBUTE_FORMAT_PRINTF(2
Tell client to create a BLOB vector property.
int IUSnoopText(XMLEle *root, ITextVectorProperty *tvp)
Update a snooped text vector property from the given XML root element.
Definition indidevapi.c:600
void IDMessage(const char *dev, const char *msg,...) ATTRIBUTE_FORMAT_PRINTF(2
Function Drivers call to send log messages to Clients. If dev is specified the Client shall associate...
void IUSaveConfigNumber(FILE *fp, const INumberVectorProperty *nvp)
Add a number vector property value to the configuration file.
Definition indidevapi.c:23
void ISGetProperties(const char *dev)
Get Device Properties.
void IDSnoopDevice(const char *snooped_device, const char *snooped_property)
Function a Driver calls to snoop on another Device. Snooped messages will then arrive via ISSnoopDevi...
Definition indidriver.c:143
int IUSnoopNumber(XMLEle *root, INumberVectorProperty *nvp)
Update a snooped number vector property from the given XML root element.
Definition indidevapi.c:555
int IEAddTimer(int millisecs, IE_TCF *fp, void *userpointer)
Register a new single-shot timer function, fp, to be called with ud as argument after ms.
Definition eventloop.c:586
const char * sstateStr(ISState s)
Definition indidevapi.c:863
void void void void void IDDefSwitch(const ISwitchVectorProperty *s, const char *msg,...) ATTRIBUTE_FORMAT_PRINTF(2
Tell client to create a switch vector property.
const char * permStr(IPerm p)
Definition indidevapi.c:893
IBLOB * IUFindBLOB(const IBLOBVectorProperty *bvp, const char *name)
Find an IBLOB member in a vector BLOB property.
Definition indidevapi.c:305
void xmlv1()
print the boilerplate comment introducing xml
Definition indidevapi.c:909
void IUFillSwitch(ISwitch *sp, const char *name, const char *label, ISState s)
Assign attributes for a switch property. The switch's auxiliary elements will be set to NULL.
Definition indidevapi.c:376
void void void IDDelete(const char *dev, const char *name, const char *msg,...) ATTRIBUTE_FORMAT_PRINTF(3
Function Drivers call to inform Clients a Property is no longer available, or the entire device is go...
void IUFillText(IText *tp, const char *name, const char *label, const char *initialText)
Assign attributes for a text property. The text's auxiliary elements will be set to NULL.
Definition indidevapi.c:416
void IUFillNumber(INumber *np, const char *name, const char *label, const char *format, double min, double max, double step, double value)
Assign attributes for a number property. The number's auxiliary elements will be set to NULL.
Definition indidevapi.c:398
int crackIPerm(const char *str, IPerm *ip)
Extract property permission state (RW, RO, WO) from the supplied string.
Definition indidevapi.c:819
void IUSaveConfigText(FILE *fp, const ITextVectorProperty *tvp)
Add a text vector property value to the configuration file.
Definition indidevapi.c:28
void void void void void IDLog(const char *msg,...) ATTRIBUTE_FORMAT_PRINTF(1
Function Drivers call to log a message locally. The message is not sent to any Clients.
int crackIPState(const char *str, IPState *ip)
Extract property state (Idle, OK, Busy, Alert) from the supplied string.
Definition indidevapi.c:793
int IEAddPeriodicTimer(int millisecs, IE_TCF *fp, void *userpointer)
Register a new periodic timer function, fp, to be called with ud as argument after ms.
Definition eventloop.c:591
void void void void void IDSetSwitch(const ISwitchVectorProperty *s, const char *msg,...) ATTRIBUTE_FORMAT_PRINTF(2
Tell client to update an existing switch vector property.
const char * pstateStr(IPState s)
Definition indidevapi.c:845
void void void void IDSetNumberVA(const INumberVectorProperty *n, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2
void ISSnoopDevice(XMLEle *root)
Function defined by Drivers that is called when another Driver it is snooping (by having previously c...
void void void void void void void void IDSetLightVA(const ILightVectorProperty *l, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2
int IULoadConfigText(const ITextVectorProperty *tvp)
Load a text vector property value from the configuration file.
Definition indidevapi.c:170
void IDDefText(const ITextVectorProperty *t, const char *msg,...) ATTRIBUTE_FORMAT_PRINTF(2
Tell client to create a text vector property.
void IUFillSwitchVector(ISwitchVectorProperty *svp, ISwitch *sp, int nsp, const char *dev, const char *name, const char *label, const char *group, IPerm p, ISRule r, double timeout, IPState s)
Assign attributes for a switch vector property. The vector's auxiliary elements will be set to NULL.
Definition indidevapi.c:453
void() IE_TCF(void *userpointer)
Definition indidevapi.h:305
int IEDeferLoop(int maxms, int *flagp)
wait in-line for a flag to set, presumably by another event function
Definition eventloop.c:621
int IERemainingTimer(int timerid)
Returns the timer's remaining value in milliseconds left until the timeout.
Definition eventloop.c:596
void IUFillBLOBVector(IBLOBVectorProperty *bvp, IBLOB *bp, int nbp, const char *dev, const char *name, const char *label, const char *group, IPerm p, double timeout, IPState s)
Assign attributes for a BLOB vector property. The vector's auxiliary elements will be set to NULL.
Definition indidevapi.c:528
void IUFillBLOB(IBLOB *bp, const char *name, const char *label, const char *format)
Assign attributes for a BLOB property. The BLOB's data and auxiliary elements will be set to NULL.
Definition indidevapi.c:434
void() IE_WPF(void *userpointer)
Definition indidevapi.h:310
#define ATTRIBUTE_FORMAT_PRINTF(A, B)
Definition indidevapi.h:140
int IEAddCallback(int readfiledes, IE_CBF *fp, void *userpointer)
Register a new callback, fp, to be called with userpointer as argument when readfiledes is ready.
Definition eventloop.c:576
int crackISRule(const char *str, ISRule *ip)
Extract switch rule (OneOfMany, OnlyOne..etc) from the supplied string.
Definition indidevapi.c:832
const char * IUFindOnSwitchName(ISState *states, char *names[], int n)
Returns the name of the first ON switch it finds in the supplied arguments.
Definition indidevapi.c:355
int IENSecRemainingTimer(int tid)
Returns the timer's remaining value in nanoseconds left until the timeout.
int IEAddWorkProc(IE_WPF *fp, void *userpointer)
Add a new work procedure, fp, to be called with ud when nothing else to do.
Definition eventloop.c:611
int IEDeferLoop0(int maxms, int *flagp)
Definition eventloop.c:626
void void void void void void void void void void IDDefBLOBVA(const IBLOBVectorProperty *b, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2
int crackISState(const char *str, ISState *ip)
Extract switch state (On or Off) from the supplied string.
Definition indidevapi.c:808
int IUFindOnStateIndex(ISState *states, int n)
Returns the index of first ON switch it finds in the ISState array.
Definition indidevapi.c:346
A little DOM-style library to handle parsing and processing an XML file.
One Blob (Binary Large Object) descriptor.
One light descriptor.
One number descriptor.
One switch descriptor.
One text descriptor.
BLOB (Binary Large Object) vector property descriptor.
Definition indiapi.h:469
Light vector property descriptor.
Definition indiapi.h:415
Number vector property descriptor.
Definition indiapi.h:317
Switch vector property descriptor.
Definition indiapi.h:365
Text vector property descriptor.
Definition indiapi.h:244