88 return d->fractionalTimestamp;
121 return d->channelNumber;
217 , timestamp(static_cast<
DateTime>(-1))
218 , fractionalTimestamp(0xFFFF)
221 , channelNumber(0xFF)
238 const int fieldId,
const QByteArray &data,
const FitBaseType baseType,
const bool bigEndian)
242 if (!
verify(
data, baseType, 4, FitBaseType::Uint32,
"ant_rx.timestamp"))
return false;
246 if (!
verify(
data, baseType, 2, FitBaseType::Uint16,
"ant_rx.fractionalTimestamp"))
return false;
250 if (!
verify(
data, baseType, 1, FitBaseType::Byte,
"ant_rx.mesgId"))
return false;
251 this->
mesgId =
static_cast<quint8
>(
data.at(0));
254 if (!
verify(
data, baseType, 1, FitBaseType::Byte,
"ant_rx.mesgData"))
return false;
258 if (!
verify(
data, baseType, 1, FitBaseType::Uint8,
"ant_rx.channelNumber"))
return false;
262 if (!
verify(
data, baseType, 1, FitBaseType::Byte,
"ant_rx.data"))
return false;
263 this->data =
static_cast<quint8
>(
data.at(0));
266 qWarning() <<
"ignoring unknown ant_rx 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).
Declares the AntRxMessage class.
Declares the AntRxMessagePrivate class.
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.
bool setField(const int fieldId, const QByteArray &data, const FitBaseType baseType, const bool bigEndian) override
quint16 fractionalTimestamp
The AntRxMessage FIT message's fractionalTimestamp field.
quint8 mesgData
The AntRxMessage FIT message's mesgData field.
quint8 channelNumber
The AntRxMessage FIT message's channelNumber field.
quint8 data
The AntRxMessage FIT message's data field.
quint8 mesgId
The AntRxMessage FIT message's mesgId field.
virtual ~AntRxMessagePrivate()
DateTime timestamp
The AntRxMessage FIT message's timestamp field.
The AntRxMessage class represents a FIT AntRxMessage data message.
void setMesgData(const quint8 mesgData)
Sets the mesgData field to mesgData.
void setData(const quint8 data)
Sets the data field to data.
quint8 mesgId() const
Returns the AntRxMessage data message's mesgId field's current value.
DateTime timestamp() const
Returns the AntRxMessage data message's timestamp field's current value.
void setFractionalTimestamp(const quint16 fractionalTimestamp)
Sets the fractionalTimestamp field to fractionalTimestamp.
void setChannelNumber(const quint8 channelNumber)
Sets the channelNumber field to channelNumber.
quint8 mesgData() const
Returns the AntRxMessage data message's mesgData field's current value.
quint8 data() const
Returns the AntRxMessage data message's data field's current value.
quint16 fractionalTimestamp() const
Returns the AntRxMessage data message's fractionalTimestamp field's current value.
AntRxMessage()
Constructs a AntRxMessage object.
void setTimestamp(const DateTime timestamp)
Sets the timestamp field to timestamp.
quint8 channelNumber() const
Returns the AntRxMessage data message's channelNumber field's current value.
void setMesgId(const quint8 mesgId)
Sets the mesgId field to mesgId.
FitBaseType
Garmin FIT FitBaseType type.
DateTime
Seconds since UTC 00:00 Dec 31 1989.