00001
00014 #ifndef ASCENT_INCLUDE_H__
00015 #define ASCENT_INCLUDE_H__
00016
00017 #include "CamGen2Base.h"
00018 #include <string>
00019 #include "ApogeeFilterWheel.h"
00020
00021 class ApgTimer;
00022
00023 class DLL_EXPORT Ascent : public CamGen2Base
00024 {
00025 public:
00027 enum FilterWheelType
00028 {
00030 FW_UNKNOWN_TYPE = 0,
00032 CFW25_6R = 7,
00034 CFW31_8R = 8
00035 };
00036
00037 struct FilterWheelInfo
00038 {
00039 Ascent::FilterWheelType type;
00040 std::string name;
00041 uint16_t maxPositions;
00042 };
00043
00044 Ascent();
00045
00046 void OpenConnection( const std::string & ioType,
00047 const std::string & DeviceAddr,
00048 const uint16_t FirmwareRev,
00049 const uint16_t Id );
00050
00051 virtual ~Ascent();
00052
00058 void FilterWheelOpen( Ascent::FilterWheelType type );
00059
00064 void FilterWheelClose();
00065
00071 void SetFilterWheelPos( uint16_t pos );
00072
00077 uint16_t GetFilterWheelPos();
00078
00083 ApogeeFilterWheel::Status GetFilterWheelStatus();
00084
00088 Ascent::FilterWheelType GetFilterWheelType() { return m_filterWheelType; }
00089
00094 std::string GetFilterWheelName();
00095
00100 uint16_t GetFilterWheelMaxPositions();
00101
00102 void StartExposure( double Duration, bool IsLight );
00103
00104 int32_t GetNumAdChannels();
00105
00106 double GetTempHeatsink();
00107
00108 void Init();
00109
00110 protected:
00111 Ascent(const std::string & ioType,
00112 const std::string & DeviceAddr);
00113
00114 void FixImgFromCamera( const std::vector<uint16_t> & data,
00115 std::vector<uint16_t> & out, int32_t rows, int32_t cols );
00116
00117 void CreateCamIo(const std::string & ioType,
00118 const std::string & DeviceAddr);
00119
00120 void ExposureAndGetImgRC(uint16_t & r, uint16_t & c);
00121
00122 void UpdateCamRegIfNeeded();
00123
00124 void SetIsInterlineBit();
00125
00126 void SetIsAscentBit();
00127
00128 private:
00129
00130 void CfgCamFromId( uint16_t CameraId );
00131
00132 void VerifyCamId();
00133
00134 void UpdateCfgWithStrDbInfo();
00135
00136 const std::string m_fileName;
00137 Ascent::FilterWheelType m_filterWheelType;
00138 double m_FwDiffTime;
00139
00140
00141
00142 #ifdef WIN_OS
00143 template class DLL_EXPORT std::tr1::shared_ptr<ApgTimer>;
00144 #endif
00145
00146 std::tr1::shared_ptr<ApgTimer> m_FwTimer;
00147
00148
00149
00150
00151 Ascent(const Ascent&);
00152 Ascent& operator=(Ascent&);
00153 };
00154
00155 #endif