libapogee  3.0.3179
ApogeeFilterWheel.h
1 
14 #ifndef APOGEEFILTERWHEEL_INCLUDE_H__
15 #define APOGEEFILTERWHEEL_INCLUDE_H__
16 
17 #include <stdint.h>
18 #include <string>
19 
20 #ifdef WIN_OS
21 #include <memory>
22 #else
23 #include <tr1/memory>
24 #endif
25 
26 #include "DefDllExport.h"
27 
28 
29 class FilterWheelIo;
30 
31 class DLL_EXPORT ApogeeFilterWheel
32 {
33  public:
35  enum Type
36  {
38  UNKNOWN_TYPE = 0,
40  FW50_9R = 1,
42  FW50_7S = 2,
44  AFW50_10S = 6,
45 
46  AFW31_17R = 9
47  };
48 
50  enum Status
51  {
61  ACTIVE
62  };
63 
68 
72  virtual ~ApogeeFilterWheel();
73 
81  void Init( const ApogeeFilterWheel::Type type,
82  const std::string & DeviceAddr );
83 
88  void Close();
89 
94  uint16_t GetVendorId();
95 
100  uint16_t GetProductId();
101 
106  uint16_t GetDeviceId();
107 
112  std::string GetUsbFirmwareRev();
113 
117  ApogeeFilterWheel::Type GetType() { return m_type; }
118 
123  std::string GetName();
124 
129  ApogeeFilterWheel::Status GetStatus();
130 
135  uint16_t GetMaxPositions();
136 
142  void SetPosition( uint16_t Position );
143 
148  uint16_t GetPosition();
149 
150  protected:
151 //this code removes vc++ compiler warning C4251
152 //from http://www.unknownroad.com/rtfm/VisualStudio/warningC4251.html
153 #ifdef WIN_OS
154  template class DLL_EXPORT std::tr1::shared_ptr<FilterWheelIo>;
155 #endif
156 
157  std::tr1::shared_ptr<FilterWheelIo> m_Usb;
158 
159  private:
160 
161  bool IsConnected();
162 
163  ApogeeFilterWheel::Type m_type;
164  bool m_connected;
165 
166  //disabling the copy ctor and assignment operator
167  //generated by the compiler - don't want them
168  //Effective C++ Item 6
171 
172 };
173 
174 #endif
Definition: ApogeeFilterWheel.h:57
class for apogee's usb filter wheel
Definition: ApogeeFilterWheel.h:31
ApogeeFilterWheel::Type GetType()
Definition: ApogeeFilterWheel.h:117
Definition: ApogeeFilterWheel.h:53
Status
Definition: ApogeeFilterWheel.h:50
Definition: ApogeeFilterWheel.h:59