79 return d->activeTimeZone;
105 return d->timeOffset;
131 return d->timeZoneOffset;
144 return d->backlightMode;
157 return d->activityTrackerEnabled;
183 return d->pagesEnabled;
196 return d->moveAlertEnabled;
220 return d->displayOrientation;
231 return d->mountingSide;
244 return d->defaultPage;
257 return d->autosyncMinSteps;
270 return d->autosyncMinTime;
283 return d->lactateThresholdAutodetectEnabled;
296 return d->bleAutoUploadEnabled;
309 return d->autoSyncFrequency;
322 return d->autoActivityDetect;
335 return d->numberOfScreens;
348 return d->smartNotificationDisplayOrientation;
359 return d->tapInterface;
372 return d->tapSensitivity;
637 , activeTimeZone(0xFF)
638 , utcOffset(0xFFFFFFFF)
639 , timeOffset(0xFFFFFFFF)
640 , timeMode(static_cast<
TimeMode>(-1))
641 , timeZoneOffset(0x7F)
643 , activityTrackerEnabled(static_cast<bool>(-1))
644 , clockTime(static_cast<
DateTime>(-1))
645 , pagesEnabled(0xFFFF)
646 , moveAlertEnabled(static_cast<bool>(-1))
647 , dateMode(static_cast<
DateMode>(-1))
649 , mountingSide(static_cast<
Side>(-1))
650 , defaultPage(0xFFFF)
651 , autosyncMinSteps(0xFFFF)
652 , autosyncMinTime(0xFFFF)
653 , lactateThresholdAutodetectEnabled(static_cast<bool>(-1))
654 , bleAutoUploadEnabled(static_cast<bool>(-1))
657 , numberOfScreens(0xFF)
659 , tapInterface(static_cast<
Switch>(-1))
676 const int fieldId,
const QByteArray &data,
const FitBaseType baseType,
const bool bigEndian)
680 if (!
verify(data, baseType, 1, FitBaseType::Uint8,
"device_settings.activeTimeZone"))
return false;
684 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"device_settings.utcOffset"))
return false;
685 this->
utcOffset =
static_cast<quint32
>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
688 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"device_settings.timeOffset"))
return false;
689 this->
timeOffset =
static_cast<quint32
>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
692 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"device_settings.timeMode"))
return false;
696 if (!
verify(data, baseType, 1, FitBaseType::Sint8,
"device_settings.timeZoneOffset"))
return false;
700 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"device_settings.backlightMode"))
return false;
704 if (!
verify(data, baseType, 0, FitBaseType::Byte,
"device_settings.activityTrackerEnabled"))
return false;
708 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"device_settings.clockTime"))
return false;
709 this->
clockTime =
static_cast<DateTime>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
712 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"device_settings.pagesEnabled"))
return false;
713 this->
pagesEnabled =
static_cast<quint16
>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
716 if (!
verify(data, baseType, 0, FitBaseType::Byte,
"device_settings.moveAlertEnabled"))
return false;
720 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"device_settings.dateMode"))
return false;
724 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"device_settings.displayOrientation"))
return false;
728 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"device_settings.mountingSide"))
return false;
732 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"device_settings.defaultPage"))
return false;
733 this->
defaultPage =
static_cast<quint16
>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
736 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"device_settings.autosyncMinSteps"))
return false;
737 this->
autosyncMinSteps =
static_cast<quint16
>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
740 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"device_settings.autosyncMinTime"))
return false;
741 this->
autosyncMinTime =
static_cast<quint16
>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
744 if (!
verify(data, baseType, 0, FitBaseType::Byte,
"device_settings.lactateThresholdAutodetectEnabled"))
return false;
748 if (!
verify(data, baseType, 0, FitBaseType::Byte,
"device_settings.bleAutoUploadEnabled"))
return false;
752 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"device_settings.autoSyncFrequency"))
return false;
756 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"device_settings.autoActivityDetect"))
return false;
760 if (!
verify(data, baseType, 1, FitBaseType::Uint8,
"device_settings.numberOfScreens"))
return false;
764 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"device_settings.smartNotificationDisplayOrientation"))
return false;
768 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"device_settings.tapInterface"))
return false;
772 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"device_settings.tapSensitivity"))
return false;
776 qWarning() <<
"ignoring unknown device_settings 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.
DateTime clockTime
The DeviceSettingsMessage FIT message's clockTime field.
bool setField(const int fieldId, const QByteArray &data, const FitBaseType baseType, const bool bigEndian) override
DisplayOrientation smartNotificationDisplayOrientation
The DeviceSettingsMessage FIT message's smartNotificationDisplayOrientation field.
quint32 utcOffset
The DeviceSettingsMessage FIT message's utcOffset field.
quint16 defaultPage
The DeviceSettingsMessage FIT message's defaultPage field.
bool activityTrackerEnabled
The DeviceSettingsMessage FIT message's activityTrackerEnabled field.
virtual ~DeviceSettingsMessagePrivate()
bool lactateThresholdAutodetectEnabled
The DeviceSettingsMessage FIT message's lactateThresholdAutodetectEnabled field.
qint8 timeZoneOffset
The DeviceSettingsMessage FIT message's timeZoneOffset field.
quint16 pagesEnabled
The DeviceSettingsMessage FIT message's pagesEnabled field.
DisplayOrientation displayOrientation
The DeviceSettingsMessage FIT message's displayOrientation field.
quint8 activeTimeZone
The DeviceSettingsMessage FIT message's activeTimeZone field.
quint16 autosyncMinSteps
The DeviceSettingsMessage FIT message's autosyncMinSteps field.
quint8 numberOfScreens
The DeviceSettingsMessage FIT message's numberOfScreens field.
AutoSyncFrequency autoSyncFrequency
The DeviceSettingsMessage FIT message's autoSyncFrequency field.
bool bleAutoUploadEnabled
The DeviceSettingsMessage FIT message's bleAutoUploadEnabled field.
Side mountingSide
The DeviceSettingsMessage FIT message's mountingSide field.
TapSensitivity tapSensitivity
The DeviceSettingsMessage FIT message's tapSensitivity field.
DateMode dateMode
The DeviceSettingsMessage FIT message's dateMode field.
quint32 timeOffset
The DeviceSettingsMessage FIT message's timeOffset field.
BacklightMode backlightMode
The DeviceSettingsMessage FIT message's backlightMode field.
Switch tapInterface
The DeviceSettingsMessage FIT message's tapInterface field.
quint16 autosyncMinTime
The DeviceSettingsMessage FIT message's autosyncMinTime field.
bool moveAlertEnabled
The DeviceSettingsMessage FIT message's moveAlertEnabled field.
TimeMode timeMode
The DeviceSettingsMessage FIT message's timeMode field.
AutoActivityDetect autoActivityDetect
The DeviceSettingsMessage FIT message's autoActivityDetect field.
The DeviceSettingsMessage class represents a FIT DeviceSettingsMessage data message.
void setTimeMode(const TimeMode timeMode)
Sets the timeMode field to timeMode.
quint16 autosyncMinTime() const
Returns the DeviceSettingsMessage data message's autosyncMinTime field's current value.
Side mountingSide() const
Returns the DeviceSettingsMessage data message's mountingSide field's current value.
BacklightMode backlightMode() const
Returns the DeviceSettingsMessage data message's backlightMode field's current value.
void setDateMode(const DateMode dateMode)
Sets the dateMode field to dateMode.
void setTimeZoneOffset(const qint8 timeZoneOffset)
Sets the timeZoneOffset field to timeZoneOffset.
DisplayOrientation smartNotificationDisplayOrientation() const
Returns the DeviceSettingsMessage data message's smartNotificationDisplayOrientation field's current ...
bool activityTrackerEnabled() const
Returns the DeviceSettingsMessage data message's activityTrackerEnabled field's current value.
DateMode dateMode() const
Returns the DeviceSettingsMessage data message's dateMode field's current value.
void setAutoSyncFrequency(const AutoSyncFrequency autoSyncFrequency)
Sets the autoSyncFrequency field to autoSyncFrequency.
quint16 pagesEnabled() const
Returns the DeviceSettingsMessage data message's pagesEnabled field's current value.
void setTapInterface(const Switch tapInterface)
Sets the tapInterface field to tapInterface.
DateTime clockTime() const
Returns the DeviceSettingsMessage data message's clockTime field's current value.
void setBacklightMode(const BacklightMode backlightMode)
Sets the backlightMode field to backlightMode.
void setBleAutoUploadEnabled(const bool bleAutoUploadEnabled)
Sets the bleAutoUploadEnabled field to bleAutoUploadEnabled.
void setSmartNotificationDisplayOrientation(const DisplayOrientation smartNotificationDisplayOrientation)
Sets the smartNotificationDisplayOrientation field to smartNotificationDisplayOrientation.
void setAutosyncMinSteps(const quint16 autosyncMinSteps)
Sets the autosyncMinSteps field to autosyncMinSteps.
quint16 defaultPage() const
Returns the DeviceSettingsMessage data message's defaultPage field's current value.
AutoActivityDetect autoActivityDetect() const
Returns the DeviceSettingsMessage data message's autoActivityDetect field's current value.
void setDefaultPage(const quint16 defaultPage)
Sets the defaultPage field to defaultPage.
bool moveAlertEnabled() const
Returns the DeviceSettingsMessage data message's moveAlertEnabled field's current value.
DeviceSettingsMessage()
Constructs a DeviceSettingsMessage object.
void setUtcOffset(const quint32 utcOffset)
Sets the utcOffset field to utcOffset.
qint8 timeZoneOffset() const
Returns the DeviceSettingsMessage data message's timeZoneOffset field's current value.
quint16 autosyncMinSteps() const
Returns the DeviceSettingsMessage data message's autosyncMinSteps field's current value.
TimeMode timeMode() const
Returns the DeviceSettingsMessage data message's timeMode field's current value.
void setActiveTimeZone(const quint8 activeTimeZone)
Sets the activeTimeZone field to activeTimeZone.
AutoSyncFrequency autoSyncFrequency() const
Returns the DeviceSettingsMessage data message's autoSyncFrequency field's current value.
quint8 numberOfScreens() const
Returns the DeviceSettingsMessage data message's numberOfScreens field's current value.
void setMoveAlertEnabled(const bool moveAlertEnabled)
Sets the moveAlertEnabled field to moveAlertEnabled.
TapSensitivity tapSensitivity() const
Returns the DeviceSettingsMessage data message's tapSensitivity field's current value.
bool lactateThresholdAutodetectEnabled() const
Returns the DeviceSettingsMessage data message's lactateThresholdAutodetectEnabled field's current va...
void setClockTime(const DateTime clockTime)
Sets the clockTime field to clockTime.
void setNumberOfScreens(const quint8 numberOfScreens)
Sets the numberOfScreens field to numberOfScreens.
quint8 activeTimeZone() const
Returns the DeviceSettingsMessage data message's activeTimeZone field's current value.
void setAutosyncMinTime(const quint16 autosyncMinTime)
Sets the autosyncMinTime field to autosyncMinTime.
void setTapSensitivity(const TapSensitivity tapSensitivity)
Sets the tapSensitivity field to tapSensitivity.
void setPagesEnabled(const quint16 pagesEnabled)
Sets the pagesEnabled field to pagesEnabled.
Switch tapInterface() const
Returns the DeviceSettingsMessage data message's tapInterface field's current value.
DisplayOrientation displayOrientation() const
Returns the DeviceSettingsMessage data message's displayOrientation field's current value.
void setDisplayOrientation(const DisplayOrientation displayOrientation)
Sets the displayOrientation field to displayOrientation.
void setTimeOffset(const quint32 timeOffset)
Sets the timeOffset field to timeOffset.
quint32 utcOffset() const
Returns the DeviceSettingsMessage data message's utcOffset field's current value.
bool bleAutoUploadEnabled() const
Returns the DeviceSettingsMessage data message's bleAutoUploadEnabled field's current value.
void setAutoActivityDetect(const AutoActivityDetect autoActivityDetect)
Sets the autoActivityDetect field to autoActivityDetect.
quint32 timeOffset() const
Returns the DeviceSettingsMessage data message's timeOffset field's current value.
void setActivityTrackerEnabled(const bool activityTrackerEnabled)
Sets the activityTrackerEnabled field to activityTrackerEnabled.
void setLactateThresholdAutodetectEnabled(const bool lactateThresholdAutodetectEnabled)
Sets the lactateThresholdAutodetectEnabled field to lactateThresholdAutodetectEnabled.
void setMountingSide(const Side mountingSide)
Sets the mountingSide field to mountingSide.
Declares the DeviceSettingsMessage class.
Declares the DeviceSettingsMessagePrivate class.
AutoActivityDetect
Garmin FIT AutoActivityDetect type.
TimeMode
Garmin FIT TimeMode type.
DisplayOrientation
Garmin FIT DisplayOrientation type.
AutoSyncFrequency
Garmin FIT AutoSyncFrequency type.
FitBaseType
Garmin FIT FitBaseType type.
DateMode
Garmin FIT DateMode type.
Side
Garmin FIT Side type.
TapSensitivity
Garmin FIT TapSensitivity type.
Switch
Garmin FIT Switch type.
BacklightMode
Garmin FIT BacklightMode type.
DateTime
Seconds since UTC 00:00 Dec 31 1989.