X2 Standard  Version 1.24
x2filterwheel.h
1 #pragma once
2 #include "../../licensedinterfaces/filterwheeldriverinterface.h"
3 #include "../../licensedinterfaces/modalsettingsdialoginterface.h"
4 #include "../../licensedinterfaces/x2guiinterface.h"
5 
6 
7 
8 // Forward declare the interfaces that the this driver is "given" by TheSkyX
9 class SerXInterface;
11 class SleeperInterface;
13 class LoggerInterface;
14 class MutexInterface;
15 class TickCountInterface;
16 
27 {
28 public:
30  X2FilterWheel(const char* pszDriverSelection,
31  const int& nInstanceIndex,
32  SerXInterface * pSerX,
34  SleeperInterface * pSleeper,
35  BasicIniUtilInterface * pIniUtil,
36  LoggerInterface * pLogger,
37  MutexInterface * pIOMutex,
38  TickCountInterface * pTickCount);
39 
40  ~X2FilterWheel();
41 
42 // Operations
43 public:
44 
49  virtual int queryAbstraction(const char* pszName, void** ppVal) ;
51 
55  virtual int establishLink(void) ;
56  virtual int terminateLink(void) ;
57  virtual bool isLinked(void) const ;
58  virtual bool isEstablishLinkAbortable(void) const ;
60 
64  virtual void driverInfoDetailedInfo(BasicStringInterface& str) const;
65  virtual double driverInfoVersion(void) const ;
67 
71  virtual void deviceInfoNameShort(BasicStringInterface& str) const ;
72  virtual void deviceInfoNameLong(BasicStringInterface& str) const ;
73  virtual void deviceInfoDetailedDescription(BasicStringInterface& str) const ;
75  virtual void deviceInfoModel(BasicStringInterface& str) ;
77 
81  virtual int filterCount(int& nCount) ;
82  virtual int defaultFilterName(const int& nIndex, BasicStringInterface& strFilterNameOut);
83  virtual int startFilterWheelMoveTo(const int& nTargetPosition) ;
84  virtual int isCompleteFilterWheelMoveTo(bool& bComplete) const ;
85  virtual int endFilterWheelMoveTo(void) ;
86  virtual int abortFilterWheelMoveTo(void) ;
88 
89 //
93  virtual int initModalSettingsDialog(void){return 0;}
94  virtual int execModalSettingsDialog(void);
96 
97  //
101  virtual void uiEvent(X2GUIExchangeInterface* uiex, const char* pszEvent);
103 
104 // Implementation
105 private:
106 
107  SerXInterface *GetSerX() {return m_pSerX; }
108  TheSkyXFacadeForDriversInterface *GetTheSkyXFacadeForDrivers() {return m_pTheSkyXForMounts;}
109  SleeperInterface *GetSleeper() {return m_pSleeper; }
110  BasicIniUtilInterface *GetSimpleIniUtil() {return m_pIniUtil; }
111  LoggerInterface *GetLogger() {return m_pLogger; }
112  MutexInterface *GetMutex() {return m_pIOMutex;}
113  TickCountInterface *GetTickCountInterface() {return m_pTickCount;}
114 
115 
116  int m_nPrivateMulitInstanceIndex;
117  SerXInterface* m_pSerX;
118  TheSkyXFacadeForDriversInterface* m_pTheSkyXForMounts;
119  SleeperInterface* m_pSleeper;
120  BasicIniUtilInterface* m_pIniUtil;
121  LoggerInterface* m_pLogger;
122  MutexInterface* m_pIOMutex;
123  TickCountInterface* m_pTickCount;
124 
125 
126 
127 };
X2FilterWheel::uiEvent
virtual void uiEvent(X2GUIExchangeInterface *uiex, const char *pszEvent)
Definition: x2filterwheel.cpp:200
X2GUIEventInterface
The X2UIEventsInterface notifies X2 implementors when user interface events happen.
Definition: x2guiinterface.h:98
X2FilterWheel::deviceInfoModel
virtual void deviceInfoModel(BasicStringInterface &str)
Definition: x2filterwheel.cpp:120
X2FilterWheel::startFilterWheelMoveTo
virtual int startFilterWheelMoveTo(const int &nTargetPosition)
Definition: x2filterwheel.cpp:136
ModalSettingsDialogInterface
The ModalSettingsDialogInterface allows X2 implementors to display a customized settings user interfa...
Definition: modalsettingsdialoginterface.h:23
X2FilterWheel::deviceInfoNameLong
virtual void deviceInfoNameLong(BasicStringInterface &str) const
Definition: x2filterwheel.cpp:106
X2FilterWheel::driverInfoDetailedInfo
virtual void driverInfoDetailedInfo(BasicStringInterface &str) const
Definition: x2filterwheel.cpp:92
X2FilterWheel::endFilterWheelMoveTo
virtual int endFilterWheelMoveTo(void)
Definition: x2filterwheel.cpp:147
X2FilterWheel::driverInfoVersion
virtual double driverInfoVersion(void) const
Definition: x2filterwheel.cpp:96
X2FilterWheel::defaultFilterName
virtual int defaultFilterName(const int &nIndex, BasicStringInterface &strFilterNameOut)
Definition: x2filterwheel.cpp:131
TickCountInterface
The TickCountInterface is a cross-platform way to measure relative timing.
Definition: tickcountinterface.h:17
MutexInterface
The MutexInterface provides a cross-platform mutex.
Definition: mutexinterface.h:16
X2FilterWheel::abortFilterWheelMoveTo
virtual int abortFilterWheelMoveTo(void)
Definition: x2filterwheel.cpp:152
X2FilterWheel::queryAbstraction
virtual int queryAbstraction(const char *pszName, void **ppVal)
Definition: x2filterwheel.cpp:57
X2FilterWheel::X2FilterWheel
X2FilterWheel(const char *pszDriverSelection, const int &nInstanceIndex, SerXInterface *pSerX, TheSkyXFacadeForDriversInterface *pTheSkyX, SleeperInterface *pSleeper, BasicIniUtilInterface *pIniUtil, LoggerInterface *pLogger, MutexInterface *pIOMutex, TickCountInterface *pTickCount)
Definition: x2filterwheel.cpp:17
X2FilterWheel::deviceInfoDetailedDescription
virtual void deviceInfoDetailedDescription(BasicStringInterface &str) const
Definition: x2filterwheel.cpp:111
X2FilterWheel::deviceType
virtual DeviceType deviceType(void)
Definition: x2filterwheel.h:48
X2FilterWheel::terminateLink
virtual int terminateLink(void)
Definition: x2filterwheel.cpp:78
TheSkyXFacadeForDriversInterface
The TheSkyXFacadeForDriversInterface is a simplified interface to TheSkyX passed to X2 implementors.
Definition: theskyxfacadefordriversinterface.h:19
FilterWheelDriverInterface
The FilterWheelDriverInterface allows an X2 implementor to a write X2 filter wheel driver.
Definition: filterwheeldriverinterface.h:26
DriverRootInterface::DeviceType
DeviceType
Definition: driverrootinterface.h:26
DriverRootInterface::DT_FILTERWHEEL
@ DT_FILTERWHEEL
Definition: driverrootinterface.h:31
BasicIniUtilInterface
The BasicIniUtilInterface is used to make properties persistent.
Definition: basiciniutilinterface.h:21
X2FilterWheel::deviceInfoNameShort
virtual void deviceInfoNameShort(BasicStringInterface &str) const
Definition: x2filterwheel.cpp:102
X2FilterWheel::execModalSettingsDialog
virtual int execModalSettingsDialog(void)
Definition: x2filterwheel.cpp:159
LoggerInterface
The LoggerInterface is a cross-platform logging utility passed to X2 implementors to show real-time,...
Definition: loggerinterface.h:58
X2FilterWheel::deviceInfoFirmwareVersion
virtual void deviceInfoFirmwareVersion(BasicStringInterface &str)
Definition: x2filterwheel.cpp:116
SleeperInterface
The SleeperInterface is a cross-platform "sleeper".
Definition: sleeperinterface.h:15
X2FilterWheel::isCompleteFilterWheelMoveTo
virtual int isCompleteFilterWheelMoveTo(bool &bComplete) const
Definition: x2filterwheel.cpp:141
X2FilterWheel
The X2FilterWheel example.
Definition: x2filterwheel.h:27
X2FilterWheel::isLinked
virtual bool isLinked(void) const
Definition: x2filterwheel.cpp:83
X2FilterWheel::initModalSettingsDialog
virtual int initModalSettingsDialog(void)
Definition: x2filterwheel.h:93
SerXInterface
The SerXInterface is a cross-plaform serial port.
Definition: serxinterface.h:18
X2FilterWheel::filterCount
virtual int filterCount(int &nCount)
Definition: x2filterwheel.cpp:126
X2GUIExchangeInterface
The X2GUIExchangeInterface provides the X2 developer the means to get and set data from a graphical u...
Definition: x2guiinterface.h:23
BasicStringInterface
The BasicStringInterface allows a string as an output.
Definition: basicstringinterface.h:17
X2FilterWheel::establishLink
virtual int establishLink(void)
Definition: x2filterwheel.cpp:73
X2 Examples
(C) Software Bisque, Inc. All rights reserved.