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 const uint32_t NET_MAGIC_VALID = 0x63626160;
00069 struct DLL_EXPORT NetDb {
00070 uint32_t Magic;
00071 uint8_t IP[4];
00072 uint8_t Gateway[4];
00073 uint8_t Netmask[4];
00074 uint8_t Port[2];
00075 uint8_t Flags[4];
00076 uint8_t MAC[6];
00077 uint32_t Timeout;
00078 };
00079 std::vector< uint8_t > DLL_EXPORT MkU8VectFromNetDb( const CamInfo::NetDb & DbStruct );
00080 CamInfo::NetDb DLL_EXPORT MkNetDbFromU8Vect( const std::vector< uint8_t > & u8Vect );
00081
00082 }
00083
00088 namespace CamModel
00089 {
00091 enum DLL_EXPORT InterfaceType {
00093 UNKNOWN_INTERFACE,
00095 USB,
00097 ETHERNET
00098 };
00099
00101 enum DLL_EXPORT PlatformType {
00103 UNKNOWN_PLATFORM,
00105 ALTAU,
00107 ALTAE,
00109 ASCENT,
00111 ASPEN,
00113 HIC,
00115 ALTAF,
00117 QUAD
00118 };
00119
00120 bool DLL_EXPORT IsAlta(uint16_t FirmwareRev);
00121 bool DLL_EXPORT IsGen2Platform(uint16_t FirmwareRev);
00122 bool DLL_EXPORT IsFirmwareRevGood( uint16_t FirmwareRev );
00123
00124 uint16_t DLL_EXPORT MaskRawId( uint16_t FirmwareRev,
00125 uint16_t CamId);
00126
00127
00128 CamModel::PlatformType DLL_EXPORT GetPlatformType( uint16_t FixedId, bool IsEthernet=false );
00129 CamModel::PlatformType DLL_EXPORT GetPlatformType( const std::string & cameraLine );
00130 std::string DLL_EXPORT GetPlatformStr(uint16_t FixedId, bool IsEthernet=false);
00131 std::string DLL_EXPORT GetModelStr( uint16_t CamId );
00132 std::string DLL_EXPORT GetNoOpFirmwareRev();
00133
00134
00135 const uint16_t FIRMWARE_PLATFORM_MASK = 0xFF00;
00136 const uint16_t MAX_ALTA_FIRMWARE_REV = 0x0064;
00137 const uint16_t MIN_GEN2_FIRMWARE = 0x0064;
00138 const uint16_t MAX_GEN2_FIRMWARE = 0x0400;
00139
00140
00141 const uint16_t ALTA_CAMERA_ID_MASK = 0x007F;
00142 const uint16_t GEN2_CAMERA_ID_MASK = 0x01FF;
00143
00144
00145 const uint16_t NO_OP_FRMWR_REV = 0x0;
00146 }
00147
00152 namespace Apg
00153 {
00155 enum DLL_EXPORT Status
00156 {
00161 Status_ConnectionError = -3,
00165 Status_DataError = -2,
00168 Status_PatternError = -1,
00171 Status_Idle = 0,
00173 Status_Exposing = 1,
00176 Status_ImagingActive = 2,
00180 Status_ImageReady = 3,
00182 Status_Flushing = 4,
00184 Status_WaitingOnTrigger = 5
00185 };
00186
00188 enum DLL_EXPORT CameraMode
00189 {
00194 CameraMode_Normal = 0,
00200 CameraMode_TDI = 1,
00203 CameraMode_Test = 2,
00209 CameraMode_ExternalTrigger = 3,
00213 CameraMode_ExternalShutter = 4,
00219 CameraMode_Kinetics = 5,
00223 CameraMode_Unknown = 6
00224 };
00225
00227 enum DLL_EXPORT Resolution
00228 {
00230 Resolution_SixteenBit = 0,
00232 Resolution_TwelveBit = 1
00233 };
00234
00235
00237 enum DLL_EXPORT AdcSpeed
00238 {
00240 AdcSpeed_Unknown,
00242 AdcSpeed_Normal,
00244 AdcSpeed_Fast,
00246 AdcSpeed_Video
00247 };
00248
00250 enum DLL_EXPORT CoolerStatus
00251 {
00252 CoolerStatus_Off = 0,
00254 CoolerStatus_RampingToSetPoint = 1,
00256 CoolerStatus_AtSetPoint = 2,
00258 CoolerStatus_Revision = 3,
00260 CoolerStatus_Suspended = 4
00261 };
00262
00264 enum DLL_EXPORT FanMode
00265 {
00267 FanMode_Off = 0,
00269 FanMode_Low = 1,
00271 FanMode_Medium = 2,
00273 FanMode_High = 3,
00275 FanMode_Unknown = 4
00276 };
00277
00279 enum DLL_EXPORT LedState
00280 {
00281 LedState_Expose = 0,
00283 LedState_ImageActive = 1,
00285 LedState_Flushing = 2,
00287 LedState_ExtTriggerWaiting = 3,
00289 LedState_ExtTriggerReceived = 4,
00291 LedState_ExtShutterInput = 5,
00293 LedState_ExtStartReadout = 6,
00295 LedState_AtTemp = 7,
00297 LedState_Unknown = 8
00298 };
00299
00301 enum DLL_EXPORT LedMode
00302 {
00304 LedMode_DisableAll = 0,
00306 LedMode_DisableWhileExpose = 1,
00308 LedMode_EnableAll = 2,
00310 LedMode_Unknown = 3
00311 };
00312
00314 enum DLL_EXPORT TriggerMode
00315 {
00317 TriggerMode_Unknown,
00319 TriggerMode_Normal,
00321 TriggerMode_TdiKinetics,
00323 TriggerMode_ExternalShutter,
00325 TriggerMode_ExternalReadoutIo
00326 };
00327
00329 enum DLL_EXPORT TriggerType
00330 {
00332 TriggerType_Unkown,
00334 TriggerType_Each,
00336 TriggerType_Group
00337 };
00338
00340 enum DLL_EXPORT ShutterState
00341 {
00343 ShutterState_Unkown,
00345 ShutterState_Normal,
00347 ShutterState_ForceOpen,
00349 ShutterState_ForceClosed
00350 };
00351
00355 enum DLL_EXPORT ErrorType
00356 {
00358 ErrorType_Connection = 0,
00362 ErrorType_Critical = 1,
00364 ErrorType_Serious = 2,
00366 ErrorType_Configuration,
00368 ErrorType_InvalidMode,
00370 ErrorType_InvalidOperation,
00372 ErrorType_InvalidUsage
00373
00374 };
00375
00377 enum DLL_EXPORT SerialParity
00378 {
00380 SerialParity_Unknown = -1,
00382 SerialParity_None = 0,
00384 SerialParity_Odd = 1,
00386 SerialParity_Even = 2
00387 };
00388
00390 enum DLL_EXPORT SerialFC
00391 {
00393 SerialFC_Unknown = -1,
00395 SerialFC_Off = 0,
00397 SerialFC_On = 1
00398 };
00399
00400 }
00401
00402 #endif