DUNE: Uniform Navigational Environment  2019.02.0
Sensors::Imagenex837B::Frame Class Referenceabstract

Detailed Description

Data logger base frame for Imagenex files.

Public Types

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

 Frame (void)
 
virtual ~Frame (void)
 
uint8_t * getData (void)
 
virtual uint8_t * getMessageData (void)
 
virtual uint8_t * getFooterData (void)
 
virtual size_t getSize (void) const
 
virtual size_t getMessageSize (void) const
 
virtual size_t getFooterSize (void) const
 
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)
 
virtual void setExtendedDataPoints (bool mode)
 

Protected Member Functions

void setFrequency (void)
 
virtual unsigned getIndexRange (void)=0
 
virtual unsigned getIndexTiltAngle (void)=0
 
virtual unsigned getIndexLatitude (void)=0
 
virtual unsigned getIndexLongitude (void)=0
 
virtual unsigned getIndexSpeed (void)=0
 
virtual unsigned getIndexSoundSpeed (void)=0
 
virtual unsigned getIndexCourse (void)=0
 
virtual unsigned getIndexMilli (void)=0
 
virtual unsigned getIndexRoll (void)=0
 
virtual unsigned getIndexPitch (void)=0
 
virtual unsigned getIndexHeading (void)=0
 
virtual unsigned getIndexRepRate (void)=0
 
virtual unsigned getIndexFrequency (void)=0
 

Protected Attributes

std::vector< uint8_t > m_data
 

Member Enumeration Documentation

837 Footer Indices.

Enumerator
FTR_IDX_TYPE 
FTR_IDX_PITCH 
FTR_IDX_ROLL 
FTR_IDX_HEADING 
FTR_IDX_AZIMUTH_UP 

Common frame header indices. Default values for 837 frames.

Enumerator
HDR_IDX_TBYTES_HI 
HDR_IDX_TBYTES_LO 
HDR_IDX_DATE 
HDR_IDX_TIME 
HDR_IDX_TIME_HSEC 

Constructor & Destructor Documentation

Sensors::Imagenex837B::Frame::Frame ( void  )
inline

Constructor.

virtual Sensors::Imagenex837B::Frame::~Frame ( void  )
inlinevirtual

Destructor.

Member Function Documentation

uint8_t* Sensors::Imagenex837B::Frame::getData ( void  )
inline
virtual uint8_t* Sensors::Imagenex837B::Frame::getFooterData ( void  )
inlinevirtual

Get footer start address.

Returns
pointer to address.

Reimplemented in Sensors::Imagenex837B::Frame837.

Referenced by setHeading(), setPitch(), and setRoll().

virtual size_t Sensors::Imagenex837B::Frame::getFooterSize ( void  ) const
inlinevirtual

Retrieve footer size.

Returns
footer size.

Reimplemented in Sensors::Imagenex837B::Frame837.

virtual unsigned Sensors::Imagenex837B::Frame::getIndexCourse ( void  )
protectedpure virtual

Get course index.

Implemented in Sensors::Imagenex837B::Frame837, and Sensors::Imagenex837B::Frame83P.

Referenced by setCourse().

virtual unsigned Sensors::Imagenex837B::Frame::getIndexFrequency ( void  )
protectedpure virtual

Get frequency index.

Implemented in Sensors::Imagenex837B::Frame837, and Sensors::Imagenex837B::Frame83P.

Referenced by setFrequency().

virtual unsigned Sensors::Imagenex837B::Frame::getIndexHeading ( void  )
protectedpure virtual

Get heading index.

Implemented in Sensors::Imagenex837B::Frame837, and Sensors::Imagenex837B::Frame83P.

Referenced by setHeading().

virtual unsigned Sensors::Imagenex837B::Frame::getIndexLatitude ( void  )
protectedpure virtual

Get latitude index.

Implemented in Sensors::Imagenex837B::Frame837, and Sensors::Imagenex837B::Frame83P.

Referenced by setGpsData().

virtual unsigned Sensors::Imagenex837B::Frame::getIndexLongitude ( void  )
protectedpure virtual

Get longitude index.

Implemented in Sensors::Imagenex837B::Frame837, and Sensors::Imagenex837B::Frame83P.

Referenced by setGpsData().

virtual unsigned Sensors::Imagenex837B::Frame::getIndexMilli ( void  )
protectedpure virtual

Get milliseconds index.

Implemented in Sensors::Imagenex837B::Frame837, and Sensors::Imagenex837B::Frame83P.

Referenced by setDateTime().

virtual unsigned Sensors::Imagenex837B::Frame::getIndexPitch ( void  )
protectedpure virtual

Get pitch index.

Implemented in Sensors::Imagenex837B::Frame837, and Sensors::Imagenex837B::Frame83P.

Referenced by setPitch().

virtual unsigned Sensors::Imagenex837B::Frame::getIndexRange ( void  )
protectedpure virtual

Get range index.

Implemented in Sensors::Imagenex837B::Frame837, and Sensors::Imagenex837B::Frame83P.

Referenced by setRange().

virtual unsigned Sensors::Imagenex837B::Frame::getIndexRepRate ( void  )
protectedpure virtual

Get repetition rate index.

