DUNE: Uniform Navigational Environment  2016.09.0
Sensors::Imagenex837B::Frame837 Class Reference

Detailed Description

Data logger to Imagenex .837 format.

Public Types

enum  HeaderIndices {
  HDR_IDX_N_TO_READ, HDR_IDX_BYTES_TO_READ_HI, HDR_IDX_BYTES_TO_READ_LO, HDR_IDX_VIDEO_FRAME,
  HDR_IDX_DISPLAY_MODE, HDR_IDX_START_GAIN, HDR_IDX_TILT_ANGLE, HDR_IDX_PINGS_AVG,
  HDR_IDX_PULSE_LENGTH, HDR_IDX_SOUND_SPEED, HDR_IDX_LATITUDE, HDR_IDX_LONGITUDE,
  HDR_IDX_SPEED, HDR_IDX_COURSE, HDR_IDX_FREQUENCY, HDR_IDX_PITCH,
  HDR_IDX_ROLL, HDR_IDX_HEADING, HDR_IDX_REP_RATE, HDR_IDX_DISPLAY_GAIN,
  HDR_IDX_MILLI, HDR_IDX_MODE_I, HDR_IDX_MODE_UV, HDR_IDX_MODE_X,
  HDR_IDX_HEAD_ID, HDR_IDX_SERIAL_STATUS, HDR_IDX_PACKET_NUM, HDR_IDX_VERSION,
  HDR_IDX_RANGE, HDR_IDX_DATA_BYTES_HI, HDR_IDX_DATA_BYTES_LO
}
 
- Public Types inherited from Sensors::Imagenex837B::Frame
enum  HeaderIndices {
  HDR_IDX_TBYTES_HI, HDR_IDX_TBYTES_LO, HDR_IDX_DATE, HDR_IDX_TIME,
  HDR_IDX_TIME_HSEC
}
 
enum  FooterIndices {
  FTR_IDX_TYPE, FTR_IDX_PITCH, FTR_IDX_ROLL, FTR_IDX_HEADING,
  FTR_IDX_AZIMUTH_UP
}
 

Public Member Functions

 Frame837 (void)
 
 ~Frame837 (void)
 
uint8_t * getMessageData (void)
 
uint8_t * getFooterData (void)
 
size_t getSize (void) const
 
size_t getMessageSize (void) const
 
size_t getFooterSize (void) const
 
void setTotalBytes (void)
 
void setBytesToRead (void)
 
void setExtendedDataPoints (bool mode)
 
void setStartGain (uint8_t gain)
 
void setPulseLength (uint8_t length)
 
void setDisplayMode (bool xdcr)
 
void setDisplayGain (uint8_t gain)
 
void setSerialStatus (uint8_t status)
 
void setFirmwareVersion (uint8_t version)
 
void setRepRate (void)
 
unsigned getIndexRange (void)
 
unsigned getIndexTiltAngle (void)
 
unsigned getIndexLatitude (void)
 
unsigned getIndexLongitude (void)
 
unsigned getIndexSpeed (void)
 
unsigned getIndexSoundSpeed (void)
 
unsigned getIndexCourse (void)
 
unsigned getIndexMilli (void)
 
unsigned getIndexRoll (void)
 
unsigned getIndexPitch (void)
 
unsigned getIndexHeading (void)
 
unsigned getIndexRepRate (void)
 
unsigned getIndexFrequency (void)
 
- Public Member Functions inherited from Sensors::Imagenex837B::Frame
 Frame (void)
 
virtual ~Frame (void)
 
uint8_t * getData (void)
 
virtual void setRange (uint8_t range)
 
void setProfileTiltAngle (float angle)
 
void setSoundVelocity (float speed)
 
void setSpeed (float speed)
 
void setCourse (float course)
 
void setRoll (float roll)
 
void setPitch (float pitch)
 
void setHeading (float heading)
 
void setRepRate (uint16_t rate)
 
void setGpsData (double lat, double lon)
 
void setDateTime (uint64_t now)
 

Additional Inherited Members

- Protected Member Functions inherited from Sensors::Imagenex837B::Frame
void setFrequency (void)
 
- Protected Attributes inherited from Sensors::Imagenex837B::Frame
std::vector< uint8_t > m_data
 

Member Enumeration Documentation

837 Header Indices.

