92 return d->timestampMs;
105 return d->frameNumber;
160 , timestamp(static_cast<
DateTime>(-1))
161 , timestampMs(0xFFFF)
162 , frameNumber(0xFFFFFFFF)
178 const int fieldId,
const QByteArray &data,
const FitBaseType baseType,
const bool bigEndian)
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));
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));
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));
194 qWarning() <<
"ignoring unknown video_frame message field number" << fieldId << bigEndian;
#define QTFIT_END_NAMESPACE
Macro for ending the QtFit library's top-most namespace (if one is defined).
#define QTFIT_BEGIN_NAMESPACE
Macro for starting the QtFit library's top-most namespace (if one is defined).
MesgNum globalMessageNumber
FIT Globla Message Number for this FIT Data Message.
bool verify(const QByteArray &data, const FitBaseType actualType, const int expectedSize, const FitBaseType expectedType, const char *messageFieldName)
The AbstractDataMessage class is the polymorphic base class for all FIT Data Message classes.
quint16 timestampMs
The VideoFrameMessage FIT message's timestampMs field.
DateTime timestamp
The VideoFrameMessage FIT message's timestamp field.
virtual ~VideoFrameMessagePrivate()
bool setField(const int fieldId, const QByteArray &data, const FitBaseType baseType, const bool bigEndian) override
quint32 frameNumber
The VideoFrameMessage FIT message's frameNumber field.
The VideoFrameMessage class represents a FIT VideoFrameMessage data message.
quint16 timestampMs() const
Returns the VideoFrameMessage data message's timestampMs field's current value.
VideoFrameMessage()
Constructs a VideoFrameMessage object.
DateTime timestamp() const
Returns the VideoFrameMessage data message's timestamp field's current value.
void setTimestampMs(const quint16 timestampMs)
Sets the timestampMs field to timestampMs.
void setTimestamp(const DateTime timestamp)
Sets the timestamp field to timestamp.
void setFrameNumber(const quint32 frameNumber)
Sets the frameNumber field to frameNumber.
quint32 frameNumber() const
Returns the VideoFrameMessage data message's frameNumber field's current value.
FitBaseType
Garmin FIT FitBaseType type.
DateTime
Seconds since UTC 00:00 Dec 31 1989.
Declares the VideoFrameMessage class.
Declares the VideoFrameMessagePrivate class.