79 return d->manufacturer;
105 return d->serialNumber;
118 return d->timeCreated;
153 return d->scheduledTime;
251 , timeCreated(static_cast<
DateTime>(-1))
252 , completed(static_cast<bool>(-1))
270 const int fieldId,
const QByteArray &data,
const FitBaseType baseType,
const bool bigEndian)
274 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"schedule.manufacturer"))
return false;
275 this->
manufacturer =
static_cast<Manufacturer>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
278 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"schedule.product"))
return false;
279 this->
product =
static_cast<quint16
>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
282 if (!
verify(data, baseType, 4, FitBaseType::Uint32z,
"schedule.serialNumber"))
return false;
283 this->
serialNumber =
static_cast<quint32z>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
286 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"schedule.timeCreated"))
return false;
287 this->
timeCreated =
static_cast<DateTime>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
290 if (!
verify(data, baseType, 0, FitBaseType::Byte,
"schedule.completed"))
return false;
291 this->
completed =
static_cast<bool>(data.at(0));
294 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"schedule.type"))
return false;
298 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"schedule.scheduledTime"))
return false;
299 this->
scheduledTime =
static_cast<LocalDateTime>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
302 qWarning() <<
"ignoring unknown schedule 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.
quint32z serialNumber
The ScheduleMessage FIT message's serialNumber field.
quint16 product
The ScheduleMessage FIT message's product field.
bool completed
The ScheduleMessage FIT message's completed field.
Schedule type
The ScheduleMessage FIT message's type field.
virtual ~ScheduleMessagePrivate()
DateTime timeCreated
The ScheduleMessage FIT message's timeCreated field.
bool setField(const int fieldId, const QByteArray &data, const FitBaseType baseType, const bool bigEndian) override
LocalDateTime scheduledTime
The ScheduleMessage FIT message's scheduledTime field.
Manufacturer manufacturer
The ScheduleMessage FIT message's manufacturer field.
The ScheduleMessage class represents a FIT ScheduleMessage data message.
bool completed() const
Returns the ScheduleMessage data message's completed field's current value.
void setManufacturer(const Manufacturer manufacturer)
Sets the manufacturer field to manufacturer.
LocalDateTime scheduledTime() const
Returns the ScheduleMessage data message's scheduledTime field's current value.
Schedule type() const
Returns the ScheduleMessage data message's type field's current value.
void setScheduledTime(const LocalDateTime scheduledTime)
Sets the scheduledTime field to scheduledTime.
void setProduct(const quint16 product)
Sets the product field to product.
quint16 product() const
Returns the ScheduleMessage data message's product field's current value.
ScheduleMessage()
Constructs a ScheduleMessage object.
void setSerialNumber(const quint32z serialNumber)
Sets the serialNumber field to serialNumber.
quint32z serialNumber() const
Returns the ScheduleMessage data message's serialNumber field's current value.
void setTimeCreated(const DateTime timeCreated)
Sets the timeCreated field to timeCreated.
Manufacturer manufacturer() const
Returns the ScheduleMessage data message's manufacturer field's current value.
DateTime timeCreated() const
Returns the ScheduleMessage data message's timeCreated field's current value.
void setType(const Schedule type)
Sets the type field to type.
void setCompleted(const bool completed)
Sets the completed field to completed.
Declares the ScheduleMessage class.
Declares the ScheduleMessagePrivate class.
LocalDateTime
Seconds since 00:00 Dec 31 1989 in local time zone.
FitBaseType
Garmin FIT FitBaseType type.
Schedule
Garmin FIT Schedule type.
Manufacturer
Garmin FIT Manufacturer type.
quint32 quint32z
32-bit unsigned integer, with 0-is-invalid semantics.
DateTime
Seconds since UTC 00:00 Dec 31 1989.