• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kstars

indiapi.h

Go to the documentation of this file.
00001 #if 0
00002     INDI
00003     Copyright (C) 2003 Elwood C. Downey
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Lesser General Public
00007     License as published by the Free Software Foundation; either
00008     version 2.1 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Lesser General Public License for more details.
00014 
00015     You should have received a copy of the GNU Lesser General Public
00016     License along with this library; if not, write to the Free Software
00017     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00018 
00019 #endif
00020 
00021 #ifndef INDI_API_H
00022 #define INDI_API_H
00023 
00058 /*******************************************************************************
00059  * INDI wire protocol version implemented by this API.
00060  * N.B. this is indepedent of the API itself.
00061  */
00062 
00063 #define INDIV   1.5
00064 
00065 /*******************************************************************************
00066  * Manifest constants
00067  */
00068 
00072 typedef enum {
00073     ISS_OFF, ISS_ON
00074 } ISState;              /* switch state */
00075 
00079 typedef enum {
00080     IPS_IDLE, IPS_OK, IPS_BUSY, IPS_ALERT
00081 } IPState;              /* property state */
00082 
00086 typedef enum {
00087     ISR_1OFMANY, ISR_ATMOST1, ISR_NOFMANY
00088 } ISRule;               /* switch vector rule hint */
00089 
00093 typedef enum {
00094     IP_RO, IP_WO, IP_RW
00095 } IPerm;                /* permission hint, WRT client */
00096 
00097 /* The XML strings for these attributes may be any length but implementations
00098  * are only obligued to support these lengths for the various string attributes.
00099  */
00100 #define MAXINDINAME 32
00101 #define MAXINDILABEL    32
00102 #define MAXINDIDEVICE   32
00103 #define MAXINDIGROUP    32
00104 #define MAXINDIFORMAT   32
00105 #define MAXINDIBLOBFMT  32
00106 #define MAXINDITSTAMP   32
00107 
00108 /*******************************************************************************
00109  * Typedefs for each INDI Property type.
00110  *
00111  * INumber.format may be any printf-style appropriate for double
00112  * or style "m" to create sexigesimal using the form "%<w>.<f>m" where
00113  *   <w> is the total field width.
00114  *   <f> is the width of the fraction. valid values are:
00115  *      9  ->  :mm:ss.ss
00116  *      8  ->  :mm:ss.s
00117  *      6  ->  :mm:ss
00118  *      5  ->  :mm.m
00119  *      3  ->  :mm
00120  *
00121  * examples:
00122  *
00123  *   to produce     use
00124  *
00125  *    "-123:45"    %7.3m
00126  *  "  0:01:02"    %9.6m
00127  */
00128 
00132 typedef struct {        
00134     char name[MAXINDINAME]; 
00136     char label[MAXINDILABEL];       
00138     char *text;             
00140     struct _ITextVectorProperty *tvp;   
00142     void *aux0;             
00144     void *aux1;             
00145 } IText;
00146 
00150 typedef struct _ITextVectorProperty {
00152     char device[MAXINDIDEVICE];     
00154     char name[MAXINDINAME];     
00156     char label[MAXINDILABEL];       
00158     char group[MAXINDIGROUP];       
00160     IPerm p;                
00162     double timeout;         
00164     IPState s;              
00166     IText *tp;              
00168     int ntp;
00170     char timestamp[MAXINDITSTAMP];  
00172     void *aux;              
00173 } ITextVectorProperty;
00174 
00178 typedef struct {
00179     char name[MAXINDINAME];     
00180     char label[MAXINDILABEL];       
00181     char format[MAXINDIFORMAT];     
00182     double min, max;            
00183     double step;            
00184     double value;           
00185     struct _INumberVectorProperty *nvp; 
00186     void *aux0, *aux1;          
00187 } INumber;
00188 
00206 typedef struct _INumberVectorProperty {
00208     char device[MAXINDIDEVICE];     
00210     char name[MAXINDINAME];     
00212     char label[MAXINDILABEL];       
00214     char group[MAXINDIGROUP];       
00216     IPerm p;                
00218     double timeout;         
00220     IPState s;              
00222     INumber *np;            
00224     int nnp;
00226     char timestamp[MAXINDITSTAMP];          
00228     void *aux;              
00229 } INumberVectorProperty;
00230 
00234 typedef struct {            
00235     char name[MAXINDINAME];     
00236     char label[MAXINDILABEL];       
00237     ISState s;              
00238     struct _ISwitchVectorProperty *svp; 
00239     void *aux;              
00240 } ISwitch;
00241 
00245 typedef struct _ISwitchVectorProperty {
00247     char device[MAXINDIDEVICE];     
00249     char name[MAXINDINAME];     
00251     char label[MAXINDILABEL];       
00253     char group[MAXINDIGROUP];       
00255     IPerm p;                
00257     ISRule r;               
00259     double timeout;         
00261     IPState s;              
00263     ISwitch *sp;            
00265     int nsp;
00267     char timestamp[MAXINDITSTAMP];
00269     void *aux;              
00270 } ISwitchVectorProperty;
00271 
00275 typedef struct {            
00276     char name[MAXINDINAME];     
00277     char label[MAXINDILABEL];       
00278     IPState s;              
00279     struct _ILightVectorProperty *lvp;  
00280     void *aux;              
00281 } ILight;
00282 
00286 typedef struct _ILightVectorProperty {  
00288     char device[MAXINDIDEVICE];     
00290     char name[MAXINDINAME];     
00292     char label[MAXINDILABEL];       
00294     char group[MAXINDIGROUP];       
00296     IPState s;              
00298     ILight *lp;             
00300     int nlp;
00302     char timestamp[MAXINDITSTAMP];  
00304     void *aux;              
00305 } ILightVectorProperty;
00306 
00310 typedef struct {            /* one BLOB descriptor */
00312   char name[MAXINDINAME];       
00314   char label[MAXINDILABEL]; 
00316   char format[MAXINDIBLOBFMT];  
00318   void *blob;           
00320   int bloblen;          
00322   int size;             
00324   struct _IBLOBVectorProperty *bvp; 
00326   void *aux0, *aux1, *aux2;     
00327 } IBLOB;
00328 
00333 typedef struct _IBLOBVectorProperty {   /* BLOB vector property descriptor */
00335   char device[MAXINDIDEVICE];       
00337   char name[MAXINDINAME];       
00339   char label[MAXINDILABEL];     
00341   char group[MAXINDIGROUP];     
00343   IPerm p;              
00345   double timeout;           
00347   IPState s;                
00349   IBLOB *bp;                
00351   int nbp;              
00353   char timestamp[MAXINDITSTAMP];    
00355   void *aux;                
00356 } IBLOBVectorProperty;
00357 
00358 
00361 #define NARRAY(a)       (sizeof(a)/sizeof(a[0]))
00362 
00363 #endif

kstars

Skip menu "kstars"
  • Main Page
  • Modules
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • keduca
  • kstars
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal