X2 Standard  Version 1.24
mountdriverinterface.h
1 #if !defined(_MountDriverInterface_H_)
2 #define _MountDriverInterface_H_
3 
4 #ifdef THESKYX_FOLDER_TREE
5 #include "imagingsystem/hardware/interfaces/licensed/driverrootinterface.h"
6 #include "imagingsystem/hardware/interfaces/licensed/linkinterface.h"
7 #include "imagingsystem/hardware/interfaces/licensed/deviceinfointerface.h"
8 #include "imagingsystem/hardware/interfaces/licensed/driverinfointerface.h"
9 #include "imagingsystem/hardware/interfaces/licensed/mount/needsrefractioninterface.h"
10 #else//TheSkyX Plug In Build
11 #include "../../licensedinterfaces/driverrootinterface.h"
12 #include "../../licensedinterfaces/linkinterface.h"
13 #include "../../licensedinterfaces/deviceinfointerface.h"
14 #include "../../licensedinterfaces/driverinfointerface.h"
15 #include "../../licensedinterfaces/mount/needsrefractioninterface.h"
16 #endif
17 
26 {
27 public:
30  {
31  MKS_MOTOR_HOMING =(0x0100),
32  MKS_MOTOR_SERVO =(0x0200),
33  MKS_MOTOR_INDEXING =(0x0400),
34  MKS_MOTOR_SLEWING =(0x0800),
35  MKS_MOTOR_HOMED =(0x1000),
36  MKS_MOTOR_JOYSTICKING =(0x2000),
37  MKS_MOTOR_OFF =(0x4000),
38  MKS_MOTOR_MOVING = (MKS_MOTOR_HOMING | MKS_MOTOR_SLEWING | MKS_MOTOR_JOYSTICKING),
39 
40  };
41 
43  enum Axis
44  {
45  AXIS_RA = 0,
46  AXIS_DEC = 1,
47  };
48 
50  enum MoveDir
51  {
52  MD_NORTH = 0,
53  MD_SOUTH = 1,
54  MD_EAST = 2,
55  MD_WEST = 3,
56  };
57 
59  enum MoveRate
60  {
61  MR_FLASH = -2,
62  MR_BASE = -1,
63  MR_0R5X = 0,
64  MR_1X = 1,
65  MR_2X = 2,
66  MR_4X = 3,
67  MR_8X = 4,
68  MR_16X = 5,
69  MR_32X = 6,
70  MR_64X = 7,
71  MR_128X = 8,
72  MR_256X = 9,
73  MR_SLEW = 10,
74  };
75 
76 public:
77  virtual ~MountDriverInterface(){}
78 
79 public:
80 
81 // Operations
82 public:
83 
88  virtual int queryAbstraction(const char* pszName, void** ppVal) = 0;
90 
94  virtual int establishLink(void) = 0;
95  virtual int terminateLink(void) = 0;
96  virtual bool isLinked(void) const = 0;
97  virtual bool isEstablishLinkAbortable(void) const {return false;}
99 
103  virtual void driverInfoDetailedInfo(BasicStringInterface& str) const =0;
104  virtual double driverInfoVersion(void) const = 0;
106 
107  //
111  virtual void deviceInfoNameShort(BasicStringInterface& str) const = 0;
112  virtual void deviceInfoNameLong(BasicStringInterface& str) const = 0;
115  virtual void deviceInfoModel(BasicStringInterface& str) = 0;
117 
118  //NeedsRefractionInterface
119  //Don't forget, each mount implementation must return type cast in queryAbstraction
121  virtual bool needsRefactionAdjustments(void) {return true;}
122 
128  virtual int raDec(double& dRawRA, double& dRawDec, const bool& bCached = false) = 0;
130  virtual int abort(void) = 0;
131 
132 // Implementation
133 private:
134 
135 
136 
137 };
138 
139 #endif
MountDriverInterface::establishLink
virtual int establishLink(void)=0
MountDriverInterface::raDec
virtual int raDec(double &dRawRA, double &dRawDec, const bool &bCached=false)=0
MountDriverInterface::isLinked
virtual bool isLinked(void) const =0
MountDriverInterface::MotorState
MotorState
Definition: mountdriverinterface.h:30
MountDriverInterface::deviceInfoNameShort
virtual void deviceInfoNameShort(BasicStringInterface &str) const =0
MountDriverInterface::deviceInfoModel
virtual void deviceInfoModel(BasicStringInterface &str)=0
DriverRootInterface
The DriverRootInterface is the foundation for all X2 device drivers.
Definition: driverrootinterface.h:21
MountDriverInterface::needsRefactionAdjustments
virtual bool needsRefactionAdjustments(void)
Definition: mountdriverinterface.h:121
DriverRootInterface::DT_MOUNT
@ DT_MOUNT
Definition: driverrootinterface.h:28
MountDriverInterface::queryAbstraction
virtual int queryAbstraction(const char *pszName, void **ppVal)=0
MountDriverInterface::abort
virtual int abort(void)=0
DriverInfoInterface
The DriverInfoInterface provides X2 implementors a standarized way to provide driver specific informa...
Definition: driverinfointerface.h:15
MountDriverInterface::deviceInfoDetailedDescription
virtual void deviceInfoDetailedDescription(BasicStringInterface &str) const =0
HardwareInfoInterface
The HardwareInfoInterface provides X2 implementors a standarized way to provide hardware specific inf...
Definition: deviceinfointerface.h:15
DriverRootInterface::DeviceType
DeviceType
Definition: driverrootinterface.h:26
MountDriverInterface::MoveRate
MoveRate
Definition: mountdriverinterface.h:60
MountDriverInterface::deviceInfoNameLong
virtual void deviceInfoNameLong(BasicStringInterface &str) const =0
MountDriverInterface
The MountDriverInterface allows an X2 implementor to a write X2 mount driver.
Definition: mountdriverinterface.h:26
NeedsRefractionInterface
The NeedsRefractionInterface for mounts.
Definition: needsrefractioninterface.h:30
MountDriverInterface::Axis
Axis
Definition: mountdriverinterface.h:44
MountDriverInterface::MoveDir
MoveDir
Definition: mountdriverinterface.h:51
MountDriverInterface::terminateLink
virtual int terminateLink(void)=0
MountDriverInterface::deviceInfoFirmwareVersion
virtual void deviceInfoFirmwareVersion(BasicStringInterface &str)=0
MountDriverInterface::driverInfoDetailedInfo
virtual void driverInfoDetailedInfo(BasicStringInterface &str) const =0
MountDriverInterface::deviceType
virtual DeviceType deviceType(void)
Definition: mountdriverinterface.h:87
BasicStringInterface
The BasicStringInterface allows a string as an output.
Definition: basicstringinterface.h:17
MountDriverInterface::driverInfoVersion
virtual double driverInfoVersion(void) const =0
X2 Examples
(C) Software Bisque, Inc. All rights reserved.