Enumerator
HDR_IDX_N_TO_READ 
HDR_IDX_BYTES_TO_READ_HI 
HDR_IDX_BYTES_TO_READ_LO 
HDR_IDX_VIDEO_FRAME 
HDR_IDX_DISPLAY_MODE 
HDR_IDX_START_GAIN 
HDR_IDX_TILT_ANGLE 
HDR_IDX_PINGS_AVG 
HDR_IDX_PULSE_LENGTH 
HDR_IDX_SOUND_SPEED 
HDR_IDX_LATITUDE 
HDR_IDX_LONGITUDE 
HDR_IDX_SPEED 
HDR_IDX_COURSE 
HDR_IDX_FREQUENCY 
HDR_IDX_PITCH 
HDR_IDX_ROLL 
HDR_IDX_HEADING 
HDR_IDX_REP_RATE 
HDR_IDX_DISPLAY_GAIN 
HDR_IDX_MILLI 
HDR_IDX_MODE_I 
HDR_IDX_MODE_UV 
HDR_IDX_MODE_X 
HDR_IDX_HEAD_ID 
HDR_IDX_SERIAL_STATUS 
HDR_IDX_PACKET_NUM 
HDR_IDX_VERSION 
HDR_IDX_RANGE 
HDR_IDX_DATA_BYTES_HI 
HDR_IDX_DATA_BYTES_LO 

Constructor & Destructor Documentation

Sensors::Imagenex837B::Frame837::Frame837 ( void  )
inline

Constructor.

References Sensors::Imagenex837B::Frame::m_data.

Sensors::Imagenex837B::Frame837::~Frame837 ( void  )
inline

Destructor.

Member Function Documentation

uint8_t* Sensors::Imagenex837B::Frame837::getFooterData ( void  )
inlinevirtual

Get footer start address.

Returns
pointer to address.

Reimplemented from Sensors::Imagenex837B::Frame.

References getMessageSize(), and Sensors::Imagenex837B::Frame::m_data.

size_t Sensors::Imagenex837B::Frame837::getFooterSize ( void  ) const
inlinevirtual

Retrieve footer size.

Returns
footer size.

Reimplemented from Sensors::Imagenex837B::Frame.

Referenced by getSize().

unsigned Sensors::Imagenex837B::Frame837::getIndexCourse ( void  )
inlinevirtual

Get course index.

Implements Sensors::Imagenex837B::Frame.

References HDR_IDX_COURSE.

unsigned Sensors::Imagenex837B::Frame837::getIndexFrequency ( void  )
inlinevirtual

Get frequency index.

Implements Sensors::Imagenex837B::Frame.

References HDR_IDX_FREQUENCY.

unsigned Sensors::Imagenex837B::Frame837::getIndexHeading ( void  )
inlinevirtual

Get heading index.

Implements Sensors::Imagenex837B::Frame.

References HDR_IDX_HEADING.

unsigned Sensors::Imagenex837B::Frame837::getIndexLatitude ( void  )
inlinevirtual

Get latitude index.

Implements Sensors::Imagenex837B::Frame.

References HDR_IDX_LATITUDE.

unsigned Sensors::Imagenex837B::Frame837::getIndexLongitude ( void  )
inlinevirtual

Get longitude index.

Implements Sensors::Imagenex837B::Frame.

References HDR_IDX_LONGITUDE.

unsigned Sensors::Imagenex837B::Frame837::getIndexMilli ( void  )
inlinevirtual

Get milliseconds index.

Implements Sensors::Imagenex837B::Frame.

References HDR_IDX_MILLI.

unsigned Sensors::Imagenex837B::Frame837::getIndexPitch ( void  )
inlinevirtual

Get pitch index.

Implements Sensors::Imagenex837B::Frame.

References HDR_IDX_PITCH.

unsigned Sensors::Imagenex837B::Frame837::getIndexRange ( void  )
inlinevirtual

Get range index.

Implements Sensors::Imagenex837B::Frame.

References HDR_IDX_RANGE.

unsigned Sensors::Imagenex837B::Frame837::getIndexRepRate ( void  )
inlinevirtual

Get repetition rate index.

Implements Sensors::Imagenex837B::Frame.

References HDR_IDX_REP_RATE.

unsigned Sensors::Imagenex837B::Frame837::getIndexRoll ( void  )
inlinevirtual

Get roll index.

