Instrument Neutral Distributed Interface INDI 2.2.5
indidriver.h
Go to the documentation of this file.
1
24#pragma once
25
26#include "indiapi.h"
27#include "lilxml.h"
28#include "indicom.h"
29
30#include <stdio.h>
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36extern int verbose; /* chatty */
37extern char *me; /* a.out name */
38//extern LilXML *clixml; /* XML parser context */
39
40extern int dispatch(XMLEle *root, char msg[]);
41//extern void clientMsgCB(int fd, void *arg);
42
69/* @{ */
70
79extern FILE *IUGetConfigFP(const char *filename, const char *dev, const char *mode, char errmsg[]);
80
88extern int IUPurgeConfig(const char *filename, const char *dev, char errmsg[]);
89
104extern int IUReadConfig(const char *filename, const char *dev, const char *property, int silent, char errmsg[]);
105
118extern int IUSaveDefaultConfig(const char *source_config, const char *dest_config, const char *dev);
119
127extern void IUSaveConfigTag(FILE *fp, int ctag, const char *dev, int silent);
128
136extern int IUGetConfigNumber(const char *dev, const char *property, const char *member, double *value);
137
145extern int IUGetConfigSwitch(const char *dev, const char *property, const char *member, ISState *value);
146
153extern int IUGetConfigOnSwitchIndex(const char *dev, const char *property, int *index);
154
162extern int IUGetConfigOnSwitchName(const char *dev, const char *property, char *name, size_t size);
163
170extern int IUGetConfigOnSwitch(const ISwitchVectorProperty *property, int *index);
171
180extern int IUGetConfigText(const char *dev, const char *property, const char *member, char *value, int len);
181
189extern int IUUpdateSwitch(ISwitchVectorProperty *svp, ISState *states, char *names[], int n);
190
198extern int IUUpdateNumber(INumberVectorProperty *nvp, double values[], char *names[], int n);
199
207extern int IUUpdateText(ITextVectorProperty *tvp, char *texts[], char *names[], int n);
208
219extern int IUUpdateBLOB(IBLOBVectorProperty *bvp, int sizes[], int blobsizes[], char *blobs[], char *formats[],
220 char *names[], int n);
221
229extern void IUUpdateMinMax(const INumberVectorProperty *nvp);
230
231/* @} */
232
233#ifdef __cplusplus
234}
235#endif
Constants and Data structure definitions for the interface to the reference INDI C API implementation...
ISState
Switch state.
Definition indiapi.h:148
Implementations for common driver routines.
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.
int IUUpdateSwitch(ISwitchVectorProperty *svp, ISState *states, char *names[], int n)
Update all switches in a switch vector property.
int verbose
Definition indidriver.c:49
FILE * IUGetConfigFP(const char *filename, const char *dev, const char *mode, char errmsg[])
Open a configuration file for writing and return a configuration file FILE pointer.
int IUUpdateText(ITextVectorProperty *tvp, char *texts[], char *names[], int n)
Update all text members in a text vector property.
void IUSaveConfigTag(FILE *fp, int ctag, const char *dev, int silent)
Add opening or closing tag to a configuration file. A configuration file root XML element is <INDIDri...
int IUGetConfigOnSwitch(const ISwitchVectorProperty *property, int *index)
IUGetConfigOnSwitch Opens configuration file and reads a single switch vector property to find the in...
Definition indidriver.c:592
int IUGetConfigOnSwitchName(const char *dev, const char *property, char *name, size_t size)
IUGetConfigOnSwitchLabel Opens configuration file and returns the name of the ON switch property,...
Definition indidriver.c:783
int IUGetConfigText(const char *dev, const char *property, const char *member, char *value, int len)
IUGetConfigText Opens configuration file and reads single text property.
Definition indidriver.c:908
int IUGetConfigNumber(const char *dev, const char *property, const char *member, double *value)
IUGetConfigNumber Opens configuration file and reads single number property.
Definition indidriver.c:846
int IUReadConfig(const char *filename, const char *dev, const char *property, int silent, char errmsg[])
Loads and processes a configuration file. Once a configuration file is successful loaded,...
Definition indidriver.c:485
int IUUpdateNumber(INumberVectorProperty *nvp, double values[], char *names[], int n)
Update all numbers in a number vector property.
int IUPurgeConfig(const char *filename, const char *dev, char errmsg[])
Definition indidriver.c:991
int IUSaveDefaultConfig(const char *source_config, const char *dest_config, const char *dev)
Copies an existing configuration file into a default configuration file. If no default configuration ...
Definition indidriver.c:542
int IUGetConfigOnSwitchIndex(const char *dev, const char *property, int *index)
IUGetConfigOnSwitchIndex Opens configuration file and reads single switch property to find ON switch ...
Definition indidriver.c:719
void IUUpdateMinMax(const INumberVectorProperty *nvp)
Function to update the min and max elements of a number in the client.
int dispatch(XMLEle *root, char msg[])
Definition indidriver.c:180
int IUGetConfigSwitch(const char *dev, const char *property, const char *member, ISState *value)
IUGetConfigSwitch Opens configuration file and reads single switch property.
Definition indidriver.c:657
char * me
Definition indidriver.c:50
A little DOM-style library to handle parsing and processing an XML file.
BLOB (Binary Large Object) vector property descriptor.
Definition indiapi.h:469
Number vector property descriptor.
Definition indiapi.h:317
Switch vector property descriptor.
Definition indiapi.h:365
Text vector property descriptor.
Definition indiapi.h:244