libapogee  3.0.3234
CameraInfo.h
1 
12 #ifndef CAMERAMODEL_INCLUDE_H__
13 #define CAMERAMODEL_INCLUDE_H__
14 
15 #include <string>
16 #include <vector>
17 #include <stdint.h>
18 #include "DefDllExport.h"
19 
20 namespace CamInfo
21 {
22  struct DLL_EXPORT StrDb {
23  std::string FactorySn;
24  std::string CustomerSn;
25  std::string Id;
26  std::string Platform;
27  std::string PartNum;
28  std::string Ccd;
29  std::string CcdSn;
30  std::string CcdGrade;
31  std::string ProcBoardRev;
32  std::string DriveBoardRev;
33  std::string Shutter;
34  std::string WindowType;
35  std::string MechCfg;
36  std::string MechRev;
37  std::string CoolingType;
38  std::string FinishFront;
39  std::string FinishBack;
40  std::string MpiRev;
41  std::string TestDate;
42  std::string TestedBy;
43  std::string TestedDllRev;
44  std::string TestedFwRev;
45  std::string Gain;
46  std::string Noise;
47  std::string Bias;
48  std::string TestTemp;
49  std::string DarkCount;
50  std::string DarkDuration;
51  std::string DarkTemp;
52  std::string CoolingDelta;
53  std::string Ad1Offset;
54  std::string Ad1Gain;
55  std::string Ad2Offset;
56  std::string Ad2Gain;
57  std::string Rma1;
58  std::string Rma2;
59  std::string Comment1;
60  std::string Comment2;
61  std::string Comment3;
62  };
63 
64  std::vector< std::string > DLL_EXPORT MkStrVectFromStrDb( const CamInfo::StrDb & DbStruct );
65  CamInfo::StrDb DLL_EXPORT MkStrDbFromStrVect( const std::vector< std::string > & strVect );
66  CamInfo::StrDb DLL_EXPORT GetNoOpDb();
67 
68  const uint32_t NET_MAGIC_VALID = 0x63626160;
69  struct DLL_EXPORT NetDb {
70  uint32_t Magic; // 0x63626160 when struct is valid
71  uint8_t IP[4]; // IP address
72  uint8_t Gateway[4]; // Gateway
73  uint8_t Netmask[4]; // mask
74  uint8_t Port[2]; // Webserver port
75  uint8_t Flags[4]; // flag[0].0 DHCP enable
76  uint8_t MAC[6]; // MAC
77  uint32_t Timeout; // session timeout (minutes)
78  };
79  std::vector< uint8_t > DLL_EXPORT MkU8VectFromNetDb( const CamInfo::NetDb & DbStruct );
80  CamInfo::NetDb DLL_EXPORT MkNetDbFromU8Vect( const std::vector< uint8_t > & u8Vect );
81 
82 }
83 
88 namespace CamModel
89 {
91  enum DLL_EXPORT InterfaceType {
93  UNKNOWN_INTERFACE,
95  USB,
97  ETHERNET
98  };
99 
101  enum DLL_EXPORT PlatformType {
103  UNKNOWN_PLATFORM,
105  ALTAU,
107  ALTAE,
109  ASCENT,
111  ASPEN,
113  HIC,
115  ALTAF,
117  QUAD
118  };
119 
120  bool DLL_EXPORT IsAlta(uint16_t FirmwareRev);
121  bool DLL_EXPORT IsGen2Platform(uint16_t FirmwareRev);
122  bool DLL_EXPORT IsFirmwareRevGood( uint16_t FirmwareRev );
123 
124  uint16_t DLL_EXPORT MaskRawId( uint16_t FirmwareRev,
125  uint16_t CamId);
126 
127 
128  CamModel::PlatformType DLL_EXPORT GetPlatformType( uint16_t FixedId, bool IsEthernet=false );
129  CamModel::PlatformType DLL_EXPORT GetPlatformType( const std::string & cameraLine );
130  std::string DLL_EXPORT GetPlatformStr(uint16_t FixedId, bool IsEthernet=false);
131  std::string DLL_EXPORT GetModelStr( uint16_t CamId );
132  std::string DLL_EXPORT GetNoOpFirmwareRev();
133 
134  // Used to derive camera platform type from camera ID
135  const uint16_t FIRMWARE_PLATFORM_MASK = 0xFF00;
136  const uint16_t MAX_ALTA_FIRMWARE_REV = 0x0064;
137  const uint16_t MIN_GEN2_FIRMWARE = 0x0064;
138  const uint16_t MAX_GEN2_FIRMWARE = 0x0400;
139 
140 
141  const uint16_t ALTA_CAMERA_ID_MASK = 0x007F;
142  const uint16_t GEN2_CAMERA_ID_MASK = 0x01FF;
143 
144 
145  const uint16_t NO_OP_FRMWR_REV = 0x0;
146 }
147 
152 namespace Apg
153 {
155  enum DLL_EXPORT Status
156  {
185  };
186 
188  enum DLL_EXPORT CameraMode
189  {
224  };
225 
227  enum DLL_EXPORT Resolution
228  {
230  Resolution_SixteenBit = 0,
232  Resolution_TwelveBit = 1
233  };
234 
235 
237  enum DLL_EXPORT AdcSpeed
238  {
240  AdcSpeed_Unknown,
242  AdcSpeed_Normal,
244  AdcSpeed_Fast,
246  AdcSpeed_Video
247  };
248 
250  enum DLL_EXPORT CoolerStatus
251  {
252  CoolerStatus_Off = 0,
254  CoolerStatus_RampingToSetPoint = 1,
256  CoolerStatus_AtSetPoint = 2,
258  CoolerStatus_Revision = 3,
260  CoolerStatus_Suspended = 4
261  };
262 
264  enum DLL_EXPORT FanMode
265  {
276  };
277 
279  enum DLL_EXPORT LedState
280  {
281  LedState_Expose = 0,
283  LedState_ImageActive = 1,
285  LedState_Flushing = 2,
287  LedState_ExtTriggerWaiting = 3,
289  LedState_ExtTriggerReceived = 4,
291  LedState_ExtShutterInput = 5,
293  LedState_ExtStartReadout = 6,
295  LedState_AtTemp = 7,
297  LedState_Unknown = 8
298  };
299 
301  enum DLL_EXPORT LedMode
302  {
304  LedMode_DisableAll = 0,
306  LedMode_DisableWhileExpose = 1,
308  LedMode_EnableAll = 2,
310  LedMode_Unknown = 3
311  };
312 
314  enum DLL_EXPORT TriggerMode
315  {
317  TriggerMode_Unknown,
319  TriggerMode_Normal,
321  TriggerMode_TdiKinetics,
323  TriggerMode_ExternalShutter,
325  TriggerMode_ExternalReadoutIo
326  };
327 
329  enum DLL_EXPORT TriggerType
330  {
332  TriggerType_Unkown,
334  TriggerType_Each,
336  TriggerType_Group
337  };
338 
340  enum DLL_EXPORT ShutterState
341  {
350  };
351 
355  enum DLL_EXPORT ErrorType
356  {
373 
374  };
375 
377  enum DLL_EXPORT SerialParity
378  {
387  };
388 
390  enum DLL_EXPORT SerialFC
391  {
398  };
399 
400 }
401 
402 #endif
Definition: CameraInfo.h:168
Definition: CameraInfo.h:393
Definition: CameraInfo.h:267
Definition: CameraInfo.h:366
Definition: CameraInfo.h:370
Definition: CameraInfo.h:209
SerialFC
Definition: CameraInfo.h:390
Definition: CameraInfo.h:345
Definition: CameraInfo.h:269
Definition: CameraInfo.h:380
Definition: CameraInfo.h:364
Definition: CameraInfo.h:368
FanMode
Definition: CameraInfo.h:264
Definition: CameraInfo.h:275
Definition: CameraInfo.h:161
Definition: CameraInfo.h:176
Definition: CameraInfo.h:271
Definition: CameraInfo.h:219
Definition: CameraInfo.h:347
Definition: CameraInfo.h:69
Definition: CameraInfo.h:182
Definition: CameraInfo.h:223
Definition: CameraInfo.h:386
Definition: CameraInfo.h:194
Definition: CameraInfo.h:203
SerialParity
Definition: CameraInfo.h:377
Definition: CameraInfo.h:184
Definition: CameraInfo.h:343
Definition: CameraInfo.h:213
Definition: CameraInfo.h:165
ShutterState
Definition: CameraInfo.h:340
Definition: CameraInfo.h:273
Definition: CameraInfo.h:384
Definition: CameraInfo.h:22
Definition: CameraInfo.h:358
Definition: CameraInfo.h:382
Definition: CameraInfo.h:397
Definition: CameraInfo.h:200
CameraMode
Definition: CameraInfo.h:188
Definition: CameraInfo.h:362
Definition: CameraInfo.h:173
Definition: CameraInfo.h:171
Definition: CameraInfo.h:395
Definition: CameraInfo.h:349
Definition: CameraInfo.h:372
Namespace the support decoding camera model names from raw input data.
Definition: CameraInfo.h:20
Definition: CameraInfo.h:180
ErrorType
Definition: CameraInfo.h:355
Status
Definition: CameraInfo.h:155