QtFit  0.1
Internal library development documentation
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
VideoFrameMessagePrivate Class Reference
Inheritance diagram for VideoFrameMessagePrivate:
[legend]
Collaboration diagram for VideoFrameMessagePrivate:
[legend]

Public Member Functions

 VideoFrameMessagePrivate (VideoFrameMessage *const q)
 
virtual ~VideoFrameMessagePrivate ()
 
- Public Member Functions inherited from AbstractDataMessagePrivate
 AbstractDataMessagePrivate (AbstractDataMessage *const q)
 
virtual ~AbstractDataMessagePrivate ()
 
bool setFields (const DataDefinition *const defn, const QByteArray &record)
 

Public Attributes

DateTime timestamp
 The VideoFrameMessage FIT message's timestamp field. More...
 
quint16 timestampMs
 The VideoFrameMessage FIT message's timestampMs field. More...
 
quint32 frameNumber
 The VideoFrameMessage FIT message's frameNumber field. More...
 
- Public Attributes inherited from AbstractDataMessagePrivate
MesgNum globalMessageNumber
 FIT Globla Message Number for this FIT Data Message.
 

Protected Member Functions

bool setField (const int fieldId, const QByteArray &data, const FitBaseType baseType, const bool bigEndian) override
 
- Protected Member Functions inherited from AbstractDataMessagePrivate
bool verify (const QByteArray &data, const FitBaseType actualType, const int expectedSize, const FitBaseType expectedType, const char *messageFieldName)
 

Additional Inherited Members

- Protected Attributes inherited from AbstractDataMessagePrivate
AbstractDataMessage *const q_ptr
 Internal q-pointer.
 

Detailed Description

The VideoFrameMessagePrivate class provides private implementation for the VideoFrameMessage.

See also
VideoFrameMessage

Definition at line 38 of file videoframemessage_p.h.

Constructor & Destructor Documentation

◆ VideoFrameMessagePrivate()

VideoFrameMessagePrivate::VideoFrameMessagePrivate ( VideoFrameMessage *const  q)
explicit

Constructs a VideoFrameMessagePrivate object with public implementation q.

Parameters
qPointer to public implementaton.

Definition at line 158 of file videoframemessage.cpp.

160  , timestamp(static_cast<DateTime>(-1))
161  , timestampMs(0xFFFF)
162  , frameNumber(0xFFFFFFFF)
163 {
164  globalMessageNumber = MesgNum::VideoFrame;
165 }
MesgNum globalMessageNumber
FIT Globla Message Number for this FIT Data Message.
quint16 timestampMs
The VideoFrameMessage FIT message's timestampMs field.
DateTime timestamp
The VideoFrameMessage FIT message's timestamp field.
quint32 frameNumber
The VideoFrameMessage FIT message's frameNumber field.
DateTime
Seconds since UTC 00:00 Dec 31 1989.
Definition: types.h:237

References AbstractDataMessagePrivate::globalMessageNumber.

◆ ~VideoFrameMessagePrivate()

VideoFrameMessagePrivate::~VideoFrameMessagePrivate ( )
virtual

Destroys the VideoFrameMessagePrivate object.

Definition at line 172 of file videoframemessage.cpp.

173 {
174 
175 }

Member Function Documentation

◆ setField()

bool VideoFrameMessagePrivate::setField ( const int  fieldId,
const QByteArray &  data,
const FitBaseType  baseType,
const bool  bigEndian 
)
overrideprotectedvirtual

Sets the value of the fieldId field.

Derived classes must implement this method to extract the baseType value from data, and assign the extracted value the fieldId field.

Parameters
fieldIdThe field number within the given FIT data message.
dataThe raw data to extract the field value from.
baseTypeThe FIT base type for the field.
bigEndianWhether or not multibyte values in record are big-endian.
Returns
true if the field was set, or safely ignored; false otherwise.

Implements AbstractDataMessagePrivate.

Definition at line 177 of file videoframemessage.cpp.

179 {
180  switch (fieldId) {
181  case 253: // See Profile.xlsx::Messages:video_frame.timestamp
182  if (!verify(data, baseType, 4, FitBaseType::Uint32, "video_frame.timestamp")) return false;
183  this->timestamp = static_cast<DateTime>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
184  break;
185  case 0: // See Profile.xlsx::Messages:video_frame.timestampMs
186  if (!verify(data, baseType, 2, FitBaseType::Uint16, "video_frame.timestampMs")) return false;
187  this->timestampMs = static_cast<quint16>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
188  break;
189  case 1: // See Profile.xlsx::Messages:video_frame.frameNumber
190  if (!verify(data, baseType, 4, FitBaseType::Uint32, "video_frame.frameNumber")) return false;
191  this->frameNumber = static_cast<quint32>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
192  break;
193  default:
194  qWarning() << "ignoring unknown video_frame message field number" << fieldId << bigEndian;
195  // Fall through to return true, as its still 'safe' to continue parsing data messages.
196  }
197  return true;
198 }
bool verify(const QByteArray &data, const FitBaseType actualType, const int expectedSize, const FitBaseType expectedType, const char *messageFieldName)

References AbstractDataMessagePrivate::verify().

Here is the call graph for this function:

Member Data Documentation

◆ frameNumber

quint32 VideoFrameMessagePrivate::frameNumber

The VideoFrameMessage FIT message's frameNumber field.

Number of the frame that the timestamp and timestamp_ms correlate to

Definition at line 60 of file videoframemessage_p.h.

◆ timestamp

DateTime VideoFrameMessagePrivate::timestamp

The VideoFrameMessage FIT message's timestamp field.

Whole second part of the timestamp

Definition at line 46 of file videoframemessage_p.h.

◆ timestampMs

quint16 VideoFrameMessagePrivate::timestampMs

The VideoFrameMessage FIT message's timestampMs field.

Millisecond part of the timestamp.

Definition at line 53 of file videoframemessage_p.h.


The documentation for this class was generated from the following files: