116 return d->expireTime;
227 , timestamp(static_cast<
DateTime>(-1))
228 , issueTime(static_cast<
DateTime>(-1))
229 , expireTime(static_cast<
DateTime>(-1))
247 const int fieldId,
const QByteArray &data,
const FitBaseType baseType,
const bool bigEndian)
251 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"weather_alert.timestamp"))
return false;
252 this->
timestamp =
static_cast<DateTime>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
255 if (!
verify(data, baseType, 1, FitBaseType::String,
"weather_alert.reportId"))
return false;
256 this->
reportId = QString::fromUtf8(data);
259 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"weather_alert.issueTime"))
return false;
260 this->
issueTime =
static_cast<DateTime>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
263 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"weather_alert.expireTime"))
return false;
264 this->
expireTime =
static_cast<DateTime>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
267 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"weather_alert.severity"))
return false;
271 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"weather_alert.type"))
return false;
275 qWarning() <<
"ignoring unknown weather_alert 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 timestamp
The WeatherAlertMessage FIT message's timestamp field.
WeatherSeverity severity
The WeatherAlertMessage FIT message's severity field.
bool setField(const int fieldId, const QByteArray &data, const FitBaseType baseType, const bool bigEndian) override
WeatherSevereType type
The WeatherAlertMessage FIT message's type field.
virtual ~WeatherAlertMessagePrivate()
DateTime expireTime
The WeatherAlertMessage FIT message's expireTime field.
DateTime issueTime
The WeatherAlertMessage FIT message's issueTime field.
QString reportId
The WeatherAlertMessage FIT message's reportId field.
The WeatherAlertMessage class represents a FIT WeatherAlertMessage data message.
void setTimestamp(const DateTime timestamp)
Sets the timestamp field to timestamp.
DateTime issueTime() const
Returns the WeatherAlertMessage data message's issueTime field's current value.
DateTime timestamp() const
Returns the WeatherAlertMessage data message's timestamp field's current value.
void setType(const WeatherSevereType type)
Sets the type field to type.
WeatherSeverity severity() const
Returns the WeatherAlertMessage data message's severity field's current value.
void setReportId(const QString reportId)
Sets the reportId field to reportId.
DateTime expireTime() const
Returns the WeatherAlertMessage data message's expireTime field's current value.
void setExpireTime(const DateTime expireTime)
Sets the expireTime field to expireTime.
void setSeverity(const WeatherSeverity severity)
Sets the severity field to severity.
WeatherAlertMessage()
Constructs a WeatherAlertMessage object.
QString reportId() const
Returns the WeatherAlertMessage data message's reportId field's current value.
WeatherSevereType type() const
Returns the WeatherAlertMessage data message's type field's current value.
void setIssueTime(const DateTime issueTime)
Sets the issueTime field to issueTime.
WeatherSevereType
Garmin FIT WeatherSevereType type.
WeatherSeverity
Garmin FIT WeatherSeverity type.
FitBaseType
Garmin FIT FitBaseType type.
DateTime
Seconds since UTC 00:00 Dec 31 1989.
Declares the WeatherAlertMessage class.
Declares the WeatherAlertMessagePrivate class.