88 return d->fractionalTimestamp;
110 return d->filteredBpm;
121 return d->eventTimestamp;
132 return d->eventTimestamp12;
217 , timestamp(static_cast<
DateTime>(-1))
218 , fractionalTimestamp(0xFFFF)
221 , eventTimestamp(0xFFFFFFFF)
222 , eventTimestamp12(0xFF)
238 const int fieldId,
const QByteArray &data,
const FitBaseType baseType,
const bool bigEndian)
242 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"hr.timestamp"))
return false;
243 this->
timestamp =
static_cast<DateTime>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
246 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"hr.fractionalTimestamp"))
return false;
247 this->
fractionalTimestamp =
static_cast<quint16
>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
250 if (!
verify(data, baseType, 1, FitBaseType::Uint8,
"hr.time256"))
return false;
251 this->
time256 =
static_cast<quint8
>(data.at(0));
254 if (!
verify(data, baseType, 1, FitBaseType::Uint8,
"hr.filteredBpm"))
return false;
255 this->
filteredBpm =
static_cast<quint8
>(data.at(0));
258 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"hr.eventTimestamp"))
return false;
259 this->
eventTimestamp =
static_cast<quint32
>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
262 if (!
verify(data, baseType, 1, FitBaseType::Byte,
"hr.eventTimestamp12"))
return false;
266 qWarning() <<
"ignoring unknown hr 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.
quint8 filteredBpm
The HrMessage FIT message's filteredBpm field.
virtual ~HrMessagePrivate()
quint8 time256
The HrMessage FIT message's time256 field.
quint8 eventTimestamp12
The HrMessage FIT message's eventTimestamp12 field.
DateTime timestamp
The HrMessage FIT message's timestamp field.
quint32 eventTimestamp
The HrMessage FIT message's eventTimestamp field.
bool setField(const int fieldId, const QByteArray &data, const FitBaseType baseType, const bool bigEndian) override
quint16 fractionalTimestamp
The HrMessage FIT message's fractionalTimestamp field.
The HrMessage class represents a FIT HrMessage data message.
quint8 eventTimestamp12() const
Returns the HrMessage data message's eventTimestamp12 field's current value.
void setEventTimestamp12(const quint8 eventTimestamp12)
Sets the eventTimestamp12 field to eventTimestamp12.
void setEventTimestamp(const quint32 eventTimestamp)
Sets the eventTimestamp field to eventTimestamp.
quint8 filteredBpm() const
Returns the HrMessage data message's filteredBpm field's current value.
DateTime timestamp() const
Returns the HrMessage data message's timestamp field's current value.
void setTimestamp(const DateTime timestamp)
Sets the timestamp field to timestamp.
quint32 eventTimestamp() const
Returns the HrMessage data message's eventTimestamp field's current value.
quint8 time256() const
Returns the HrMessage data message's time256 field's current value.
void setFilteredBpm(const quint8 filteredBpm)
Sets the filteredBpm field to filteredBpm.
void setTime256(const quint8 time256)
Sets the time256 field to time256.
HrMessage()
Constructs a HrMessage object.
void setFractionalTimestamp(const quint16 fractionalTimestamp)
Sets the fractionalTimestamp field to fractionalTimestamp.
quint16 fractionalTimestamp() const
Returns the HrMessage data message's fractionalTimestamp field's current value.
Declares the HrMessage class.
Declares the HrMessagePrivate class.
FitBaseType
Garmin FIT FitBaseType type.
DateTime
Seconds since UTC 00:00 Dec 31 1989.