Instrument Neutral Distributed Interface INDI  2.0.2
indidevapi.h
Go to the documentation of this file.
1 
25 #pragma once
26 
96 #include "indiapi.h"
97 #include "lilxml.h"
98 
99 /*******************************************************************************
100  *******************************************************************************
101  *
102  * Functions the INDI device driver framework defines which the Driver may call
103  *
104  *******************************************************************************
105  *******************************************************************************
106  */
107 
108 #ifdef __cplusplus
109 extern "C" {
110 #endif
111 
129 /* Handy readability macro to avoid unused variables warnings */
130 #ifndef INDI_UNUSED
131 # define INDI_UNUSED(x) (void)x
132 #endif
133 
134 /* enable warnings for printf-style functions */
135 #ifndef ATTRIBUTE_FORMAT_PRINTF
136 # ifdef __GNUC__
137 # define ATTRIBUTE_FORMAT_PRINTF(A, B) __attribute__((format(printf, (A), (B))))
138 # else
139 # define ATTRIBUTE_FORMAT_PRINTF(A, B)
140 # endif
141 #endif
142 
143 /* @{ */
144 
149 extern void IDDefText(const ITextVectorProperty *t, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
150 extern void IDDefTextVA(const ITextVectorProperty *t, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
151 
156 extern void IDDefNumber(const INumberVectorProperty *n, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
157 extern void IDDefNumberVA(const INumberVectorProperty *n, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
158 
163 extern void IDDefSwitch(const ISwitchVectorProperty *s, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
164 extern void IDDefSwitchVA(const ISwitchVectorProperty *s, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
165 
170 extern void IDDefLight(const ILightVectorProperty *l, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
171 extern void IDDefLightVA(const ILightVectorProperty *l, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
172 
177 extern void IDDefBLOB(const IBLOBVectorProperty *b, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
178 extern void IDDefBLOBVA(const IBLOBVectorProperty *b, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
179 
180 /* @} */
181 
186 /* @{ */
187 
192 extern void IDSetText(const ITextVectorProperty *t, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
193 extern void IDSetTextVA(const ITextVectorProperty *t, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
194 
199 extern void IDSetNumber(const INumberVectorProperty *n, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
200 extern void IDSetNumberVA(const INumberVectorProperty *n, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
201 
206 extern void IDSetSwitch(const ISwitchVectorProperty *s, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
207 extern void IDSetSwitchVA(const ISwitchVectorProperty *s, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
208 
213 extern void IDSetLight(const ILightVectorProperty *l, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
214 extern void IDSetLightVA(const ILightVectorProperty *l, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
215 
220 extern void IDSetBLOB(const IBLOBVectorProperty *b, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
221 extern void IDSetBLOBVA(const IBLOBVectorProperty *b, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
222 
223 /* @} */
224 
229 /* @{ */
230 
236 extern void IDMessage(const char *dev, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
237 extern void IDMessageVA(const char *dev, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
238 
244 extern void IDDelete(const char *dev, const char *name, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(3, 4);
245 extern void IDDeleteVA(const char *dev, const char *name, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(3, 0);
246 
251 extern void IDLog(const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(1, 2);
252 extern void IDLogVA(const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(1, 0);
253 
254 /* @} */
255 
260 /* @{ */
261 
265 typedef enum
266 {
267  B_NEVER = 0,
269  B_ONLY
271 
276 extern void IDSnoopDevice(const char *snooped_device, const char *snooped_property);
277 
283 extern void IDSnoopBLOBs(const char *snooped_device, const char *snooped_property, BLOBHandling bh);
284 
285 /* @} */
286 
292 /* @{ */
293 
294 /* signature of a callback, timout caller and work procedure function */
295 
299 typedef void(IE_CBF)(int readfiledes, void *userpointer);
300 
304 typedef void(IE_TCF)(void *userpointer);
305 
309 typedef void(IE_WPF)(void *userpointer);
310 
311 /* functions to add and remove callbacks, timers and work procedures */
312 
319 extern int IEAddCallback(int readfiledes, IE_CBF *fp, void *userpointer);
320 
324 extern void IERmCallback(int callbackid);
325 
332 extern int IEAddTimer(int millisecs, IE_TCF *fp, void *userpointer);
333 
340 extern int IEAddPeriodicTimer(int millisecs, IE_TCF *fp, void *userpointer);
341 
346 extern int IERemainingTimer(int timerid);
347 
352 extern int IENSecRemainingTimer(int tid);
353 
357 extern void IERmTimer(int timerid);
358 
364 extern int IEAddWorkProc(IE_WPF *fp, void *userpointer);
365 
369 extern void IERmWorkProc(int workprocid);
370 
372 extern int IEDeferLoop(int maxms, int *flagp);
373 extern int IEDeferLoop0(int maxms, int *flagp);
374 
375 /* @} */
376 
386 /* @{ */
387 
392 extern void IUSaveConfigNumber(FILE *fp, const INumberVectorProperty *nvp);
393 
398 extern void IUSaveConfigText(FILE *fp, const ITextVectorProperty *tvp);
399 
404 extern void IUSaveConfigSwitch(FILE *fp, const ISwitchVectorProperty *svp);
405 
411 extern void IUSaveConfigBLOB(FILE *fp, const IBLOBVectorProperty *bvp);
412 
417 extern void IUSaveText(IText *tp, const char *newtext);
418 
427 extern int IUSaveBLOB(IBLOB *bp, int size, int blobsize, char *blob, char *format);
428 
434 extern IText *IUFindText(const ITextVectorProperty *tvp, const char *name);
435 
441 extern INumber *IUFindNumber(const INumberVectorProperty *nvp, const char *name);
442 
448 extern ISwitch *IUFindSwitch(const ISwitchVectorProperty *svp, const char *name);
449 
455 extern ILight *IUFindLight(const ILightVectorProperty *lvp, const char *name);
456 
462 extern IBLOB *IUFindBLOB(const IBLOBVectorProperty *bvp, const char *name);
463 
469 extern ISwitch *IUFindOnSwitch(const ISwitchVectorProperty *sp);
470 
477 extern int IUFindIndex(const char *needle, char **hay, unsigned int n);
478 
484 extern int IUFindOnSwitchIndex(const ISwitchVectorProperty *sp);
485 
494 extern const char *IUFindOnSwitchName(ISState *states, char *names[], int n);
495 
499 extern void IUResetSwitch(ISwitchVectorProperty *svp);
500 
507 extern void IUFillSwitch(ISwitch *sp, const char *name, const char *label, ISState s);
508 
515 extern void IUFillLight(ILight *lp, const char *name, const char *label, IPState s);
516 
527 extern void IUFillNumber(INumber *np, const char *name, const char *label, const char *format, double min, double max,
528  double step, double value);
529 
536 extern void IUFillText(IText *tp, const char *name, const char *label, const char *initialText);
537 
544 extern void IUFillBLOB(IBLOB *bp, const char *name, const char *label, const char *format);
545 
559 extern void IUFillSwitchVector(ISwitchVectorProperty *svp, ISwitch *sp, int nsp, const char *dev, const char *name,
560  const char *label, const char *group, IPerm p, ISRule r, double timeout, IPState s);
561 
572 extern void IUFillLightVector(ILightVectorProperty *lvp, ILight *lp, int nlp, const char *dev, const char *name,
573  const char *label, const char *group, IPState s);
574 
587 extern void IUFillNumberVector(INumberVectorProperty *nvp, INumber *np, int nnp, const char *dev, const char *name,
588  const char *label, const char *group, IPerm p, double timeout, IPState s);
589 
602 extern void IUFillTextVector(ITextVectorProperty *tvp, IText *tp, int ntp, const char *dev, const char *name,
603  const char *label, const char *group, IPerm p, double timeout, IPState s);
604 
617 extern void IUFillBLOBVector(IBLOBVectorProperty *bvp, IBLOB *bp, int nbp, const char *dev, const char *name,
618  const char *label, const char *group, IPerm p, double timeout, IPState s);
619 
625 extern int IUSnoopNumber(XMLEle *root, INumberVectorProperty *nvp);
626 
632 extern int IUSnoopText(XMLEle *root, ITextVectorProperty *tvp);
633 
639 extern int IUSnoopLight(XMLEle *root, ILightVectorProperty *lvp);
640 
646 extern int IUSnoopSwitch(XMLEle *root, ISwitchVectorProperty *svp);
647 
653 extern int IUSnoopBLOB(XMLEle *root, IBLOBVectorProperty *bvp);
654 
655 /* @} */
656 
657 /*******************************************************************************
658  *******************************************************************************
659  *
660  * Functions the INDI Device Driver framework calls which the Driver must
661  * define.
662  *
663  *******************************************************************************
664  *******************************************************************************
665  */
666 
675 /* @{ */
676 
690 extern void ISGetProperties(const char *dev);
691 
700 extern void ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n);
701 
710 extern void ISNewNumber(const char *dev, const char *name, double *values, char *names[], int n);
711 
720 extern void ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n);
721 
734 extern void ISNewBLOB(const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[],
735  char *names[], int n);
736 
741 extern void ISSnoopDevice(XMLEle *root);
742 
743 /* @} */
744 
754 extern int crackDN(XMLEle *root, char **dev, char **name, char msg[]);
755 
761 extern int crackIPState(const char *str, IPState *ip);
762 
768 extern int crackISState(const char *str, ISState *ip);
769 
775 extern int crackIPerm(const char *str, IPerm *ip);
776 
782 extern int crackISRule(const char *str, ISRule *ip);
783 
785 extern const char *pstateStr(IPState s);
786 
788 extern const char *sstateStr(ISState s);
789 
791 extern const char *ruleStr(ISRule r);
792 
794 extern const char *permStr(IPerm p);
795 
797 extern void xmlv1();
798 
799 // Advertize support for shared blob on this platform
800 #define INDI_SHARED_BLOB_SUPPORT
801 #include "sharedblob.h"
802 
803 #ifdef __cplusplus
804 }
805 #endif
double max(void)
double min(void)
Constants and Data structure definitions for the interface to the reference INDI C API implementation...
ISState
Switch state.
Definition: indiapi.h:150
IPerm
Permission hint, with respect to client.
Definition: indiapi.h:183
IPState
Property state.
Definition: indiapi.h:160
ISRule
Switch vector rule hint.
Definition: indiapi.h:172
int IUSnoopSwitch(XMLEle *root, ISwitchVectorProperty *svp)
Update a snooped switch vector property from the given XML root element.
Definition: indidevapi.c:460
void IUSaveConfigSwitch(FILE *fp, const ISwitchVectorProperty *svp)
Add a switch vector property value to the configuration file.
Definition: indidevapi.c:25
const char * ruleStr(ISRule r)
Definition: indidevapi.c:660
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:169
void() IE_CBF(int readfiledes, void *userpointer)
Definition: indidevapi.h:299
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:128
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
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:577
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:612
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:272
void ISNewNumber(const char *dev, const char *name, double *values, char *names[], int n)
Update the value of an existing number vector property.
BLOBHandling
How drivers handle BLOBs incoming from snooping drivers.
Definition: indidevapi.h:266
@ B_ONLY
Definition: indidevapi.h:269
@ B_ALSO
Definition: indidevapi.h:268
@ B_NEVER
Definition: indidevapi.h:267
void void IDSetTextVA(const ITextVectorProperty *t, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2
INumber * IUFindNumber(const INumberVectorProperty *nvp, const char *name)
Find an INumber member in a number text property.
Definition: indidevapi.c:66
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:148
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:255
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:291
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:137
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:36
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:117
int IUSnoopBLOB(XMLEle *root, IBLOBVectorProperty *bvp)
Update a snooped BLOB vector property from the given XML root element.
Definition: indidevapi.c:502
int crackDN(XMLEle *root, char **dev, char **name, char msg[])
Extract dev and name attributes from an XML element.
Definition: indidevapi.c:553
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:418
void ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n)
Update the value of an existing switch vector property.
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:44
void IUSaveConfigBLOB(FILE *fp, const IBLOBVectorProperty *bvp)
Add a BLOB vector property value to the configuration file.
Definition: indidevapi.c:30
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:602
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:382
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:15
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:337
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:582
void void void void void IDDefSwitch(const ISwitchVectorProperty *s, const char *msg,...) ATTRIBUTE_FORMAT_PRINTF(2
Tell client to create a switch vector property.
void xmlv1()
print the boilerplate comment introducing xml
Definition: indidevapi.c:692
const char * pstateStr(IPState s)
Definition: indidevapi.c:628
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:158
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:198
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:180
int crackIPerm(const char *str, IPerm *ip)
Extract property permission state (RW, RO, WO) from the supplied string.
Definition: indidevapi.c:602
void IUSaveConfigText(FILE *fp, const ITextVectorProperty *tvp)
Add a text vector property value to the configuration file.
Definition: indidevapi.c:20
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:576
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:587
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.
IBLOB * IUFindBLOB(const IBLOBVectorProperty *bvp, const char *name)
Find an IBLOB member in a vector BLOB property.
Definition: indidevapi.c:96
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
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:235
void() IE_TCF(void *userpointer)
Definition: indidevapi.h:304
int IEDeferLoop(int maxms, int *flagp)
wait in-line for a flag to set, presumably by another event function
Definition: eventloop.c:617
IText * IUFindText(const ITextVectorProperty *tvp, const char *name)
Find an IText member in a vector text property.
Definition: indidevapi.c:56
int IERemainingTimer(int timerid)
Returns the timer's remaining value in milliseconds left until the timeout.
Definition: eventloop.c:592
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:310
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:216
void() IE_WPF(void *userpointer)
Definition: indidevapi.h:309
#define ATTRIBUTE_FORMAT_PRINTF(A, B)
Definition: indidevapi.h:139
ISwitch * IUFindOnSwitch(const ISwitchVectorProperty *sp)
Returns the first ON switch it finds in the vector switch property.
Definition: indidevapi.c:108
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:572
ILight * IUFindLight(const ILightVectorProperty *lvp, const char *name)
Find an ILight member in a vector Light property.
Definition: indidevapi.c:86
int crackISRule(const char *str, ISRule *ip)
Extract switch rule (OneOfMany, OnlyOne..etc) from the supplied string.
Definition: indidevapi.c:615
const char * sstateStr(ISState s)
Definition: indidevapi.c:646
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:607
int IEDeferLoop0(int maxms, int *flagp)
Definition: eventloop.c:622
void void void void void void void void void void IDDefBLOBVA(const IBLOBVectorProperty *b, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2
const char * permStr(IPerm p)
Definition: indidevapi.c:676
int crackISState(const char *str, ISState *ip)
Extract switch state (On or Off) from the supplied string.
Definition: indidevapi.c:591
ISwitch * IUFindSwitch(const ISwitchVectorProperty *svp, const char *name)
Find an ISwitch member in a vector switch property.
Definition: indidevapi.c:76
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:471
Light vector property descriptor.
Definition: indiapi.h:417
Number vector property descriptor.
Definition: indiapi.h:319
Switch vector property descriptor.
Definition: indiapi.h:367
Text vector property descriptor.
Definition: indiapi.h:246