QtFit  0.1
Internal library development documentation
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ConnectivityMessagePrivate Class Reference
Inheritance diagram for ConnectivityMessagePrivate:
[legend]
Collaboration diagram for ConnectivityMessagePrivate:
[legend]

Public Member Functions

 ConnectivityMessagePrivate (ConnectivityMessage *const q)
 
virtual ~ConnectivityMessagePrivate ()
 
- Public Member Functions inherited from AbstractDataMessagePrivate
 AbstractDataMessagePrivate (AbstractDataMessage *const q)
 
virtual ~AbstractDataMessagePrivate ()
 
bool setFields (const DataDefinition *const defn, const QByteArray &record)
 

Public Attributes

bool bluetoothEnabled
 The ConnectivityMessage FIT message's bluetoothEnabled field. More...
 
bool bluetoothLeEnabled
 The ConnectivityMessage FIT message's bluetoothLeEnabled field. More...
 
bool antEnabled
 The ConnectivityMessage FIT message's antEnabled field. More...
 
QString name
 The ConnectivityMessage FIT message's name field.
 
bool liveTrackingEnabled
 The ConnectivityMessage FIT message's liveTrackingEnabled field.
 
bool weatherConditionsEnabled
 The ConnectivityMessage FIT message's weatherConditionsEnabled field.
 
bool weatherAlertsEnabled
 The ConnectivityMessage FIT message's weatherAlertsEnabled field.
 
bool autoActivityUploadEnabled
 The ConnectivityMessage FIT message's autoActivityUploadEnabled field.
 
bool courseDownloadEnabled
 The ConnectivityMessage FIT message's courseDownloadEnabled field.
 
bool workoutDownloadEnabled
 The ConnectivityMessage FIT message's workoutDownloadEnabled field.
 
bool gpsEphemerisDownloadEnabled
 The ConnectivityMessage FIT message's gpsEphemerisDownloadEnabled field.
 
bool incidentDetectionEnabled
 The ConnectivityMessage FIT message's incidentDetectionEnabled field.
 
bool grouptrackEnabled
 The ConnectivityMessage FIT message's grouptrackEnabled field.
 
- Public Attributes inherited from AbstractDataMessagePrivate
MesgNum globalMessageNumber
 FIT Globla Message Number for this FIT Data Message.
 

Protected Member Functions

bool setField (const int fieldId, const QByteArray &data, const FitBaseType baseType, const bool bigEndian) override
 
- Protected Member Functions inherited from AbstractDataMessagePrivate
bool verify (const QByteArray &data, const FitBaseType actualType, const int expectedSize, const FitBaseType expectedType, const char *messageFieldName)
 

Additional Inherited Members

- Protected Attributes inherited from AbstractDataMessagePrivate
AbstractDataMessage *const q_ptr
 Internal q-pointer.
 

Detailed Description

The ConnectivityMessagePrivate class provides private implementation for the ConnectivityMessage.

See also
ConnectivityMessage

Definition at line 38 of file connectivitymessage_p.h.

Constructor & Destructor Documentation

◆ ConnectivityMessagePrivate()

ConnectivityMessagePrivate::ConnectivityMessagePrivate ( ConnectivityMessage *const  q)
explicit

Constructs a ConnectivityMessagePrivate object with public implementation q.

Parameters
qPointer to public implementaton.

Definition at line 368 of file connectivitymessage.cpp.

