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
00048 enum Status
00049 {
00051 UNKNOWN_STATUS,
00055 NOT_CONNECTED,
00057 READY,
00059 ACTIVE
00060 };
00061
00065 ApogeeFilterWheel();
00066
00070 virtual ~ApogeeFilterWheel();
00071
00079 void Init( const ApogeeFilterWheel::Type type,
00080 const std::string & DeviceAddr );
00081
00086 void Close();
00087
00092 uint16_t GetVendorId();
00093
00098 uint16_t GetProductId();
00099
00104 uint16_t GetDeviceId();
00105
00110 std::string GetUsbFirmwareRev();
00111
00115 ApogeeFilterWheel::Type GetType() { return m_type; }
00116
00121 std::string GetName();
00122
00127 ApogeeFilterWheel::Status GetStatus();
00128
00133 uint16_t GetMaxPositions();
00134
00140 void SetPosition( uint16_t Position );
00141
00146 uint16_t GetPosition();
00147
00148 protected:
00149
00150
00151 #ifdef WIN_OS
00152 template class DLL_EXPORT std::tr1::shared_ptr<FilterWheelIo>;
00153 #endif
00154
00155 std::tr1::shared_ptr<FilterWheelIo> m_Usb;
00156
00157 private:
00158
00159 bool IsConnected();
00160
00161 ApogeeFilterWheel::Type m_type;
00162 bool m_connected;
00163
00164
00165
00166
00167 ApogeeFilterWheel(const ApogeeFilterWheel&);
00168 ApogeeFilterWheel& operator=(ApogeeFilterWheel&);
00169
00170 };
00171
00172 #endif