Instrument Neutral Distributed Interface INDI  1.9.5
indidriver.h
Go to the documentation of this file.
1 #if 0
2 INDI Driver Functions
3 
4 Copyright (C) 2003 - 2015 Jasem Mutlaq
5 Copyright (C) 2003 - 2006 Elwood C. Downey
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 
29 #include "indiapi.h"
30 #include "lilxml.h"
31 
32 #include <stdio.h>
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 extern int verbose; /* chatty */
39 extern char *me; /* a.out name */
40 //extern LilXML *clixml; /* XML parser context */
41 
42 extern int dispatch(XMLEle *root, char msg[]);
43 //extern void clientMsgCB(int fd, void *arg);
44 
72 
81 extern FILE *IUGetConfigFP(const char *filename, const char *dev, const char *mode, char errmsg[]);
82 
90 extern int IUPurgeConfig(const char *filename, const char *dev, char errmsg[]);
91 
108 extern int IUReadConfig(const char *filename, const char *dev, const char *property, int silent, char errmsg[]);
109 
123 extern int IUSaveDefaultConfig(const char *source_config, const char *dest_config, const char *dev);
124 
133 extern void IUSaveConfigTag(FILE *fp, int ctag, const char *dev, int silent);
134 
139 extern void IUSaveConfigNumber(FILE *fp, const INumberVectorProperty *nvp);
140 
145 extern void IUSaveConfigText(FILE *fp, const ITextVectorProperty *tvp);
146 
151 extern void IUSaveConfigSwitch(FILE *fp, const ISwitchVectorProperty *svp);
152 
158 extern void IUSaveConfigBLOB(FILE *fp, const IBLOBVectorProperty *bvp);
159 
168 extern int IUGetConfigNumber(const char *dev, const char *property, const char *member, double *value);
169 
178 extern int IUGetConfigSwitch(const char *dev, const char *property, const char *member, ISState *value);
179 
180 
188 extern int IUGetConfigOnSwitchIndex(const char *dev, const char *property, int *index);
189 
190 
199 extern int IUGetConfigOnSwitchLabel(const char *dev, const char *property, char *label, size_t size);
200 
208 extern int IUGetConfigOnSwitch(const ISwitchVectorProperty *property, int *index);
209 
219 extern int IUGetConfigText(const char *dev, const char *property, const char *member, char *value, int len);
220 
223 #ifdef __cplusplus
224 }
225 #endif
IUGetConfigOnSwitch
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:1151
Aux::ANY
@ ANY
Definition: celestronauxpacket.h:86
indiapi.h
Constants and Data structure definitions for the interface to the reference INDI C API implementation...
IUSaveDefaultConfig
int IUSaveDefaultConfig(const char *source_config, const char *dest_config, const char *dev)
Copies an existing configuration file into a default configuration file.
Definition: indidriver.c:1101
_IBLOBVectorProperty
BLOB (Binary Large Object) vector property descriptor.
Definition: indiapi.h:469
IUGetConfigText
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:1448
verbose
int verbose
Definition: indidriver.c:49
IUGetConfigFP
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.
Definition: indidriver.c:1556
IUGetConfigSwitch
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:1212
IUSaveConfigNumber
void IUSaveConfigNumber(FILE *fp, const INumberVectorProperty *nvp)
Add a number vector property value to the configuration file.
Definition: indicom.c:1455
IUReadConfig
int IUReadConfig(const char *filename, const char *dev, const char *property, int silent, char errmsg[])
Loads and processes a configuration file.
Definition: indidriver.c:1044
_ITextVectorProperty
Text vector property descriptor.
Definition: indiapi.h:244
IUSaveConfigBLOB
void IUSaveConfigBLOB(FILE *fp, const IBLOBVectorProperty *bvp)
Add a BLOB vector property value to the configuration file.
Definition: indicom.c:1470
_INumberVectorProperty
Number vector property descriptor.
Definition: indiapi.h:317
IUSaveConfigText
void IUSaveConfigText(FILE *fp, const ITextVectorProperty *tvp)
Add a text vector property value to the configuration file.
Definition: indicom.c:1460
dispatch
int dispatch(XMLEle *root, char msg[])
Definition: indidriver.c:747
xml_ele_
Definition: lilxml.c:105
lilxml.h
A little DOM-style library to handle parsing and processing an XML file.
IUSaveConfigTag
void IUSaveConfigTag(FILE *fp, int ctag, const char *dev, int silent)
Add opening or closing tag to a configuration file.
Definition: indidriver.c:1605
INDI
Namespace to encapsulate INDI client, drivers, and mediator classes.
Definition: AlignmentSubsystemForClients.cpp:11
me
char * me
Definition: indidriver.c:50
ISState
ISState
Switch state.
Definition: indiapi.h:148
IUGetConfigNumber
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:1390
IUPurgeConfig
int IUPurgeConfig(const char *filename, const char *dev, char errmsg[])
Definition: indidriver.c:1530
IUSaveConfigSwitch
void IUSaveConfigSwitch(FILE *fp, const ISwitchVectorProperty *svp)
Add a switch vector property value to the configuration file.
Definition: indicom.c:1465
IUGetConfigOnSwitchLabel
int IUGetConfigOnSwitchLabel(const char *dev, const char *property, char *label, size_t size)
IUGetConfigOnSwitchLabel Opens configuration file and reads single switch property to find ON switch ...
Definition: indidriver.c:1330
IUGetConfigOnSwitchIndex
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:1270
_ISwitchVectorProperty
Switch vector property descriptor.
Definition: indiapi.h:365