Instrument Neutral Distributed Interface INDI  1.9.2
indidevapi.h
Go to the documentation of this file.
1 #if 0
2 INDI
3 Copyright (C) 2003 - 2006 Elwood C. Downey
4 
5 Modified by Jasem Mutlaq (2003 - 2015)
6 
7 This library is free software;
8 you can redistribute it and / or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation;
11 either
12 version 2.1 of the License, or (at your option) any later version.
13 
14 This library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY;
16 without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
19 
20 You should have received a copy of the GNU Lesser General Public
21 License along with this library;
22 if not, write to the Free Software
23 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110 - 1301 USA
24 
25 #endif
26 
27 #pragma once
28 
98 /*******************************************************************************
99  * get the data structures
100  */
101 
102 #include "indiapi.h"
103 #include "lilxml.h"
104 
105 /*******************************************************************************
106  *******************************************************************************
107  *
108  * Functions the INDI device driver framework defines which the Driver may call
109  *
110  *******************************************************************************
111  *******************************************************************************
112  */
113 
114 #ifdef __cplusplus
115 extern "C" {
116 #endif
117 
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 
150 extern void IDDefText(const ITextVectorProperty *t, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
151 extern void IDDefTextVA(const ITextVectorProperty *t, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
152 
157 extern void IDDefNumber(const INumberVectorProperty *n, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
158 extern void IDDefNumberVA(const INumberVectorProperty *n, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
159 
164 extern void IDDefSwitch(const ISwitchVectorProperty *s, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
165 extern void IDDefSwitchVA(const ISwitchVectorProperty *s, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
166 
171 extern void IDDefLight(const ILightVectorProperty *l, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
172 extern void IDDefLightVA(const ILightVectorProperty *l, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
173 
178 extern void IDDefBLOB(const IBLOBVectorProperty *b, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
179 extern void IDDefBLOBVA(const IBLOBVectorProperty *b, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
180 
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 
229 
237 extern void IDMessage(const char *dev, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
238 extern void IDMessageVA(const char *dev, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2, 0);
239 
246 extern void IDDelete(const char *dev, const char *name, const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(3, 4);
247 extern void IDDeleteVA(const char *dev, const char *name, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(3, 0);
248 
255 extern void IDLog(const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF(1, 2);
256 extern void IDLogVA(const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(1, 0);
257 
265 
268 typedef enum
269 {
270  B_NEVER = 0,
273 } BLOBHandling;
274 
279 extern void IDSnoopDevice(const char *snooped_device, const char *snooped_property);
280 
286 extern void IDSnoopBLOBs(const char *snooped_device, const char *snooped_property, BLOBHandling bh);
287 
296 
297 /* signature of a callback, timout caller and work procedure function */
298 
301 typedef void(IE_CBF)(int readfiledes, void *userpointer);
302 
305 typedef void(IE_TCF)(void *userpointer);
306 
309 typedef void(IE_WPF)(void *userpointer);
310 
311 /* functions to add and remove callbacks, timers and work procedures */
312 
320 extern int IEAddCallback(int readfiledes, IE_CBF *fp, void *userpointer);
321 
326 extern void IERmCallback(int callbackid);
327 
335 extern int IEAddTimer(int millisecs, IE_TCF *fp, void *userpointer);
336 
344 extern int IEAddPeriodicTimer(int millisecs, IE_TCF *fp, void *userpointer);
345 
351 extern int IERemainingTimer(int timerid);
352 
358 extern int IENSecRemainingTimer(int tid);
359 
364 extern void IERmTimer(int timerid);
365 
372 extern int IEAddWorkProc(IE_WPF *fp, void *userpointer);
373 
378 extern void IERmWorkProc(int workprocid);
379 
380 /* wait in-line for a flag to set, presumably by another event function */
381 
382 extern int IEDeferLoop(int maxms, int *flagp);
383 extern int IEDeferLoop0(int maxms, int *flagp);
384 
398 
405 extern IText *IUFindText(const ITextVectorProperty *tvp, const char *name);
406 
413 extern INumber *IUFindNumber(const INumberVectorProperty *nvp, const char *name);
414 
421 extern ISwitch *IUFindSwitch(const ISwitchVectorProperty *svp, const char *name);
422 
429 extern ILight *IUFindLight(const ILightVectorProperty *lvp, const char *name);
430 
437 extern IBLOB *IUFindBLOB(const IBLOBVectorProperty *bvp, const char *name);
438 
446 extern ISwitch *IUFindOnSwitch(const ISwitchVectorProperty *sp);
447 
455 extern int IUFindIndex(const char *needle, char **hay, unsigned int n);
456 
465 extern int IUFindOnSwitchIndex(const ISwitchVectorProperty *sp);
466 
477 extern const char *IUFindOnSwitchName(ISState *states, char *names[], int n);
478 
483 extern void IUResetSwitch(ISwitchVectorProperty *svp);
484 
493 extern int IUUpdateSwitch(ISwitchVectorProperty *svp, ISState *states, char *names[], int n);
494 
503 extern int IUUpdateNumber(INumberVectorProperty *nvp, double values[], char *names[], int n);
504 
513 extern int IUUpdateText(ITextVectorProperty *tvp, char *texts[], char *names[], int n);
514 
526 extern int IUUpdateBLOB(IBLOBVectorProperty *bvp, int sizes[], int blobsizes[], char *blobs[], char *formats[],
527  char *names[], int n);
528 
537 extern int IUSaveBLOB(IBLOB *bp, int size, int blobsize, char *blob, char *format);
538 
546 extern void IUUpdateMinMax(const INumberVectorProperty *nvp);
547 
552 extern void IUSaveText(IText *tp, const char *newtext);
553 
560 extern void IUFillSwitch(ISwitch *sp, const char *name, const char *label, ISState s);
561 
568 extern void IUFillLight(ILight *lp, const char *name, const char *label, IPState s);
569 
580 extern void IUFillNumber(INumber *np, const char *name, const char *label, const char *format, double min, double max,
581  double step, double value);
582 
589 extern void IUFillText(IText *tp, const char *name, const char *label, const char *initialText);
590 
597 extern void IUFillBLOB(IBLOB *bp, const char *name, const char *label, const char *format);
598 
612 extern void IUFillSwitchVector(ISwitchVectorProperty *svp, ISwitch *sp, int nsp, const char *dev, const char *name,
613  const char *label, const char *group, IPerm p, ISRule r, double timeout, IPState s);
614 
625 extern void IUFillLightVector(ILightVectorProperty *lvp, ILight *lp, int nlp, const char *dev, const char *name,
626  const char *label, const char *group, IPState s);
627 
640 extern void IUFillNumberVector(INumberVectorProperty *nvp, INumber *np, int nnp, const char *dev, const char *name,
641  const char *label, const char *group, IPerm p, double timeout, IPState s);
642 
655 extern void IUFillTextVector(ITextVectorProperty *tvp, IText *tp, int ntp, const char *dev, const char *name,
656  const char *label, const char *group, IPerm p, double timeout, IPState s);
657 
670 extern void IUFillBLOBVector(IBLOBVectorProperty *bvp, IBLOB *bp, int nbp, const char *dev, const char *name,
671  const char *label, const char *group, IPerm p, double timeout, IPState s);
672 
678 extern int IUSnoopNumber(XMLEle *root, INumberVectorProperty *nvp);
679 
685 extern int IUSnoopText(XMLEle *root, ITextVectorProperty *tvp);
686 
692 extern int IUSnoopLight(XMLEle *root, ILightVectorProperty *lvp);
693 
699 extern int IUSnoopSwitch(XMLEle *root, ISwitchVectorProperty *svp);
700 
706 extern int IUSnoopBLOB(XMLEle *root, IBLOBVectorProperty *bvp);
707 
710 /*******************************************************************************
711  *******************************************************************************
712  *
713  * Functions the INDI Device Driver framework calls which the Driver must
714  * define.
715  *
716  *******************************************************************************
717  *******************************************************************************
718  */
719 
728 
742 extern void ISGetProperties(const char *dev);
743 
752 extern void ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n);
753 
762 extern void ISNewNumber(const char *dev, const char *name, double *values, char *names[], int n);
763 
772 extern void ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n);
773 
787 extern void ISNewBLOB(const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[],
788  char *names[], int n);
789 
794 extern void ISSnoopDevice(XMLEle *root);
795 
798 /* Handy readability macro to avoid unused variables warnings */
799 #define INDI_UNUSED(x) (void)x
800 
810 extern int crackDN(XMLEle *root, char **dev, char **name, char msg[]);
811 
817 extern int crackIPState(const char *str, IPState *ip);
818 
824 extern int crackISState(const char *str, ISState *ip);
825 
831 extern int crackIPerm(const char *str, IPerm *ip);
832 
838 extern int crackISRule(const char *str, ISRule *ip);
839 
841 extern const char *pstateStr(IPState s);
843 extern const char *sstateStr(ISState s);
845 extern const char *ruleStr(ISRule r);
847 extern const char *permStr(IPerm p);
848 
849 extern void xmlv1();
850 
851 #ifdef __cplusplus
852 }
853 #endif
crackIPState
int crackIPState(const char *str, IPState *ip)
Extract property state (Idle, OK, Busy, Alert) from the supplied string.
Definition: indicom.c:1211
IUSnoopBLOB
int IUSnoopBLOB(XMLEle *root, IBLOBVectorProperty *bvp)
Update a snooped BLOB vector property from the given XML root element.
Definition: indidriver.c:696
IUFindOnSwitchName
const char * IUFindOnSwitchName(ISState *states, char *names[], int n)
Returns the name of the first ON switch it finds in the supplied arguments.
Definition: indicom.c:1412
IDDefLight
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.
xmlv1
void xmlv1()
Definition: indicom.c:1308
IUUpdateMinMax
void IUUpdateMinMax(const INumberVectorProperty *nvp)
Function to update the min and max elements of a number in the client.
Definition: indidriver.c:1849
ruleStr
const char * ruleStr(ISRule r)
Definition: indicom.c:1280
IEDeferLoop
int IEDeferLoop(int maxms, int *flagp)
Definition: eventloop.c:560
IPState
IPState
Property state.
Definition: indiapi.h:158
Aux::ANY
@ ANY
Definition: celestronauxpacket.h:86
crackISState
int crackISState(const char *str, ISState *ip)
Extract switch state (On or Off) from the supplied string.
Definition: indicom.c:1229
min
double min(void)
_ILightVectorProperty
Light vector property descriptor.
Definition: indiapi.h:415
ISwitch
One switch descriptor.
IDSetBLOBVA
void void void void void void void void void void IDSetBLOBVA(const IBLOBVectorProperty *b, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2
IEAddWorkProc
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:550
IDSetText
void IDSetText(const ITextVectorProperty *t, const char *msg,...) ATTRIBUTE_FORMAT_PRINTF(2
Tell client to update an existing text vector property.
indiapi.h
Constants and Data structure definitions for the interface to the reference INDI C API implementation...
IUSnoopLight
int IUSnoopLight(XMLEle *root, ILightVectorProperty *lvp)
Update a snooped light vector property from the given XML root element.
Definition: indidriver.c:612
IDSnoopDevice
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:137
INumber
One number descriptor.
IUFillNumber
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: indidriver.c:348
B_ONLY
@ B_ONLY
Definition: indidevapi.h:272
_IBLOBVectorProperty
BLOB (Binary Large Object) vector property descriptor.
Definition: indiapi.h:469
permStr
const char * permStr(IPerm p)
Definition: indicom.c:1294
IDDefText
void IDDefText(const ITextVectorProperty *t, const char *msg,...) ATTRIBUTE_FORMAT_PRINTF(2
Tell client to create a text vector property.
IUFillTextVector
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: indidriver.c:477
IUFindBLOB
IBLOB * IUFindBLOB(const IBLOBVectorProperty *bvp, const char *name)
Find an IBLOB member in a vector BLOB property.
Definition: indicom.c:1381
IUFindLight
ILight * IUFindLight(const ILightVectorProperty *lvp, const char *name)
Find an ILight member in a vector Light property.
Definition: indicom.c:1371
ISSnoopDevice
void ISSnoopDevice(XMLEle *root)
Function defined by Drivers that is called when another Driver it is snooping (by having previously c...
Definition: defaultdevice.cpp:94
IEAddTimer
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:525
IDSetBLOB
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.
IUFillLight
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: indidriver.c:334
IUFillText
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: indidriver.c:369
sstateStr
const char * sstateStr(ISState s)
Definition: indicom.c:1267
IDDefTextVA
void void IDDefTextVA(const ITextVectorProperty *t, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2
IUUpdateText
int IUUpdateText(ITextVectorProperty *tvp, char *texts[], char *names[], int n)
Update all text members in a text vector property.
Definition: indidriver.c:259
IE_WPF
void() IE_WPF(void *userpointer)
Signature of a work procedure function.
Definition: indidevapi.h:309
max
double max(void)
IUSnoopText
int IUSnoopText(XMLEle *root, ITextVectorProperty *tvp)
Update a snooped text vector property from the given XML root element.
Definition: indidriver.c:576
IUResetSwitch
void IUResetSwitch(ISwitchVectorProperty *svp)
Reset all switches in a switch vector property to OFF.
Definition: indicom.c:1421
IDLog
void void void void void IDLog(const char *msg,...) ATTRIBUTE_FORMAT_PRINTF(1
Function Drivers call to log a message locally.
IERemainingTimer
int IERemainingTimer(int timerid)
Returns the timer's remaining value in milliseconds left until the timeout.
Definition: eventloop.c:535
IUFindOnSwitch
ISwitch * IUFindOnSwitch(const ISwitchVectorProperty *sp)
Returns the first ON switch it finds in the vector switch property.
Definition: indicom.c:1393
_ITextVectorProperty
Text vector property descriptor.
Definition: indiapi.h:244
ISNewNumber
void ISNewNumber(const char *dev, const char *name, double *values, char *names[], int n)
Update the value of an existing number vector property.
IUFindText
IText * IUFindText(const ITextVectorProperty *tvp, const char *name)
Find an IText member in a vector text property.
Definition: indicom.c:1341
IERmTimer
void IERmTimer(int timerid)
Remove the timer with the given timerid, as returned from IEAddTimer() or IEAddPeriodicTimer().
Definition: eventloop.c:545
IEDeferLoop0
int IEDeferLoop0(int maxms, int *flagp)
Definition: eventloop.c:565
ILight
One light descriptor.
crackISRule
int crackISRule(const char *str, ISRule *ip)
Extract switch rule (OneOfMany, OnlyOne..etc) from the supplied string.
Definition: indicom.c:1253
ISGetProperties
void ISGetProperties(const char *dev)
Get Device Properties.
Definition: defaultdevice.cpp:53
_INumberVectorProperty
Number vector property descriptor.
Definition: indiapi.h:317
IText
One text descriptor.
IENSecRemainingTimer
int IENSecRemainingTimer(int tid)
pstateStr
const char * pstateStr(IPState s)
Definition: indicom.c:1194
IDSetLight
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.
IDLogVA
void void void void void void IDLogVA(const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(1
B_ALSO
@ B_ALSO
Definition: indidevapi.h:271
IUFillSwitchVector
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: indidriver.c:412
IUFillNumberVector
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: indidriver.c:455
IEAddPeriodicTimer
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:530
IE_CBF
void() IE_CBF(int readfiledes, void *userpointer)
Signature of a callback.
Definition: indidevapi.h:301
B_NEVER
@ B_NEVER
Definition: indidevapi.h:270
xml_ele_
Definition: lilxml.c:105
BLOBHandling
BLOBHandling
How drivers handle BLOBs incoming from snooping drivers.
Definition: indidevapi.h:268
IDMessage
void IDMessage(const char *dev, const char *msg,...) ATTRIBUTE_FORMAT_PRINTF(2
Function Drivers call to send log messages to Clients.
IDDeleteVA
void void void void IDDeleteVA(const char *dev, const char *name, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(3
IDDefSwitchVA
void void void void void void IDDefSwitchVA(const ISwitchVectorProperty *s, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2
IUUpdateSwitch
int IUUpdateSwitch(ISwitchVectorProperty *svp, ISState *states, char *names[], int n)
Update all switches in a switch vector property.
Definition: indidriver.c:171
IDSnoopBLOBs
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:157
IPerm
IPerm
Permission hint, with respect to client.
Definition: indiapi.h:181
ISNewSwitch
void ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n)
Update the value of an existing switch vector property.
Definition: defaultdevice.cpp:60
IUFindNumber
INumber * IUFindNumber(const INumberVectorProperty *nvp, const char *name)
Find an INumber member in a number text property.
Definition: indicom.c:1351
IUFillBLOB
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: indidriver.c:390
lilxml.h
A little DOM-style library to handle parsing and processing an XML file.
IUSaveBLOB
int IUSaveBLOB(IBLOB *bp, int size, int blobsize, char *blob, char *format)
Function to save blob metadata in the corresponding blob.
Definition: indidriver.c:311
crackIPerm
int crackIPerm(const char *str, IPerm *ip)
Extract property permission state (RW, RO, WO) from the supplied string.
Definition: indicom.c:1240
IEAddCallback
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:515
IDDefNumber
void void void IDDefNumber(const INumberVectorProperty *n, const char *msg,...) ATTRIBUTE_FORMAT_PRINTF(2
Tell client to create a number number property.
IDDefBLOBVA
void void void void void void void void void void IDDefBLOBVA(const IBLOBVectorProperty *b, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2
IDSetLightVA
void void void void void void void void IDSetLightVA(const ILightVectorProperty *l, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2
ISNewText
void ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n)
Update the value of an existing text vector property.
Definition: defaultdevice.cpp:76
IUSaveText
void IUSaveText(IText *tp, const char *newtext)
Function to reliably save new text in a IText.
Definition: indicom.c:1428
IDDefSwitch
void void void void void IDDefSwitch(const ISwitchVectorProperty *s, const char *msg,...) ATTRIBUTE_FORMAT_PRINTF(2
Tell client to create a switch vector property.
IDDelete
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...
INDI
Namespace to encapsulate INDI client, drivers, and mediator classes.
Definition: AlignmentSubsystemForClients.cpp:11
IDSetNumberVA
void void void void IDSetNumberVA(const INumberVectorProperty *n, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2
IUUpdateNumber
int IUUpdateNumber(INumberVectorProperty *nvp, double values[], char *names[], int n)
Update all numbers in a number vector property.
Definition: indidriver.c:225
IUFindIndex
int IUFindIndex(const char *needle, char **hay, unsigned int n)
Returns the index of the string in a string array.
Definition: indidriver.c:1860
ATTRIBUTE_FORMAT_PRINTF
#define ATTRIBUTE_FORMAT_PRINTF(A, B)
Definition: indidevapi.h:140
IUUpdateBLOB
int IUUpdateBLOB(IBLOBVectorProperty *bvp, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n)
Update all BLOB members in a BLOB vector property.
Definition: indidriver.c:285
IDSetTextVA
void void IDSetTextVA(const ITextVectorProperty *t, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2
IERmCallback
void IERmCallback(int callbackid)
Remove a callback function.
Definition: eventloop.c:520
ISState
ISState
Switch state.
Definition: indiapi.h:148
IERmWorkProc
void IERmWorkProc(int workprocid)
Remove a work procedure.
Definition: eventloop.c:555
IDDefNumberVA
void void void void IDDefNumberVA(const INumberVectorProperty *n, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2
IUFindSwitch
ISwitch * IUFindSwitch(const ISwitchVectorProperty *svp, const char *name)
Find an ISwitch member in a vector switch property.
Definition: indicom.c:1361
IUFindOnSwitchIndex
int IUFindOnSwitchIndex(const ISwitchVectorProperty *sp)
Returns the index of first ON switch it finds in the vector switch property.
Definition: indicom.c:1403
ISNewBLOB
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.
Definition: defaultdevice.cpp:84
ISRule
ISRule
Switch vector rule hint.
Definition: indiapi.h:170
IDDefLightVA
void void void void void void void void IDDefLightVA(const ILightVectorProperty *l, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2
IUFillBLOBVector
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: indidriver.c:499
IDSetSwitchVA
void void void void void void IDSetSwitchVA(const ISwitchVectorProperty *s, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2
IDMessageVA
void void IDMessageVA(const char *dev, const char *msg, va_list arg) ATTRIBUTE_FORMAT_PRINTF(2
IE_TCF
void() IE_TCF(void *userpointer)
Signature of a timeout caller.
Definition: indidevapi.h:305
IUFillLightVector
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: indidriver.c:435
IDDefBLOB
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.
IDSetNumber
void void void IDSetNumber(const INumberVectorProperty *n, const char *msg,...) ATTRIBUTE_FORMAT_PRINTF(2
Tell client to update an existing number vector property.
IDSetSwitch
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.
IUSnoopSwitch
int IUSnoopSwitch(XMLEle *root, ISwitchVectorProperty *svp)
Update a snooped switch vector property from the given XML root element.
Definition: indidriver.c:654
IBLOB
One Blob (Binary Large Object) descriptor.
crackDN
int crackDN(XMLEle *root, char **dev, char **name, char msg[])
Extract dev and name attributes from an XML element.
Definition: indicom.c:1317
IUFillSwitch
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: indidriver.c:320
_ISwitchVectorProperty
Switch vector property descriptor.
Definition: indiapi.h:365
IUSnoopNumber
int IUSnoopNumber(XMLEle *root, INumberVectorProperty *nvp)
Update a snooped number vector property from the given XML root element.
Definition: indidriver.c:531