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

kstars

lx200basic.h

Go to the documentation of this file.
00001 /*
00002     LX200 Basic Driver
00003     Copyright (C) 2005 Jasem Mutlaq (mutlaqja@ikarustech.com)
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 */
00020 
00021 #ifndef LX200BASIC_H
00022 #define LX200BASIC_H
00023 
00024 #include "indidevapi.h"
00025 #include "indicom.h"
00026 
00027 #define POLLMS      1000            /* poll period, ms */
00028 #define mydev       "LX200 Basic"       /* The device name */
00029 
00030 
00031 
00032 class LX200Basic
00033 {
00034  public:
00035  LX200Basic();
00036  ~LX200Basic();
00037 
00038  void ISGetProperties (const char *dev);
00039  void ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n);
00040  void ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n);
00041  void ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n);
00042  void ISPoll ();
00043  
00044   void connectionLost();
00045   void connectionResumed();
00046 
00047 private:
00048 
00049   void initProperties();
00050 
00051   /* Switches */
00052   ISwitch PowerS[2];
00053   ISwitch OnCoordSetS[3];
00054   ISwitch AbortSlewS[1];
00055   
00056   /* Texts */
00057   IText PortT[1];
00058   IText ObjectT[1];
00059 
00060   /* Numbers */
00061   INumber EqN[2];
00062   
00063   /* Switch Vectors */
00064   ISwitchVectorProperty PowerSP;
00065   ISwitchVectorProperty OnCoordSetSP;
00066   ISwitchVectorProperty AbortSlewSP;
00067   
00068    /* Number Vectors */
00069   INumberVectorProperty EqNP;
00070   
00071    /* Text Vectors */
00072    ITextVectorProperty PortTP;
00073    ITextVectorProperty ObjectTP;
00074 
00075  void getBasicData();
00076  int checkPower(INumberVectorProperty *np);
00077  int checkPower(ISwitchVectorProperty *sp);
00078  int checkPower(ITextVectorProperty *tp);
00079  void handleError(ISwitchVectorProperty *svp, int err, const char *msg);
00080  void handleError(INumberVectorProperty *nvp, int err, const char *msg);
00081  void handleError(ITextVectorProperty *tvp, int err, const char *msg);
00082  bool isTelescopeOn(void);
00083  void powerTelescope();
00084  void slewError(int slewCode);
00085   int handleCoordSet();
00086  int getOnSwitch(ISwitchVectorProperty *sp);
00087  void correctFault();
00088  void enableSimulation(bool enable);
00089  
00090 
00091  protected:
00092 
00093   double JD;
00094   double targetRA;
00095   double targetDEC;
00096   double lastRA;
00097   double lastDEC;
00098   double UTCOffset;
00099   bool   simulation;
00100   bool   fault;
00101 
00102   struct tm *localTM;
00103   
00104   int currentSet;
00105   int lastSet;
00106 
00107 };
00108 
00109 #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