QtFit  0.1
Internal library development documentation
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
exddataconceptconfigurationmessage.cpp
Go to the documentation of this file.
1 /*
2  Copyright 2021 Paul Colby
3 
4  This file is part of QtFit.
5 
6  QtFit is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Lesser General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  QtFit is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public License
17  along with QtFit. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 /*!
21  * \file
22  * \note This file is automatcially generated. Any changes here are likely to be overwritten.
23  */
24 
25 /*!
26  * \file
27  * Defines the ExdDataConceptConfigurationMessage, and ExdDataConceptConfigurationMessagePrivate classes.
28  */
29 
32 
33 #include <QDebug>
34 #include <QtEndian>
35 
37 
38 /*!
39  * \class ExdDataConceptConfigurationMessage
40  *
41  * The ExdDataConceptConfigurationMessage class represents a FIT ExdDataConceptConfigurationMessage data message.
42  *
43  * \sa DataMessage
44  */
45 
46 /*!
47  * Constructs a ExdDataConceptConfigurationMessage object.
48  *
49  * Typically, instances of this class will be returned by FitStreamReader::readNext, but this
50  * constructor may be used, along with the relevant setter methods, to create a valid message.
51  */
53 {
54 
55 }
56 
57 /*!
58  * \internal
59  *
60  * Constructs a ExdDataConceptConfigurationMessage object with private implementation \a d.
61  *
62  * \param d Pointer to private implementation.
63  */
65 {
66 
67 }
68 
69 /*!
70  * Returns the ExdDataConceptConfigurationMessage data message's \c screenIndex field's current value.
71  *
72  * \return the \c screenIndex field value.
73  */
75 {
77  return d->screenIndex;
78 }
79 
80 /*!
81  * Returns the ExdDataConceptConfigurationMessage data message's \c conceptField field's current value.
82  *
83  * \return the \c conceptField field value.
84  */
86 {
88  return d->conceptField;
89 }
90 
91 /*!
92  * Returns the ExdDataConceptConfigurationMessage data message's \c fieldId field's current value.
93  *
94  * \return the \c fieldId field value.
95  */
97 {
99  return d->fieldId;
100 }
101 
102 /*!
103  * Returns the ExdDataConceptConfigurationMessage data message's \c conceptIndex field's current value.
104  *
105  * \return the \c conceptIndex field value.
106  */
108 {
110  return d->conceptIndex;
111 }
112 
113 /*!
114  * Returns the ExdDataConceptConfigurationMessage data message's \c dataPage field's current value.
115  *
116  * \return the \c dataPage field value.
117  */
119 {
121  return d->dataPage;
122 }
123 
124 /*!
125  * Returns the ExdDataConceptConfigurationMessage data message's \c conceptKey field's current value.
126  *
127  * \return the \c conceptKey field value.
128  */
130 {
132  return d->conceptKey;
133 }
134 
135 /*!
136  * Returns the ExdDataConceptConfigurationMessage data message's \c scaling field's current value.
137  *
138  * \return the \c scaling field value.
139  */
141 {
143  return d->scaling;
144 }
145 
146 /*!
147  * Returns the ExdDataConceptConfigurationMessage data message's \c dataUnits field's current value.
148  *
149  * \return the \c dataUnits field value.
150  */
152 {
154  return d->dataUnits;
155 }
156 
157 /*!
158  * Returns the ExdDataConceptConfigurationMessage data message's \c qualifier field's current value.
159  *
160  * \return the \c qualifier field value.
161  */
163 {
165  return d->qualifier;
166 }
167 
168 /*!
169  * Returns the ExdDataConceptConfigurationMessage data message's \c descriptor field's current value.
170  *
171  * \return the \c descriptor field value.
172  */
174 {
176  return d->descriptor;
177 }
178 
179 /*!
180  * Returns the ExdDataConceptConfigurationMessage data message's \c isSigned field's current value.
181  *
182  * \return the \c isSigned field value.
183  */
185 {
187  return d->isSigned;
188 }
189 
190 /*!
191  * Sets the \c screenIndex field to \a screenIndex.
192  *
193  * \param screenIndex The field value to set.
194  */
196 {
198  d->screenIndex = screenIndex;
199 }
200 /*!
201  * Sets the \c conceptField field to \a conceptField.
202  *
203  * \param conceptField The field value to set.
204  */
206 {
208  d->conceptField = conceptField;
209 }
210 /*!
211  * Sets the \c fieldId field to \a fieldId.
212  *
213  * \param fieldId The field value to set.
214  */
216 {
218  d->fieldId = fieldId;
219 }
220 /*!
221  * Sets the \c conceptIndex field to \a conceptIndex.
222  *
223  * \param conceptIndex The field value to set.
224  */
226 {
228  d->conceptIndex = conceptIndex;
229 }
230 /*!
231  * Sets the \c dataPage field to \a dataPage.
232  *
233  * \param dataPage The field value to set.
234  */
236 {
238  d->dataPage = dataPage;
239 }
240 /*!
241  * Sets the \c conceptKey field to \a conceptKey.
242  *
243  * \param conceptKey The field value to set.
244  */
246 {
248  d->conceptKey = conceptKey;
249 }
250 /*!
251  * Sets the \c scaling field to \a scaling.
252  *
253  * \param scaling The field value to set.
254  */
256 {
258  d->scaling = scaling;
259 }
260 /*!
261  * Sets the \c dataUnits field to \a dataUnits.
262  *
263  * \param dataUnits The field value to set.
264  */
266 {
268  d->dataUnits = dataUnits;
269 }
270 /*!
271  * Sets the \c qualifier field to \a qualifier.
272  *
273  * \param qualifier The field value to set.
274  */
276 {
278  d->qualifier = qualifier;
279 }
280 /*!
281  * Sets the \c descriptor field to \a descriptor.
282  *
283  * \param descriptor The field value to set.
284  */
286 {
288  d->descriptor = descriptor;
289 }
290 /*!
291  * Sets the \c isSigned field to \a isSigned.
292  *
293  * \param isSigned The field value to set.
294  */
296 {
298  d->isSigned = isSigned;
299 }
300 
301 /// \cond internal
302 
303 /*!
304  * \internal
305  *
306  * \class ExdDataConceptConfigurationMessagePrivate
307  *
308  * The ExdDataConceptConfigurationMessagePrivate class provides private implementation for the ExdDataConceptConfigurationMessage.
309  *
310  * \sa ExdDataConceptConfigurationMessage
311  */
312 
313 /*!
314  * \internal
315  *
316  * Constructs a ExdDataConceptConfigurationMessagePrivate object with public implementation \a q.
317  *
318  * \param q Pointer to public implementaton.
319  */
320 ExdDataConceptConfigurationMessagePrivate::ExdDataConceptConfigurationMessagePrivate(ExdDataConceptConfigurationMessage * const q)
322  , screenIndex(0xFF)
323  , conceptField(0xFF)
324  , fieldId(0xFF)
325  , conceptIndex(0xFF)
326  , dataPage(0xFF)
327  , conceptKey(0xFF)
328  , scaling(0xFF)
329  , dataUnits(static_cast<ExdDataUnits>(-1))
330  , qualifier(static_cast<ExdQualifiers>(-1))
331  , descriptor(static_cast<ExdDescriptors>(-1))
332  , isSigned(static_cast<bool>(-1))
333 {
334  globalMessageNumber = MesgNum::ExdDataConceptConfiguration;
335 }
336 
337 /*!
338  * \internal
339  *
340  * Destroys the ExdDataConceptConfigurationMessagePrivate object.
341  */
343 {
344 
345 }
346 
348  const int fieldId, const QByteArray &data, const FitBaseType baseType, const bool bigEndian)
349 {
350  switch (fieldId) {
351  case 0: // See Profile.xlsx::Messages:exd_data_concept_configuration.screenIndex
352  if (!verify(data, baseType, 1, FitBaseType::Uint8, "exd_data_concept_configuration.screenIndex")) return false;
353  this->screenIndex = static_cast<quint8>(data.at(0));
354  break;
355  case 1: // See Profile.xlsx::Messages:exd_data_concept_configuration.conceptField
356  if (!verify(data, baseType, 1, FitBaseType::Byte, "exd_data_concept_configuration.conceptField")) return false;
357  this->conceptField = static_cast<quint8>(data.at(0));
358  break;
359  case 2: // See Profile.xlsx::Messages:exd_data_concept_configuration.fieldId
360  if (!verify(data, baseType, 1, FitBaseType::Uint8, "exd_data_concept_configuration.fieldId")) return false;
361  this->fieldId = static_cast<quint8>(data.at(0));
362  break;
363  case 3: // See Profile.xlsx::Messages:exd_data_concept_configuration.conceptIndex
364  if (!verify(data, baseType, 1, FitBaseType::Uint8, "exd_data_concept_configuration.conceptIndex")) return false;
365  this->conceptIndex = static_cast<quint8>(data.at(0));
366  break;
367  case 4: // See Profile.xlsx::Messages:exd_data_concept_configuration.dataPage
368  if (!verify(data, baseType, 1, FitBaseType::Uint8, "exd_data_concept_configuration.dataPage")) return false;
369  this->dataPage = static_cast<quint8>(data.at(0));
370  break;
371  case 5: // See Profile.xlsx::Messages:exd_data_concept_configuration.conceptKey
372  if (!verify(data, baseType, 1, FitBaseType::Uint8, "exd_data_concept_configuration.conceptKey")) return false;
373  this->conceptKey = static_cast<quint8>(data.at(0));
374  break;
375  case 6: // See Profile.xlsx::Messages:exd_data_concept_configuration.scaling
376  if (!verify(data, baseType, 1, FitBaseType::Uint8, "exd_data_concept_configuration.scaling")) return false;
377  this->scaling = static_cast<quint8>(data.at(0));
378  break;
379  case 8: // See Profile.xlsx::Messages:exd_data_concept_configuration.dataUnits
380  if (!verify(data, baseType, 1, FitBaseType::Enum, "exd_data_concept_configuration.dataUnits")) return false;
381  this->dataUnits = static_cast<ExdDataUnits>(data.at(0));
382  break;
383  case 9: // See Profile.xlsx::Messages:exd_data_concept_configuration.qualifier
384  if (!verify(data, baseType, 1, FitBaseType::Enum, "exd_data_concept_configuration.qualifier")) return false;
385  this->qualifier = static_cast<ExdQualifiers>(data.at(0));
386  break;
387  case 10: // See Profile.xlsx::Messages:exd_data_concept_configuration.descriptor
388  if (!verify(data, baseType, 1, FitBaseType::Enum, "exd_data_concept_configuration.descriptor")) return false;
389  this->descriptor = static_cast<ExdDescriptors>(data.at(0));
390  break;
391  case 11: // See Profile.xlsx::Messages:exd_data_concept_configuration.isSigned
392  if (!verify(data, baseType, 0, FitBaseType::Byte, "exd_data_concept_configuration.isSigned")) return false;
393  this->isSigned = static_cast<bool>(data.at(0));
394  break;
395  default:
396  qWarning() << "ignoring unknown exd_data_concept_configuration message field number" << fieldId << bigEndian;
397  // Fall through to return true, as its still 'safe' to continue parsing data messages.
398  }
399  return true;
400 }
401 
402 /// \endcond
403 
#define QTFIT_END_NAMESPACE
Macro for ending the QtFit library's top-most namespace (if one is defined).
Definition: QtFit_global.h:78
#define QTFIT_BEGIN_NAMESPACE
Macro for starting the QtFit library's top-most namespace (if one is defined).
Definition: QtFit_global.h:77
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.
bool isSigned
The ExdDataConceptConfigurationMessage FIT message's isSigned field.
quint8 scaling
The ExdDataConceptConfigurationMessage FIT message's scaling field.
quint8 conceptField
The ExdDataConceptConfigurationMessage FIT message's conceptField field.
quint8 conceptIndex
The ExdDataConceptConfigurationMessage FIT message's conceptIndex field.
quint8 dataPage
The ExdDataConceptConfigurationMessage FIT message's dataPage field.
quint8 conceptKey
The ExdDataConceptConfigurationMessage FIT message's conceptKey field.
ExdDescriptors descriptor
The ExdDataConceptConfigurationMessage FIT message's descriptor field.
quint8 screenIndex
The ExdDataConceptConfigurationMessage FIT message's screenIndex field.
quint8 fieldId
The ExdDataConceptConfigurationMessage FIT message's fieldId field.
ExdDataUnits dataUnits
The ExdDataConceptConfigurationMessage FIT message's dataUnits field.
bool setField(const int fieldId, const QByteArray &data, const FitBaseType baseType, const bool bigEndian) override
ExdQualifiers qualifier
The ExdDataConceptConfigurationMessage FIT message's qualifier field.
The ExdDataConceptConfigurationMessage class represents a FIT ExdDataConceptConfigurationMessage data...
void setDataPage(const quint8 dataPage)
Sets the dataPage field to dataPage.
quint8 conceptIndex() const
Returns the ExdDataConceptConfigurationMessage data message's conceptIndex field's current value.
quint8 dataPage() const
Returns the ExdDataConceptConfigurationMessage data message's dataPage field's current value.
quint8 scaling() const
Returns the ExdDataConceptConfigurationMessage data message's scaling field's current value.
void setConceptIndex(const quint8 conceptIndex)
Sets the conceptIndex field to conceptIndex.
void setDescriptor(const ExdDescriptors descriptor)
Sets the descriptor field to descriptor.
ExdDataUnits dataUnits() const
Returns the ExdDataConceptConfigurationMessage data message's dataUnits field's current value.
quint8 fieldId() const
Returns the ExdDataConceptConfigurationMessage data message's fieldId field's current value.
ExdDescriptors descriptor() const
Returns the ExdDataConceptConfigurationMessage data message's descriptor field's current value.
quint8 conceptField() const
Returns the ExdDataConceptConfigurationMessage data message's conceptField field's current value.
bool isSigned() const
Returns the ExdDataConceptConfigurationMessage data message's isSigned field's current value.
ExdDataConceptConfigurationMessage()
Constructs a ExdDataConceptConfigurationMessage object.
void setDataUnits(const ExdDataUnits dataUnits)
Sets the dataUnits field to dataUnits.
void setQualifier(const ExdQualifiers qualifier)
Sets the qualifier field to qualifier.
void setIsSigned(const bool isSigned)
Sets the isSigned field to isSigned.
void setConceptField(const quint8 conceptField)
Sets the conceptField field to conceptField.
quint8 screenIndex() const
Returns the ExdDataConceptConfigurationMessage data message's screenIndex field's current value.
void setFieldId(const quint8 fieldId)
Sets the fieldId field to fieldId.
void setConceptKey(const quint8 conceptKey)
Sets the conceptKey field to conceptKey.
void setScaling(const quint8 scaling)
Sets the scaling field to scaling.
quint8 conceptKey() const
Returns the ExdDataConceptConfigurationMessage data message's conceptKey field's current value.
ExdQualifiers qualifier() const
Returns the ExdDataConceptConfigurationMessage data message's qualifier field's current value.
void setScreenIndex(const quint8 screenIndex)
Sets the screenIndex field to screenIndex.
Declares the ExdDataConceptConfigurationMessage class.
Declares the ExdDataConceptConfigurationMessagePrivate class.
ExdQualifiers
Garmin FIT ExdQualifiers type.
Definition: types.h:3184
ExdDescriptors
Garmin FIT ExdDescriptors type.
Definition: types.h:3240
FitBaseType
Garmin FIT FitBaseType type.
Definition: types.h:3388
ExdDataUnits
Garmin FIT ExdDataUnits type.
Definition: types.h:3122