Implements Sensors::Imagenex837B::Frame.

References HDR_IDX_ROLL.

unsigned Sensors::Imagenex837B::Frame837::getIndexSoundSpeed ( void  )
inlinevirtual

Get speed index.

Implements Sensors::Imagenex837B::Frame.

References HDR_IDX_SOUND_SPEED.

unsigned Sensors::Imagenex837B::Frame837::getIndexSpeed ( void  )
inlinevirtual

Get speed index.

Implements Sensors::Imagenex837B::Frame.

References HDR_IDX_SPEED.

unsigned Sensors::Imagenex837B::Frame837::getIndexTiltAngle ( void  )
inlinevirtual

Get tilt angle index.

Implements Sensors::Imagenex837B::Frame.

References HDR_IDX_TILT_ANGLE.

uint8_t* Sensors::Imagenex837B::Frame837::getMessageData ( void  )
inlinevirtual

Get data start address.

Returns
pointer to address.

Reimplemented from Sensors::Imagenex837B::Frame.

References Sensors::Imagenex837B::Frame::m_data.

Referenced by Sensors::Imagenex837B::Task::ping().

size_t Sensors::Imagenex837B::Frame837::getMessageSize ( void  ) const
inlinevirtual

Retrieve message size.

Returns
message size.

Reimplemented from Sensors::Imagenex837B::Frame.

Referenced by getFooterData(), and getSize().

size_t Sensors::Imagenex837B::Frame837::getSize ( void  ) const
inlinevirtual

Retrieve the size of the frame.

Returns
frame size.

Reimplemented from Sensors::Imagenex837B::Frame.

References getFooterSize(), and getMessageSize().

Referenced by Sensors::Imagenex837B::Task::writeToFile().

void Sensors::Imagenex837B::Frame837::setBytesToRead ( void  )
inline

Define number of bytes to read in header.

References HDR_IDX_BYTES_TO_READ_HI, HDR_IDX_BYTES_TO_READ_LO, and Sensors::Imagenex837B::Frame::m_data.

Referenced by setExtendedDataPoints().

void Sensors::Imagenex837B::Frame837::setDisplayGain ( uint8_t  gain)
inline

Set display gain.

Parameters
[in]gaindisplay gain.

References HDR_IDX_DISPLAY_GAIN, and Sensors::Imagenex837B::Frame::m_data.

void Sensors::Imagenex837B::Frame837::setDisplayMode ( bool  xdcr)
inline

Set display mode.

Parameters
[in]xdcrdisplay mode.

References HDR_IDX_DISPLAY_MODE, and Sensors::Imagenex837B::Frame::m_data.

Referenced by Sensors::Imagenex837B::Task::setNadirAngle().

void Sensors::Imagenex837B::Frame837::setExtendedDataPoints ( bool  mode)
inlinevirtual

Change mode according with data points.

Reimplemented from Sensors::Imagenex837B::Frame.

References setBytesToRead(), and setTotalBytes().

Referenced by Sensors::Imagenex837B::Task::setDataPoints().

void Sensors::Imagenex837B::Frame837::setFirmwareVersion ( uint8_t  version)
inline
void Sensors::Imagenex837B::Frame837::setPulseLength ( uint8_t  length)
inline

Set pulse length.

Parameters
[in]lengthpulse length.

References HDR_IDX_PULSE_LENGTH, and Sensors::Imagenex837B::Frame::m_data.

Referenced by Sensors::Imagenex837B::Task::setRange().

void Sensors::Imagenex837B::Frame837::setRepRate ( void  )
inline

Set repetition rate using local Delta class.

References Sensors::Imagenex837B::Frame::setRepRate(), and DUNE::Math::trimValue().

Referenced by Sensors::Imagenex837B::Task::writeToFile().

void Sensors::Imagenex837B::Frame837::setSerialStatus ( uint8_t  status)
inline
void Sensors::Imagenex837B::Frame837::setStartGain ( uint8_t  gain)
inline

Set start gain.

Parameters
[in]gainstart gain.

References HDR_IDX_START_GAIN, and Sensors::Imagenex837B::Frame::m_data.

Referenced by Sensors::Imagenex837B::Task::setStartGain().

void Sensors::Imagenex837B::Frame837::setTotalBytes ( void  )
inline
Collaboration diagram for Sensors::Imagenex837B::Frame837:
Collaboration graph