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

kstars

apmount.h

Go to the documentation of this file.
00001 /*
00002     Astro-Physics 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 ASTROPHYSICS_H
00022 #define ASTROPHYSICS_H
00023 
00024 #include "indidevapi.h"
00025 #include "indicom.h"
00026 
00027 #define POLLMS      1000                /* poll period, ms */
00028 #define     mydev       "Astro-Physics"     /* The device name */
00029 
00030 
00031 
00032 /* equatorial position */
00033 
00034 // N.B. No Static identifier as it is needed for external linkage
00035 
00036 
00037 
00038 class APMount
00039 {
00040  public:
00041  APMount();
00042  ~APMount();
00043 
00044  void ISGetProperties (const char *dev);
00045  void ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n);
00046  void ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n);
00047  void ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n);
00048  void ISPoll ();
00049  
00050   void connectionLost();
00051   void connectionResumed();
00052 
00053 private:
00054 
00055   void initProperties();
00056 
00057   /* Switches */
00058   ISwitch AlignmentS [2];
00059   ISwitch PowerS[2];
00060   ISwitch OnCoordSetS[3];
00061   ISwitch TrackModeS[4];
00062   ISwitch AbortSlewS[1];
00063   ISwitch ParkS[2];
00064   ISwitch MovementS[4];
00065   ISwitch FocusMotionS[2];
00066 
00067   /* Texts */
00068   IText PortT[1];
00069   IText UTCT[1];
00070   IText ObjectT[1];
00071 
00072   /* Numbers */
00073   INumber EqN[2];
00074   INumber GeoN[2];
00075   INumber FocusTimerN[1];
00076   INumber SDTimeN[1];
00077   INumber HorN[2];
00078   INumber FocusSpeedN[1];
00079 
00080   /* Switch Vectors */
00081   ISwitchVectorProperty PowerSP;
00082   ISwitchVectorProperty AlignmentSP;
00083   ISwitchVectorProperty OnCoordSetSP;
00084   ISwitchVectorProperty AbortSlewSP;
00085   ISwitchVectorProperty ParkSP;
00086   ISwitchVectorProperty TrackModeSP;
00087   ISwitchVectorProperty MovementSP;
00088   ISwitchVectorProperty FocusMotionSP;
00089 
00090    /* Number Vectors */
00091   INumberVectorProperty EqNP;
00092   INumberVectorProperty GeoNP;
00093   INumberVectorProperty FocusTimerNP;
00094   INumberVectorProperty SDTimeNP;
00095   INumberVectorProperty HorNP;
00096   INumberVectorProperty FocusSpeedNP;
00097 
00098    /* Text Vectors */
00099    ITextVectorProperty PortTP;
00100    ITextVectorProperty TimeTP;
00101    ITextVectorProperty ObjectTP;
00102 
00103  void getBasicData();
00104  int checkPower(INumberVectorProperty *np);
00105  int checkPower(ISwitchVectorProperty *sp);
00106  int checkPower(ITextVectorProperty *tp);
00107  void handleError(ISwitchVectorProperty *svp, int err, const char *msg);
00108  void handleError(INumberVectorProperty *nvp, int err, const char *msg);
00109  void handleError(ITextVectorProperty *tvp, int err, const char *msg);
00110  bool isTelescopeOn(void);
00111  void powerTelescope();
00112  void slewError(int slewCode);
00113  void getAlignment();
00114  int handleCoordSet();
00115  int getOnSwitch(ISwitchVectorProperty *sp);
00116  void correctFault();
00117  void enableSimulation(bool enable);
00118  void updateTime();
00119  void updateLocation();
00120  
00121 
00122  protected:
00123   int timeFormat;
00124   int currentSiteNum;
00125   int trackingMode;
00126 
00127   double JD;
00128   double targetRA;
00129   double targetDEC;
00130   double lastRA;
00131   double lastDEC;
00132   double UTCOffset;
00133   bool   fault;
00134   bool   simulation;
00135 
00136   struct tm *localTM;
00137   
00138   int currentSet;
00139   int lastSet;
00140   int lastMove[4];
00141 
00142 };
00143 
00144 #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