Implemented in Sensors::Imagenex837B::Frame837, and Sensors::Imagenex837B::Frame83P.

Referenced by setRepRate().

virtual unsigned Sensors::Imagenex837B::Frame::getIndexRoll ( void  )
protectedpure virtual

Get roll index.

Implemented in Sensors::Imagenex837B::Frame837, and Sensors::Imagenex837B::Frame83P.

Referenced by setRoll().

virtual unsigned Sensors::Imagenex837B::Frame::getIndexSoundSpeed ( void  )
protectedpure virtual

Get speed index.

Implemented in Sensors::Imagenex837B::Frame837, and Sensors::Imagenex837B::Frame83P.

Referenced by setSoundVelocity().

virtual unsigned Sensors::Imagenex837B::Frame::getIndexSpeed ( void  )
protectedpure virtual

Get speed index.

Implemented in Sensors::Imagenex837B::Frame837, and Sensors::Imagenex837B::Frame83P.

Referenced by setSpeed().

virtual unsigned Sensors::Imagenex837B::Frame::getIndexTiltAngle ( void  )
protectedpure virtual

Get tilt angle index.

Implemented in Sensors::Imagenex837B::Frame837, and Sensors::Imagenex837B::Frame83P.

Referenced by setProfileTiltAngle().

virtual uint8_t* Sensors::Imagenex837B::Frame::getMessageData ( void  )
inlinevirtual

Get data start address.

Returns
pointer to address.

Reimplemented in Sensors::Imagenex837B::Frame83P, and Sensors::Imagenex837B::Frame837.

virtual size_t Sensors::Imagenex837B::Frame::getMessageSize ( void  ) const
inlinevirtual

Retrieve message size.

Returns
message size.

Reimplemented in Sensors::Imagenex837B::Frame83P, and Sensors::Imagenex837B::Frame837.

virtual size_t Sensors::Imagenex837B::Frame::getSize ( void  ) const
inlinevirtual

Retrieve the size of the frame.

Returns
frame size.

Reimplemented in Sensors::Imagenex837B::Frame837, and Sensors::Imagenex837B::Frame83P.

void Sensors::Imagenex837B::Frame::setCourse ( float  course)
inline

Set GNSS ships course.

Parameters
[in]coursecourse.

References getData(), and getIndexCourse().

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

void Sensors::Imagenex837B::Frame::setDateTime ( uint64_t  now)
inline

Set frame date and time.

Parameters
[in]nowmillisecond since epoch.

References getIndexMilli(), HDR_IDX_DATE, HDR_IDX_TIME, HDR_IDX_TIME_HSEC, and m_data.

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

virtual void Sensors::Imagenex837B::Frame::setExtendedDataPoints ( bool  mode)
inlinevirtual

Change mode according with data points.

Reimplemented in Sensors::Imagenex837B::Frame837.

void Sensors::Imagenex837B::Frame::setFrequency ( void  )
inlineprotected

References getIndexFrequency(), and m_data.

void Sensors::Imagenex837B::Frame::setGpsData ( double  lat,
double  lon 
)
inline

Define frame GPS data.

Parameters
[in]latlatitude.
[in]lonlongitude.

References DUNE::Math::Angles::degrees(), getIndexLatitude(), getIndexLongitude(), m_data, and DUNE::Math::min().

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

void Sensors::Imagenex837B::Frame::setHeading ( float  heading)
inline

Set heading.

Parameters
[in]headingheading angle.

References FTR_IDX_HEADING, getData(), getFooterData(), and getIndexHeading().

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

void Sensors::Imagenex837B::Frame::setPitch ( float  pitch)
inline

Set pitch.

Parameters
[in]pitchpitch angle.

References FTR_IDX_PITCH, getData(), getFooterData(), and getIndexPitch().

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

void Sensors::Imagenex837B::Frame::setProfileTiltAngle ( float  angle)
inline

Set profile tilt angle.

Parameters
[in]angleprofile tilt angle.

References getData(), getIndexTiltAngle(), and m_data.

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

virtual void Sensors::Imagenex837B::Frame::setRange ( uint8_t  range)
inlinevirtual

Set sonar range.

Parameters
[in]rangerange.

References getIndexRange(), and m_data.

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

void Sensors::Imagenex837B::Frame::setRepRate ( uint16_t  rate)
inline

Set repetition rate.

Parameters
[in]raterepetition rate.

References getData(), and getIndexRepRate().

Referenced by Sensors::Imagenex837B::Frame837::setRepRate().

void Sensors::Imagenex837B::Frame::setRoll ( float  roll)
inline

Set roll.

Parameters
[in]rollroll angle.

References FTR_IDX_ROLL, getData(), getFooterData(), and getIndexRoll().

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

void Sensors::Imagenex837B::Frame::setSoundVelocity ( float  speed)
inline

Set sound velocity.

Parameters
[in]speedsound velocity.

References getData(), and getIndexSoundSpeed().

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

void Sensors::Imagenex837B::Frame::setSpeed ( float  speed)
inline

Set GNSS ships speed.

Parameters
[in]speedspeed.

References getIndexSpeed(), and m_data.

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

Member Data Documentation

Collaboration diagram for Sensors::Imagenex837B::Frame:
Collaboration graph