QTelescopeMCU.hpp

00001 #ifndef _QTelescopeMCU_hpp_
00002 #define _QTelescopeMCU_hpp_
00003 
00004 #include "QTelescope.hpp"
00005 #include <string>
00006 
00007 using namespace std;
00008 
00015 class QTelescopeMCU : public QTelescope {
00016    Q_OBJECT;
00017 public:
00018    QTelescopeMCU(const char * deviceName);
00019    void buildGUI(QWidget * parent);
00020 public slots:
00021    virtual void goE(float s=0) {sendCommand(moveEast);};
00022    virtual void goW(float s=0) {sendCommand(moveWest);};
00023    virtual void goS(float s=0) {sendCommand(moveSouth);};
00024    virtual void goN(float s=0) {sendCommand(moveNorth);};
00025    virtual void stopE() {sendCommand(stopMoveEast);};
00026    virtual void stopN() {sendCommand(stopMoveNorth);};
00027    virtual void stopW() {sendCommand(stopMoveWest);};
00028    virtual void stopS() {sendCommand(stopMoveSouth);};
00029    virtual double setSpeed(double speed);
00030    virtual void setSpeed(char speed);
00031    virtual bool setTracking(bool activated);
00032 protected:
00035    enum CommandType {
00036       park,
00037       getAlignment,
00038       setAlignment,
00039       moveSouth,
00040       moveNorth,
00041       moveEast,
00042       moveWest,
00043       stopMoveEast,
00044       stopMoveWest,
00045       stopMoveNorth,
00046       stopMoveSouth,
00047       setMoveSpeed
00048    };
00049    enum TrackingMode {
00050       land,
00051       polar,
00052       altAz,
00053       german
00054    };
00055    enum SubVersion {
00056       versionDate,
00057       versionFull,
00058       versionNumber,
00059       versionTime,
00060       productName
00061    };
00062    enum ReturnType {
00063       singleChar,
00064       booleans,
00065       numerics,
00066       strings,
00067       revision,
00068       none
00069    };
00070    string sendCommand(CommandType com,const string & param="");
00071    void setTracking(TrackingMode);
00072    string version(SubVersion v);
00073 private:
00075    bool sendCmd(const string & cmd,const string & param="");
00077    string recvCmd(ReturnType t);
00079    int descriptor_;
00080    TrackingMode aligment_;
00081 };
00082 #endif

Generated on Sat Oct 27 09:21:03 2007 for QastroCam by  doxygen 1.5.1