X2 Standard  Version 1.24
x2focuser.h
1 // X2Focuser.h : Declaration of the X2Focuser
2 
3 #ifndef __X2Focuser_H_
4 #define __X2Focuser_H_
5 
6 #include "../../licensedinterfaces/focuserdriverinterface.h"
7 
8 // Forward declare the interfaces that this device is dependent upon
9 class SerXInterface;
11 class SleeperInterface;
12 class SimpleIniUtilInterface;
13 class LoggerInterface;
14 class MutexInterface;
16 class TickCountInterface;
17 
26 {
27 public:
28  X2Focuser(const char* pszDisplayName,
29  const int& nInstanceIndex,
30  SerXInterface * pSerXIn,
32  SleeperInterface * pSleeperIn,
33  BasicIniUtilInterface * pIniUtilIn,
34  LoggerInterface * pLoggerIn,
35  MutexInterface * pIOMutexIn,
36  TickCountInterface * pTickCountIn);
37 
38  ~X2Focuser();
39 
40 public:
41 
45  virtual int queryAbstraction(const char* pszName, void** ppVal);
47 
51  virtual void driverInfoDetailedInfo(BasicStringInterface& str) const;
52  virtual double driverInfoVersion(void) const ;
54 
58  virtual void deviceInfoNameShort(BasicStringInterface& str) const ;
59  virtual void deviceInfoNameLong(BasicStringInterface& str) const ;
60  virtual void deviceInfoDetailedDescription(BasicStringInterface& str) const ;
62  virtual void deviceInfoModel(BasicStringInterface& str) ;
64 
68  virtual int establishLink(void);
69  virtual int terminateLink(void);
70  virtual bool isLinked(void) const;
72 
75  virtual int focPosition(int& nPosition) ;
76  virtual int focMinimumLimit(int& nMinLimit) ;
77  virtual int focMaximumLimit(int& nMaxLimit) ;
78  virtual int focAbort() ;
79 
80  virtual int startFocGoto(const int& nRelativeOffset) ;
81  virtual int isCompleteFocGoto(bool& bComplete) const ;
82  virtual int endFocGoto(void) ;
83 
84  virtual int amountCountFocGoto(void) const ;
85  virtual int amountNameFromIndexFocGoto(const int& nZeroBasedIndex, BasicStringInterface& strDisplayName, int& nAmount);
86  virtual int amountIndexFocGoto(void) ;
88 
89 private:
90 
91  //Standard device driver tools
92  SerXInterface* m_pSerX;
93  TheSkyXFacadeForDriversInterface* m_pTheSkyXForMounts;
94  SleeperInterface* m_pSleeper;
95  BasicIniUtilInterface* m_pIniUtil;
96  LoggerInterface* m_pLogger;
97  mutable MutexInterface* m_pIOMutex;
98  TickCountInterface* m_pTickCount;
99 
100  SerXInterface *GetSerX() {return m_pSerX; }
101  TheSkyXFacadeForDriversInterface *GetTheSkyXFacadeForDrivers() {return m_pTheSkyXForMounts;}
102  SleeperInterface *GetSleeper() {return m_pSleeper; }
103  BasicIniUtilInterface *GetSimpleIniUtil() {return m_pIniUtil; }
104  LoggerInterface *GetLogger() {return m_pLogger; }
105  MutexInterface *GetMutex() {return m_pIOMutex;}
106  TickCountInterface *GetTickCountInterface() {return m_pTickCount;}
107 
108  bool m_bLinked;
109  int m_nPosition;
110 };
111 
112 
113 #endif //__X2Focuser_H_
X2Focuser::isLinked
virtual bool isLinked(void) const
Definition: x2focuser.cpp:103
X2Focuser::driverInfoDetailedInfo
virtual void driverInfoDetailedInfo(BasicStringInterface &str) const
Definition: x2focuser.cpp:66
X2Focuser::establishLink
virtual int establishLink(void)
Definition: x2focuser.cpp:93
X2Focuser::deviceInfoNameShort
virtual void deviceInfoNameShort(BasicStringInterface &str) const
Definition: x2focuser.cpp:74
X2Focuser::deviceInfoModel
virtual void deviceInfoModel(BasicStringInterface &str)
Definition: x2focuser.cpp:89
X2Focuser::focMinimumLimit
virtual int focMinimumLimit(int &nMinLimit)
Definition: x2focuser.cpp:113
X2Focuser::deviceInfoNameLong
virtual void deviceInfoNameLong(BasicStringInterface &str) const
Definition: x2focuser.cpp:78
TickCountInterface
The TickCountInterface is a cross-platform way to measure relative timing.
Definition: tickcountinterface.h:17
X2Focuser::focAbort
virtual int focAbort()
Definition: x2focuser.cpp:123
MutexInterface
The MutexInterface provides a cross-platform mutex.
Definition: mutexinterface.h:16
X2Focuser::amountCountFocGoto
virtual int amountCountFocGoto(void) const
Definition: x2focuser.cpp:143
X2Focuser::driverInfoVersion
virtual double driverInfoVersion(void) const
Definition: x2focuser.cpp:69
X2Focuser
The X2Focuser example.
Definition: x2focuser.h:26
X2Focuser::deviceInfoDetailedDescription
virtual void deviceInfoDetailedDescription(BasicStringInterface &str) const
Definition: x2focuser.cpp:82
X2Focuser::terminateLink
virtual int terminateLink(void)
Definition: x2focuser.cpp:98
X2Focuser::endFocGoto
virtual int endFocGoto(void)
Definition: x2focuser.cpp:138
X2Focuser::startFocGoto
virtual int startFocGoto(const int &nRelativeOffset)
Definition: x2focuser.cpp:128
X2Focuser::deviceInfoFirmwareVersion
virtual void deviceInfoFirmwareVersion(BasicStringInterface &str)
Definition: x2focuser.cpp:86
TheSkyXFacadeForDriversInterface
The TheSkyXFacadeForDriversInterface is a simplified interface to TheSkyX passed to X2 implementors.
Definition: theskyxfacadefordriversinterface.h:19
X2Focuser::queryAbstraction
virtual int queryAbstraction(const char *pszName, void **ppVal)
Definition: x2focuser.cpp:54
X2Focuser::amountIndexFocGoto
virtual int amountIndexFocGoto(void)
Definition: x2focuser.cpp:158
X2Focuser::isCompleteFocGoto
virtual int isCompleteFocGoto(bool &bComplete) const
Definition: x2focuser.cpp:133
FocuserDriverInterface
The FocuserDriverInterface allows an X2 implementor to a write X2 focuser driver.
Definition: focuserdriverinterface.h:27
BasicIniUtilInterface
The BasicIniUtilInterface is used to make properties persistent.
Definition: basiciniutilinterface.h:21
LoggerInterface
The LoggerInterface is a cross-platform logging utility passed to X2 implementors to show real-time,...
Definition: loggerinterface.h:58
X2Focuser::focPosition
virtual int focPosition(int &nPosition)
Definition: x2focuser.cpp:108
SleeperInterface
The SleeperInterface is a cross-platform "sleeper".
Definition: sleeperinterface.h:15
SerXInterface
The SerXInterface is a cross-plaform serial port.
Definition: serxinterface.h:18
BasicStringInterface
The BasicStringInterface allows a string as an output.
Definition: basicstringinterface.h:17
X2Focuser::amountNameFromIndexFocGoto
virtual int amountNameFromIndexFocGoto(const int &nZeroBasedIndex, BasicStringInterface &strDisplayName, int &nAmount)
Definition: x2focuser.cpp:147
X2Focuser::focMaximumLimit
virtual int focMaximumLimit(int &nMaxLimit)
Definition: x2focuser.cpp:118
X2 Examples
(C) Software Bisque, Inc. All rights reserved.