131 return d->userProfilePrimaryKey;
157 return d->defaultRaceLeader;
170 return d->deleteStatus;
183 return d->selectionType;
298 , sport(static_cast<
Sport>(-1))
299 , enabled(static_cast<bool>(-1))
300 , userProfilePrimaryKey(0xFFFFFFFF)
301 , deviceId(0xFFFFFFFF)
302 , defaultRaceLeader(0xFF)
320 const int fieldId,
const QByteArray &data,
const FitBaseType baseType,
const bool bigEndian)
324 if (!
verify(data, baseType, 1, FitBaseType::String,
"segment_id.name"))
return false;
325 this->
name = QString::fromUtf8(data);
328 if (!
verify(data, baseType, 1, FitBaseType::String,
"segment_id.uuid"))
return false;
329 this->
uuid = QString::fromUtf8(data);
332 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"segment_id.sport"))
return false;
336 if (!
verify(data, baseType, 0, FitBaseType::Byte,
"segment_id.enabled"))
return false;
337 this->
enabled =
static_cast<bool>(data.at(0));
340 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"segment_id.userProfilePrimaryKey"))
return false;
341 this->
userProfilePrimaryKey =
static_cast<quint32
>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
344 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"segment_id.deviceId"))
return false;
345 this->
deviceId =
static_cast<quint32
>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
348 if (!
verify(data, baseType, 1, FitBaseType::Uint8,
"segment_id.defaultRaceLeader"))
return false;
352 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"segment_id.deleteStatus"))
return false;
356 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"segment_id.selectionType"))
return false;
360 qWarning() <<
"ignoring unknown segment_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).
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.
SegmentSelectionType selectionType
The SegmentIdMessage FIT message's selectionType field.
quint32 userProfilePrimaryKey
The SegmentIdMessage FIT message's userProfilePrimaryKey field.
quint8 defaultRaceLeader
The SegmentIdMessage FIT message's defaultRaceLeader field.
QString uuid
The SegmentIdMessage FIT message's uuid field.
virtual ~SegmentIdMessagePrivate()
quint32 deviceId
The SegmentIdMessage FIT message's deviceId field.
bool setField(const int fieldId, const QByteArray &data, const FitBaseType baseType, const bool bigEndian) override
Sport sport
The SegmentIdMessage FIT message's sport field.
QString name
The SegmentIdMessage FIT message's name field.
bool enabled
The SegmentIdMessage FIT message's enabled field.
SegmentDeleteStatus deleteStatus
The SegmentIdMessage FIT message's deleteStatus field.
The SegmentIdMessage class represents a FIT SegmentIdMessage data message.
void setEnabled(const bool enabled)
Sets the enabled field to enabled.
SegmentDeleteStatus deleteStatus() const
Returns the SegmentIdMessage data message's deleteStatus field's current value.
quint32 userProfilePrimaryKey() const
Returns the SegmentIdMessage data message's userProfilePrimaryKey field's current value.
void setUuid(const QString uuid)
Sets the uuid field to uuid.
void setDeviceId(const quint32 deviceId)
Sets the deviceId field to deviceId.
void setSport(const Sport sport)
Sets the sport field to sport.
quint32 deviceId() const
Returns the SegmentIdMessage data message's deviceId field's current value.
QString name() const
Returns the SegmentIdMessage data message's name field's current value.
void setDefaultRaceLeader(const quint8 defaultRaceLeader)
Sets the defaultRaceLeader field to defaultRaceLeader.
SegmentSelectionType selectionType() const
Returns the SegmentIdMessage data message's selectionType field's current value.
void setUserProfilePrimaryKey(const quint32 userProfilePrimaryKey)
Sets the userProfilePrimaryKey field to userProfilePrimaryKey.
SegmentIdMessage()
Constructs a SegmentIdMessage object.
void setSelectionType(const SegmentSelectionType selectionType)
Sets the selectionType field to selectionType.
Sport sport() const
Returns the SegmentIdMessage data message's sport field's current value.
QString uuid() const
Returns the SegmentIdMessage data message's uuid field's current value.
bool enabled() const
Returns the SegmentIdMessage data message's enabled field's current value.
quint8 defaultRaceLeader() const
Returns the SegmentIdMessage data message's defaultRaceLeader field's current value.
void setDeleteStatus(const SegmentDeleteStatus deleteStatus)
Sets the deleteStatus field to deleteStatus.
void setName(const QString name)
Sets the name field to name.
Declares the SegmentIdMessage class.
Declares the SegmentIdMessagePrivate class.
SegmentDeleteStatus
Garmin FIT SegmentDeleteStatus type.
FitBaseType
Garmin FIT FitBaseType type.
Sport
Garmin FIT Sport type.
SegmentSelectionType
Garmin FIT SegmentSelectionType type.