77 return d->channelNumber;
99 return d->deviceNumber;
110 return d->transmissionType;
121 return d->deviceIndex;
196 , channelNumber(0xFF)
197 , deviceType(static_cast<
quint8z>(-1))
199 , transmissionType(static_cast<
quint8z>(-1))
216 const int fieldId,
const QByteArray &data,
const FitBaseType baseType,
const bool bigEndian)
220 if (!
verify(data, baseType, 1, FitBaseType::Uint8,
"ant_channel_id.channelNumber"))
return false;
224 if (!
verify(data, baseType, 1, FitBaseType::Uint8z,
"ant_channel_id.deviceType"))
return false;
228 if (!
verify(data, baseType, 2, FitBaseType::Uint16z,
"ant_channel_id.deviceNumber"))
return false;
229 this->
deviceNumber =
static_cast<quint16z>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
232 if (!
verify(data, baseType, 1, FitBaseType::Uint8z,
"ant_channel_id.transmissionType"))
return false;
236 if (!
verify(data, baseType, 1, FitBaseType::Uint8,
"ant_channel_id.deviceIndex"))
return false;
240 qWarning() <<
"ignoring unknown ant_channel_id 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 AntChannelIdMessage class.
Declares the AntChannelIdMessagePrivate 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.
DeviceIndex deviceIndex
The AntChannelIdMessage FIT message's deviceIndex field.
quint16z deviceNumber
The AntChannelIdMessage FIT message's deviceNumber field.
quint8 channelNumber
The AntChannelIdMessage FIT message's channelNumber field.
bool setField(const int fieldId, const QByteArray &data, const FitBaseType baseType, const bool bigEndian) override
virtual ~AntChannelIdMessagePrivate()
quint8z transmissionType
The AntChannelIdMessage FIT message's transmissionType field.
quint8z deviceType
The AntChannelIdMessage FIT message's deviceType field.
The AntChannelIdMessage class represents a FIT AntChannelIdMessage data message.
void setDeviceType(const quint8z deviceType)
Sets the deviceType field to deviceType.
quint8z deviceType() const
Returns the AntChannelIdMessage data message's deviceType field's current value.
quint8 channelNumber() const
Returns the AntChannelIdMessage data message's channelNumber field's current value.
void setChannelNumber(const quint8 channelNumber)
Sets the channelNumber field to channelNumber.
DeviceIndex deviceIndex() const
Returns the AntChannelIdMessage data message's deviceIndex field's current value.
void setDeviceNumber(const quint16z deviceNumber)
Sets the deviceNumber field to deviceNumber.
AntChannelIdMessage()
Constructs a AntChannelIdMessage object.
void setTransmissionType(const quint8z transmissionType)
Sets the transmissionType field to transmissionType.
quint16z deviceNumber() const
Returns the AntChannelIdMessage data message's deviceNumber field's current value.
quint8z transmissionType() const
Returns the AntChannelIdMessage data message's transmissionType field's current value.
void setDeviceIndex(const DeviceIndex deviceIndex)
Sets the deviceIndex field to deviceIndex.
DeviceIndex
Garmin FIT DeviceIndex type.
FitBaseType
Garmin FIT FitBaseType type.
quint16 quint16z
16-bit unsigned integer, with 0-is-invalid semantics.
QTFIT_BEGIN_NAMESPACE typedef quint8 quint8z
8-bit unsigned integer, with 0-is-invalid semantics.