libapogee
3.0.3079
|
00001 00014 #ifndef APOGEEFILTERWHEEL_INCLUDE_H__ 00015 #define APOGEEFILTERWHEEL_INCLUDE_H__ 00016 00017 #include <stdint.h> 00018 #include <string> 00019 00020 #ifdef WIN_OS 00021 #include <memory> 00022 #else 00023 #include <tr1/memory> 00024 #endif 00025 00026 #include "DefDllExport.h" 00027 00028 00029 class FilterWheelIo; 00030 00031 class DLL_EXPORT ApogeeFilterWheel 00032 { 00033 public: 00035 enum Type 00036 { 00038 UNKNOWN_TYPE = 0, 00040 FW50_9R = 1, 00042 FW50_7S = 2, 00044 AFW50_10S = 6, 00045 00046 AFW31_17R = 9 00047 }; 00048 00050 enum Status 00051 { 00053 UNKNOWN_STATUS, 00057 NOT_CONNECTED, 00059 READY, 00061 ACTIVE 00062 }; 00063 00067 ApogeeFilterWheel(); 00068 00072 virtual ~ApogeeFilterWheel(); 00073 00081 void Init( const ApogeeFilterWheel::Type type, 00082 const std::string & DeviceAddr ); 00083 00088 void Close(); 00089 00094 uint16_t GetVendorId(); 00095 00100 uint16_t GetProductId(); 00101 00106 uint16_t GetDeviceId(); 00107 00112 std::string GetUsbFirmwareRev(); 00113 00117 ApogeeFilterWheel::Type GetType() { return m_type; } 00118 00123 std::string GetName(); 00124 00129 ApogeeFilterWheel::Status GetStatus(); 00130 00135 uint16_t GetMaxPositions(); 00136 00142 void SetPosition( uint16_t Position ); 00143 00148 uint16_t GetPosition(); 00149 00150 protected: 00151 //this code removes vc++ compiler warning C4251 00152 //from http://www.unknownroad.com/rtfm/VisualStudio/warningC4251.html 00153 #ifdef WIN_OS 00154 template class DLL_EXPORT std::tr1::shared_ptr<FilterWheelIo>; 00155 #endif 00156 00157 std::tr1::shared_ptr<FilterWheelIo> m_Usb; 00158 00159 private: 00160 00161 bool IsConnected(); 00162 00163 ApogeeFilterWheel::Type m_type; 00164 bool m_connected; 00165 00166 //disabling the copy ctor and assignment operator 00167 //generated by the compiler - don't want them 00168 //Effective C++ Item 6 00169 ApogeeFilterWheel(const ApogeeFilterWheel&); 00170 ApogeeFilterWheel& operator=(ApogeeFilterWheel&); 00171 00172 }; 00173 00174 #endif