370  , bluetoothEnabled(static_cast<bool>(-1))
371  , bluetoothLeEnabled(static_cast<bool>(-1))
372  , antEnabled(static_cast<bool>(-1))
373  , liveTrackingEnabled(static_cast<bool>(-1))
374  , weatherConditionsEnabled(static_cast<bool>(-1))
375  , weatherAlertsEnabled(static_cast<bool>(-1))
376  , autoActivityUploadEnabled(static_cast<bool>(-1))
377  , courseDownloadEnabled(static_cast<bool>(-1))
378  , workoutDownloadEnabled(static_cast<bool>(-1))
379  , gpsEphemerisDownloadEnabled(static_cast<bool>(-1))
380  , incidentDetectionEnabled(static_cast<bool>(-1))
381  , grouptrackEnabled(static_cast<bool>(-1))
382 {
383  globalMessageNumber = MesgNum::Connectivity;
384 }
MesgNum globalMessageNumber
FIT Globla Message Number for this FIT Data Message.
bool antEnabled
The ConnectivityMessage FIT message's antEnabled field.
bool grouptrackEnabled
The ConnectivityMessage FIT message's grouptrackEnabled field.
bool workoutDownloadEnabled
The ConnectivityMessage FIT message's workoutDownloadEnabled field.
bool bluetoothLeEnabled
The ConnectivityMessage FIT message's bluetoothLeEnabled field.
bool weatherConditionsEnabled
The ConnectivityMessage FIT message's weatherConditionsEnabled field.
bool gpsEphemerisDownloadEnabled
The ConnectivityMessage FIT message's gpsEphemerisDownloadEnabled field.
bool weatherAlertsEnabled
The ConnectivityMessage FIT message's weatherAlertsEnabled field.
bool bluetoothEnabled
The ConnectivityMessage FIT message's bluetoothEnabled field.
bool autoActivityUploadEnabled
The ConnectivityMessage FIT message's autoActivityUploadEnabled field.
bool liveTrackingEnabled
The ConnectivityMessage FIT message's liveTrackingEnabled field.
bool incidentDetectionEnabled
The ConnectivityMessage FIT message's incidentDetectionEnabled field.
bool courseDownloadEnabled
The ConnectivityMessage FIT message's courseDownloadEnabled field.

References AbstractDataMessagePrivate::globalMessageNumber.

◆ ~ConnectivityMessagePrivate()

ConnectivityMessagePrivate::~ConnectivityMessagePrivate ( )
virtual

Destroys the ConnectivityMessagePrivate object.

Definition at line 391 of file connectivitymessage.cpp.

392 {
393 
394 }

Member Function Documentation

◆ setField()

bool ConnectivityMessagePrivate::setField ( const int  fieldId,
const QByteArray &  data,
const FitBaseType  baseType,
const bool  bigEndian 
)
overrideprotectedvirtual

Sets the value of the fieldId field.

Derived classes must implement this method to extract the baseType value from data, and assign the extracted value the fieldId field.

Parameters
fieldIdThe field number within the given FIT data message.
dataThe raw data to extract the field value from.
baseTypeThe FIT base type for the field.
bigEndianWhether or not multibyte values in record are big-endian.
Returns
true if the field was set, or safely ignored; false otherwise.

Implements AbstractDataMessagePrivate.

Definition at line 396 of file connectivitymessage.cpp.

