00001
00012 #ifndef CAMERAMODEL_INCLUDE_H__
00013 #define CAMERAMODEL_INCLUDE_H__
00014
00015 #include <string>
00016 #include <vector>
00017 #include <stdint.h>
00018 #include "DefDllExport.h"
00019
00020 namespace CamInfo
00021 {
00022 struct DLL_EXPORT StrDb {
00023 std::string FactorySn;
00024 std::string CustomerSn;
00025 std::string Id;
00026 std::string Platform;
00027 std::string PartNum;
00028 std::string Ccd;
00029 std::string CcdSn;
00030 std::string CcdGrade;
00031 std::string ProcBoardRev;
00032 std::string DriveBoardRev;
00033 std::string Shutter;
00034 std::string WindowType;
00035 std::string MechCfg;
00036 std::string MechRev;
00037 std::string CoolingType;
00038 std::string FinishFront;
00039 std::string FinishBack;
00040 std::string MpiRev;
00041 std::string TestDate;
00042 std::string TestedBy;
00043 std::string TestedDllRev;
00044 std::string TestedFwRev;
00045 std::string Gain;
00046 std::string Noise;
00047 std::string Bias;
00048 std::string TestTemp;
00049 std::string DarkCount;
00050 std::string DarkDuration;
00051 std::string DarkTemp;
00052 std::string CoolingDelta;
00053 std::string Ad1Offset;
00054 std::string Ad1Gain;
00055 std::string Ad2Offset;
00056 std::string Ad2Gain;
00057 std::string Rma1;
00058 std::string Rma2;
00059 std::string Comment1;
00060 std::string Comment2;
00061 std::string Comment3;
00062 };
00063
00064 std::vector< std::string > DLL_EXPORT MkStrVectFromStrDb( const CamInfo::StrDb & DbStruct );
00065 CamInfo::StrDb DLL_EXPORT MkStrDbFromStrVect( const std::vector< std::string > & strVect );
00066 CamInfo::StrDb DLL_EXPORT GetNoOpDb();
00067
00068 }
00069
00074 namespace CamModel
00075 {
00077 enum DLL_EXPORT InterfaceType {
00079 UNKNOWN_INTERFACE,
00081 USB,
00083 ETHERNET
00084 };
00085
00087 enum DLL_EXPORT PlatformType {
00089 UNKNOWN_PLATFORM,
00091 ALTAU,
00093 ALTAE,
00095 ASCENT,
00097 GEE,
00099 HIC,
00101 ALTAF,
00103 QUAD
00104 };
00105
00106 bool DLL_EXPORT IsAlta(uint16_t FirmwareRev);
00107 bool DLL_EXPORT IsGen2Platform(uint16_t FirmwareRev);
00108 bool DLL_EXPORT IsFirmwareRevGood( uint16_t FirmwareRev );
00109
00110 uint16_t DLL_EXPORT MaskRawId( uint16_t FirmwareRev,
00111 uint16_t CamId);
00112
00113
00114 CamModel::PlatformType DLL_EXPORT GetPlatformType( uint16_t FixedId, bool IsEthernet=false );
00115 CamModel::PlatformType DLL_EXPORT GetPlatformType( const std::string & cameraLine );
00116 std::string DLL_EXPORT GetPlatformStr(uint16_t FixedId, bool IsEthernet=false);
00117 std::string DLL_EXPORT GetModelStr( uint16_t CamId );
00118 std::string DLL_EXPORT GetNoOpFirmwareRev();
00119
00120
00121 const uint16_t FIRMWARE_PLATFORM_MASK = 0xFF00;
00122 const uint16_t MAX_ALTA_FIRMWARE_REV = 0x0064;
00123 const uint16_t MIN_GEN2_FIRMWARE = 0x0064;
00124 const uint16_t MAX_GEN2_FIRMWARE = 0x0400;
00125
00126
00127 const uint16_t ALTA_CAMERA_ID_MASK = 0x007F;
00128 const uint16_t GEN2_CAMERA_ID_MASK = 0x01FF;
00129
00130
00131 const uint16_t NO_OP_FRMWR_REV = 0x0;
00132 }
00133
00138 namespace Apg
00139 {
00141 enum DLL_EXPORT Status
00142 {
00147 Status_ConnectionError = -3,
00151 Status_DataError = -2,
00154 Status_PatternError = -1,
00157 Status_Idle = 0,
00159 Status_Exposing = 1,
00162 Status_ImagingActive = 2,
00166 Status_ImageReady = 3,
00168 Status_Flushing = 4,
00170 Status_WaitingOnTrigger = 5
00171 };
00172
00174 enum DLL_EXPORT CameraMode
00175 {
00180 CameraMode_Normal = 0,
00186 CameraMode_TDI = 1,
00189 CameraMode_Test = 2,
00195 CameraMode_ExternalTrigger = 3,
00199 CameraMode_ExternalShutter = 4,
00205 CameraMode_Kinetics = 5,
00209 CameraMode_Unknown = 6
00210 };
00211
00213 enum DLL_EXPORT Resolution
00214 {
00216 Resolution_SixteenBit = 0,
00218 Resolution_TwelveBit = 1
00219 };
00220
00221
00223 enum DLL_EXPORT AdcSpeed
00224 {
00226 AdcSpeed_Unknown,
00228 AdcSpeed_Normal,
00230 AdcSpeed_Fast,
00232 AdcSpeed_Video
00233 };
00234
00236 enum DLL_EXPORT CoolerStatus
00237 {
00238 CoolerStatus_Off = 0,
00240 CoolerStatus_RampingToSetPoint = 1,
00242 CoolerStatus_AtSetPoint = 2,
00244 CoolerStatus_Revision = 3,
00246 CoolerStatus_Suspended = 4
00247 };
00248
00250 enum DLL_EXPORT FanMode
00251 {
00253 FanMode_Off = 0,
00255 FanMode_Low = 1,
00257 FanMode_Medium = 2,
00259 FanMode_High = 3,
00261 FanMode_Unknown = 4
00262 };
00263
00265 enum DLL_EXPORT LedState
00266 {
00267 LedState_Expose = 0,
00269 LedState_ImageActive = 1,
00271 LedState_Flushing = 2,
00273 LedState_ExtTriggerWaiting = 3,
00275 LedState_ExtTriggerReceived = 4,
00277 LedState_ExtShutterInput = 5,
00279 LedState_ExtStartReadout = 6,
00281 LedState_AtTemp = 7,
00283 LedState_Unknown = 8
00284 };
00285
00287 enum DLL_EXPORT LedMode
00288 {
00290 LedMode_DisableAll = 0,
00292 LedMode_DisableWhileExpose = 1,
00294 LedMode_EnableAll = 2,
00296 LedMode_Unknown = 3
00297 };
00298
00300 enum DLL_EXPORT TriggerMode
00301 {
00303 TriggerMode_Unknown,
00305 TriggerMode_Normal,
00307 TriggerMode_TdiKinetics,
00309 TriggerMode_ExternalShutter,
00311 TriggerMode_ExternalReadoutIo
00312 };
00313
00315 enum DLL_EXPORT TriggerType
00316 {
00318 TriggerType_Unkown,
00320 TriggerType_Each,
00322 TriggerType_Group
00323 };
00324
00326 enum DLL_EXPORT ShutterState
00327 {
00329 ShutterState_Unkown,
00331 ShutterState_Normal,
00333 ShutterState_ForceOpen,
00335 ShutterState_ForceClosed
00336 };
00337
00341 enum DLL_EXPORT ErrorType
00342 {
00344 ErrorType_Connection = 0,
00348 ErrorType_Critical = 1,
00350 ErrorType_Serious = 2,
00352 ErrorType_Configuration,
00354 ErrorType_InvalidMode,
00356 ErrorType_InvalidOperation,
00358 ErrorType_InvalidUsage
00359
00360 };
00361
00362 }
00363
00364 #endif