132# define INDI_UNUSED(x) (void)x
136#ifndef ATTRIBUTE_FORMAT_PRINTF
138# define ATTRIBUTE_FORMAT_PRINTF(A, B) __attribute__((format(printf, (A), (B))))
140# define ATTRIBUTE_FORMAT_PRINTF(A, B)
277extern void IDSnoopDevice(
const char *snooped_device,
const char *snooped_property);
300typedef void(
IE_CBF)(
int readfiledes,
void *userpointer);
305typedef void(
IE_TCF)(
void *userpointer);
310typedef void(
IE_WPF)(
void *userpointer);
452extern int IUSaveBLOB(
IBLOB *bp,
int size,
int blobsize,
char *blob,
char *format);
502extern int IUFindIndex(
const char *needle,
char **hay,
unsigned int n);
561 double step,
double value);
569extern void IUFillText(
IText *tp,
const char *name,
const char *label,
const char *initialText);
577extern void IUFillBLOB(
IBLOB *bp,
const char *name,
const char *label,
const char *format);
606 const char *label,
const char *group,
IPState s);
621 const char *label,
const char *group,
IPerm p,
double timeout,
IPState s);
636 const char *label,
const char *group,
IPerm p,
double timeout,
IPState s);
651 const char *label,
const char *group,
IPerm p,
double timeout,
IPState s);
733extern void ISNewText(
const char *dev,
const char *name,
char *texts[],
char *names[],
int n);
743extern void ISNewNumber(
const char *dev,
const char *name,
double *values,
char *names[],
int n);
753extern void ISNewSwitch(
const char *dev,
const char *name,
ISState *states,
char *names[],
int n);
767extern void ISNewBLOB(
const char *dev,
const char *name,
int sizes[],
int blobsizes[],
char *blobs[],
char *formats[],
768 char *names[],
int n);
787extern int crackDN(
XMLEle *root,
char **dev,
char **name,
char msg[]);
void IE_TCF(void *userpointer)
Signature of a timeout caller.
void IE_WPF(void *userpointer)
Signature of a work procedure function.
void IE_CBF(int readfiledes, void *userpointer)
Signature of a callback.
Constants and Data structure definitions for the interface to the reference INDI C API implementation...
struct _IBLOBVectorProperty IBLOBVectorProperty
IPerm
Permission hint, with respect to client.
struct _ISwitchVectorProperty ISwitchVectorProperty
ISRule
Switch vector rule hint.
struct _ITextVectorProperty ITextVectorProperty
struct _ILightVectorProperty ILightVectorProperty
struct _INumberVectorProperty INumberVectorProperty
void IDLog(const char *fmt,...)
int IUSnoopSwitch(XMLEle *root, ISwitchVectorProperty *svp)
Update a snooped switch vector property from the given XML root element.
void IUSaveConfigSwitch(FILE *fp, const ISwitchVectorProperty *svp)
Add a switch vector property value to the configuration file.
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.
int IUFindOnSwitchIndex(const ISwitchVectorProperty *sp)
Returns the index of first ON switch it finds in the vector switch property.
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.
int IULoadConfigSwitch(const ISwitchVectorProperty *svp)
Add a switch vector property value to the configuration file.
void IERmCallback(int callbackid)
Remove a callback function.
IText * IUFindText(const ITextVectorProperty *tvp, const char *name)
Find an IText member in a vector text property.
void IERmWorkProc(int workprocid)
Remove a work procedure.
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.
ISwitch * IUFindOnSwitch(const ISwitchVectorProperty *sp)
Returns the first ON switch it finds in the vector switch property.
const char * ruleStr(ISRule r)
ILight * IUFindLight(const ILightVectorProperty *lvp, const char *name)
Find an ILight member in a vector Light property.
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.
BLOBHandling
How drivers handle BLOBs incoming from snooping drivers.
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 IUResetSwitch(ISwitchVectorProperty *svp)
Reset all switches in a switch vector property to OFF.
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.
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.
INumber * IUFindNumber(const INumberVectorProperty *nvp, const char *name)
Find an INumber member in a number text property.
void IUSaveText(IText *tp, const char *newtext)
Function to reliably save new text in a IText.
int IUFindIndex(const char *needle, char **hay, unsigned int n)
Returns the index of the string in a string array.
int IUSnoopBLOB(XMLEle *root, IBLOBVectorProperty *bvp)
Update a snooped BLOB vector property from the given XML root element.
int crackDN(XMLEle *root, char **dev, char **name, char msg[])
Extract dev and name attributes from an XML element.
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.
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.
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.
void IUSaveConfigBLOB(FILE *fp, const IBLOBVectorProperty *bvp)
Add a BLOB vector property value to the configuration file.
void IERmTimer(int timerid)
Remove the timer with the given timerid, as returned from IEAddTimer() or IEAddPeriodicTimer().
int IUSnoopText(XMLEle *root, ITextVectorProperty *tvp)
Update a snooped text vector property from the given XML root element.
void IUSaveConfigNumber(FILE *fp, const INumberVectorProperty *nvp)
Add a number vector property value to the configuration file.
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...
int IUSnoopNumber(XMLEle *root, INumberVectorProperty *nvp)
Update a snooped number vector property from the given XML root element.
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.
const char * sstateStr(ISState s)
const char * permStr(IPerm p)
IBLOB * IUFindBLOB(const IBLOBVectorProperty *bvp, const char *name)
Find an IBLOB member in a vector BLOB property.
void xmlv1()
print the boilerplate comment introducing xml
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.
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.
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.
int crackIPerm(const char *str, IPerm *ip)
Extract property permission state (RW, RO, WO) from the supplied string.
void IUSaveConfigText(FILE *fp, const ITextVectorProperty *tvp)
Add a text vector property value to the configuration file.
int crackIPState(const char *str, IPState *ip)
Extract property state (Idle, OK, Busy, Alert) from the supplied string.
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.
const char * pstateStr(IPState s)
void ISSnoopDevice(XMLEle *root)
Function defined by Drivers that is called when another Driver it is snooping (by having previously c...
int IULoadConfigText(const ITextVectorProperty *tvp)
Load a text vector property value from the configuration file.
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.
int IEDeferLoop(int maxms, int *flagp)
wait in-line for a flag to set, presumably by another event function
int IERemainingTimer(int timerid)
Returns the timer's remaining value in milliseconds left until the timeout.
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.
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.
#define ATTRIBUTE_FORMAT_PRINTF(A, B)
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.
int crackISRule(const char *str, ISRule *ip)
Extract switch rule (OneOfMany, OnlyOne..etc) from the supplied string.
const char * IUFindOnSwitchName(ISState *states, char *names[], int n)
Returns the name of the first ON switch it finds in the supplied arguments.
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.
int IEDeferLoop0(int maxms, int *flagp)
int crackISState(const char *str, ISState *ip)
Extract switch state (On or Off) from the supplied string.
int IUFindOnStateIndex(ISState *states, int n)
Returns the index of first ON switch it finds in the ISState array.
void IDMessageVA(const char *dev, const char *fmt, va_list ap)
void IDSetNumberVA(const INumberVectorProperty *nvp, const char *fmt, va_list ap)
void IDDefSwitchVA(const ISwitchVectorProperty *svp, const char *fmt, va_list ap)
void IDDefNumberVA(const INumberVectorProperty *nvp, const char *fmt, va_list ap)
void IDSetLight(const ILightVectorProperty *lvp, const char *fmt,...)
void IDSetNumber(const INumberVectorProperty *nvp, const char *fmt,...)
void IDSetSwitch(const ISwitchVectorProperty *svp, const char *fmt,...)
void IDDelete(const char *dev, const char *name, const char *fmt,...)
void IDDefTextVA(const ITextVectorProperty *tvp, const char *fmt, va_list ap)
void IDSetBLOBVA(const IBLOBVectorProperty *bvp, const char *fmt, va_list ap)
void IDSetTextVA(const ITextVectorProperty *tvp, const char *fmt, va_list ap)
void IDDefLightVA(const ILightVectorProperty *lvp, const char *fmt, va_list ap)
void IDMessage(const char *dev, const char *fmt,...)
void IDDeleteVA(const char *dev, const char *name, const char *fmt, va_list ap)
void IDDefBLOBVA(const IBLOBVectorProperty *bvp, const char *fmt, va_list ap)
void IDDefNumber(const INumberVectorProperty *nvp, const char *fmt,...)
void IDSetSwitchVA(const ISwitchVectorProperty *svp, const char *fmt, va_list ap)
void IDSetBLOB(const IBLOBVectorProperty *bvp, const char *fmt,...)
void IDDefLight(const ILightVectorProperty *lvp, const char *fmt,...)
void IDDefBLOB(const IBLOBVectorProperty *bvp, const char *fmt,...)
void IDSetText(const ITextVectorProperty *tvp, const char *fmt,...)
void IDSetLightVA(const ILightVectorProperty *lvp, const char *fmt, va_list ap)
void IDDefSwitch(const ISwitchVectorProperty *svp, const char *fmt,...)
*brief user defined string literal for JSON values *sa std::size_t n
A little DOM-style library to handle parsing and processing an XML file.
One Blob (Binary Large Object) descriptor.