00001 /****************************************************************************/ 00002 /* Copyright (c) 2008 MBARI */ 00003 /* MBARI Proprietary Information. All rights reserved. */ 00004 /****************************************************************************/ 00005 /* Summary : */ 00006 /* Filename : CameraDriver.h */ 00007 /* Author : */ 00008 /* Project : */ 00009 /* Version : 1.0 */ 00010 /* Created : 05/01/2008 */ 00011 /* Modified : */ 00012 /* Archived : */ 00013 /****************************************************************************/ 00014 /* Modification History: */ 00015 /****************************************************************************/ 00016 00017 #ifndef _Camera_H 00018 #define _Camera_H 00019 #include "SerialDeviceExt.h" 00020 #include "PeriodicTask.h" 00021 //#include "PolledSerialDriver.h" 00022 #include "CameraIF.h" 00023 #include "CameraLog.h" 00024 #include "CameraOutput.h" 00025 #include "NavigationIF.h" 00026 #include "XPort.h" 00027 #include "Bicam.h" 00028 00032 class Camera : public PeriodicTask { 00033 00035 friend class CameraLog; 00036 00037 public: 00038 00039 Camera(SerialDeviceExt *device, Boolean test=False); 00040 ~Camera(); 00041 00043 // Initialize device. Returned DeviceIF::Status 00044 // will be propagated to subscribers in other tasks. 00045 void initialize(); 00046 void readData(); 00047 00049 // Read a fixed-length record - use the default: 00050 00052 // Process device data record. Returned DeviceIF::Status 00053 // will be propagated to subscribers in other tasks. 00054 // [input] record: Record from device 00055 // [input] nRecordBytes: Bytes in record 00056 00057 00058 protected: 00060 SerialDeviceExt *_device; 00062 CameraLog *_log; 00064 CameraOutput *_output; 00066 NavigationIF *_navigationIF; 00068 NavigationIF::Position _position; 00070 NavigationIF::Attitude _attitude; 00074 XPort xport; 00076 BicamGPS camGPS; 00078 BicamTrigger camTrigger; 00079 00080 private: 00082 long _nPhotos; 00084 long _photoCntr; 00086 long _nSamplePeriods; 00088 long _samplePeriodCntr; 00090 double _distance; 00092 Boolean _first; 00094 double _dmg; 00096 double _dmgIncr; 00098 double _xLast; 00100 double _yLast; 00102 Boolean _running; 00104 Boolean _test; 00105 }; 00106 00107 #endif
1.5.4