398 {
399  switch (fieldId) {
400  case 0: // See Profile.xlsx::Messages:connectivity.bluetoothEnabled
401  if (!verify(data, baseType, 0, FitBaseType::Byte, "connectivity.bluetoothEnabled")) return false;
402  this->bluetoothEnabled = static_cast<bool>(data.at(0));
403  break;
404  case 1: // See Profile.xlsx::Messages:connectivity.bluetoothLeEnabled
405  if (!verify(data, baseType, 0, FitBaseType::Byte, "connectivity.bluetoothLeEnabled")) return false;
406  this->bluetoothLeEnabled = static_cast<bool>(data.at(0));
407  break;
408  case 2: // See Profile.xlsx::Messages:connectivity.antEnabled
409  if (!verify(data, baseType, 0, FitBaseType::Byte, "connectivity.antEnabled")) return false;
410  this->antEnabled = static_cast<bool>(data.at(0));
411  break;
412  case 3: // See Profile.xlsx::Messages:connectivity.name
413  if (!verify(data, baseType, 1, FitBaseType::String, "connectivity.name")) return false;
414  this->name = QString::fromUtf8(data);
415  break;
416  case 4: // See Profile.xlsx::Messages:connectivity.liveTrackingEnabled
417  if (!verify(data, baseType, 0, FitBaseType::Byte, "connectivity.liveTrackingEnabled")) return false;
418  this->liveTrackingEnabled = static_cast<bool>(data.at(0));
419  break;
420  case 5: // See Profile.xlsx::Messages:connectivity.weatherConditionsEnabled
421  if (!verify(data, baseType, 0, FitBaseType::Byte, "connectivity.weatherConditionsEnabled")) return false;
422  this->weatherConditionsEnabled = static_cast<bool>(data.at(0));
423  break;
424  case 6: // See Profile.xlsx::Messages:connectivity.weatherAlertsEnabled
425  if (!verify(data, baseType, 0, FitBaseType::Byte, "connectivity.weatherAlertsEnabled")) return false;
426  this->weatherAlertsEnabled = static_cast<bool>(data.at(0));
427  break;
428  case 7: // See Profile.xlsx::Messages:connectivity.autoActivityUploadEnabled
429  if (!verify(data, baseType, 0, FitBaseType::Byte, "connectivity.autoActivityUploadEnabled")) return false;
430  this->autoActivityUploadEnabled = static_cast<bool>(data.at(0));
431  break;
432  case 8: // See Profile.xlsx::Messages:connectivity.courseDownloadEnabled
433  if (!verify(data, baseType, 0, FitBaseType::Byte, "connectivity.courseDownloadEnabled")) return false;
434  this->courseDownloadEnabled = static_cast<bool>(data.at(0));
435  break;
436  case 9: // See Profile.xlsx::Messages:connectivity.workoutDownloadEnabled
437  if (!verify(data, baseType, 0, FitBaseType::Byte, "connectivity.workoutDownloadEnabled")) return false;
438  this->workoutDownloadEnabled = static_cast<bool>(data.at(0));
439  break;
440  case 10: // See Profile.xlsx::Messages:connectivity.gpsEphemerisDownloadEnabled
441  if (!verify(data, baseType, 0, FitBaseType::Byte, "connectivity.gpsEphemerisDownloadEnabled")) return false;
442  this->gpsEphemerisDownloadEnabled = static_cast<bool>(data.at(0));
443  break;
444  case 11: // See Profile.xlsx::Messages:connectivity.incidentDetectionEnabled
445  if (!verify(data, baseType, 0, FitBaseType::Byte, "connectivity.incidentDetectionEnabled")) return false;
446  this->incidentDetectionEnabled = static_cast<bool>(data.at(0));
447  break;
448  case 12: // See Profile.xlsx::Messages:connectivity.grouptrackEnabled
449  if (!verify(data, baseType, 0, FitBaseType::Byte, "connectivity.grouptrackEnabled")) return false;
450  this->grouptrackEnabled = static_cast<bool>(data.at(0));
451  break;
452  default:
453  qWarning() << "ignoring unknown connectivity message field number" << fieldId << bigEndian;
454  // Fall through to return true, as its still 'safe' to continue parsing data messages.
455  }
456  return true;
457 }
bool verify(const QByteArray &data, const FitBaseType actualType, const int expectedSize, const FitBaseType expectedType, const char *messageFieldName)
QString name
The ConnectivityMessage FIT message's name field.

References AbstractDataMessagePrivate::verify().

Here is the call graph for this function:

Member Data Documentation

◆ antEnabled

bool ConnectivityMessagePrivate::antEnabled

The ConnectivityMessage FIT message's antEnabled field.

Use ANT for connectivity features

Definition at line 60 of file connectivitymessage_p.h.

◆ bluetoothEnabled

bool ConnectivityMessagePrivate::bluetoothEnabled

The ConnectivityMessage FIT message's bluetoothEnabled field.

Use Bluetooth for connectivity features

Definition at line 46 of file connectivitymessage_p.h.

◆ bluetoothLeEnabled

bool ConnectivityMessagePrivate::bluetoothLeEnabled

The ConnectivityMessage FIT message's bluetoothLeEnabled field.

Use Bluetooth Low Energy for connectivity features

Definition at line 53 of file connectivitymessage_p.h.


The documentation for this class was generated from the following files: