libapogee  3.0.2865
apogee/Alta.h
00001 
00013 #ifndef ALTA_INCLUDE_H__ 
00014 #define ALTA_INCLUDE_H__ 
00015 
00016 #include <string>
00017 #include <map>
00018 #include "ApogeeCam.h" 
00019 
00020 
00021 class DLL_EXPORT Alta : public ApogeeCam
00022 { 
00023     public: 
00024         Alta();
00025 
00026         virtual ~Alta(); 
00027 
00028         void OpenConnection( const std::string & ioType,
00029              const std::string & DeviceAddr,
00030              const uint16_t FirmwareRev,
00031              const uint16_t Id );
00032 
00033         void CloseConnection();
00034 
00035         void Init();
00036 
00037         void StartExposure( double Duration, bool IsLight );
00038 
00039         CameraStatusRegs GetStatus();
00040         Apg::Status GetImagingStatus();
00041       
00042         void GetImage( std::vector<uint16_t> & out );
00043 
00044         void StopExposure( bool Digitize );
00045 
00046         uint32_t GetAvailableMemory();
00047 
00055         void SetCcdAdc12BitGain( uint16_t gain );
00056 
00064         void SetCcdAdc12BitOffset( uint16_t offset );    
00065 
00072         uint16_t GetCcdAdc12BitGain();
00073 
00080         uint16_t GetCcdAdc12BitOffset();
00081 
00088         double GetCcdAdc16BitGain();
00089 
00090         int32_t GetNumAds();
00091         int32_t GetNumAdChannels();
00092 
00093         double GetCoolerDrive();
00094 
00099         void SetFanMode( Apg::FanMode mode, bool PreCondCheck = true );
00100 
00105         Apg::FanMode GetFanMode();
00106 
00107         double GetTempHeatsink();
00108 
00115         std::string GetMacAddress();
00116 
00123         void OpenSerial( uint16_t PortId );
00124 
00130         void CloseSerial( uint16_t PortId );
00131 
00139         void SetSerialBaudRate( uint16_t PortId , uint32_t BaudRate );
00140 
00147         uint32_t GetSerialBaudRate(  uint16_t PortId  );
00148 
00155         Apg::SerialFC GetSerialFlowControl( uint16_t PortId );
00156 
00163         void SetSerialFlowControl( uint16_t PortId, 
00164             Apg::SerialFC FlowControl );
00165 
00172         Apg::SerialParity GetSerialParity( uint16_t PortId );
00173         
00180         void SetSerialParity( uint16_t PortId, Apg::SerialParity Parity );
00181         
00187         std::string ReadSerial( uint16_t PortId );
00188         
00195         void WriteSerial( uint16_t PortId, const std::string & buffer );
00196 
00197     protected:
00198         Alta(const std::string & ioType,
00199              const std::string & DeviceAddr);
00200 
00201         void ExposureAndGetImgRC(uint16_t & r, uint16_t & c);
00202         uint16_t ExposureZ();
00203         uint16_t GetImageZ();
00204         uint16_t GetIlluminationMask();
00205         void CreateCamIo(const std::string & ioType,
00206             const std::string & DeviceAddr);
00207 
00208         void FixImgFromCamera( const std::vector<uint16_t> & data,
00209             std::vector<uint16_t> & out,  int32_t rows, int32_t cols);
00210 
00211     private:
00212         
00213         void VerifyCamId();
00214         void CfgCamFromId( uint16_t CameraId );
00215         uint16_t GetPixelShift();
00216 
00217         void Init12BitCcdAdc();
00218         void StopExposureImageReady( bool Digitize );
00219         void StopExposureModeTdiKinetics( bool Digitize );
00220         
00221         bool IsSerialPortOpen( uint16_t PortId );
00222         const std::string m_fileName;
00223 
00224 
00225         std::map<uint16_t , bool> m_serialPortOpenStatus;
00226         
00227         //disabling the copy ctor and assignment operator
00228         //generated by the compiler - don't want them
00229         //Effective C++ Item 6
00230         Alta(const Alta&);
00231         Alta& operator=(Alta&);
00232 }; 
00233 
00234 #endif