QtFit  0.1
Internal library development documentation
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
EventMessage Class Reference

The EventMessage class represents a FIT EventMessage data message. More...

Inheritance diagram for EventMessage:
[legend]
Collaboration diagram for EventMessage:
[legend]

Public Member Functions

 EventMessage ()
 Constructs a EventMessage object. More...
 
DateTime timestamp () const
 Returns the EventMessage data message's timestamp field's current value. More...
 
Event event () const
 Returns the EventMessage data message's event field's current value. More...
 
EventType eventType () const
 Returns the EventMessage data message's eventType field's current value. More...
 
quint16 data16 () const
 Returns the EventMessage data message's data16 field's current value. More...
 
quint32 data () const
 Returns the EventMessage data message's data field's current value. More...
 
quint8 eventGroup () const
 Returns the EventMessage data message's eventGroup field's current value. More...
 
quint16 score () const
 Returns the EventMessage data message's score field's current value. More...
 
quint16 opponentScore () const
 Returns the EventMessage data message's opponentScore field's current value. More...
 
quint8z frontGearNum () const
 Returns the EventMessage data message's frontGearNum field's current value. More...
 
quint8z frontGear () const
 Returns the EventMessage data message's frontGear field's current value. More...
 
quint8z rearGearNum () const
 Returns the EventMessage data message's rearGearNum field's current value. More...
 
quint8z rearGear () const
 Returns the EventMessage data message's rearGear field's current value. More...
 
DeviceIndex deviceIndex () const
 Returns the EventMessage data message's deviceIndex field's current value. More...
 
RadarThreatLevelType radarThreatLevelMax () const
 Returns the EventMessage data message's radarThreatLevelMax field's current value. More...
 
quint8 radarThreatCount () const
 Returns the EventMessage data message's radarThreatCount field's current value. More...
 
void setTimestamp (const DateTime timestamp)
 Sets the timestamp field to timestamp. More...
 
void setEvent (const Event event)
 Sets the event field to event. More...
 
void setEventType (const EventType eventType)
 Sets the eventType field to eventType. More...
 
void setData16 (const quint16 data16)
 Sets the data16 field to data16. More...
 
void setData (const quint32 data)
 Sets the data field to data. More...
 
void setEventGroup (const quint8 eventGroup)
 Sets the eventGroup field to eventGroup. More...
 
void setScore (const quint16 score)
 Sets the score field to score. More...
 
void setOpponentScore (const quint16 opponentScore)
 Sets the opponentScore field to opponentScore. More...
 
void setFrontGearNum (const quint8z frontGearNum)
 Sets the frontGearNum field to frontGearNum. More...
 
void setFrontGear (const quint8z frontGear)
 Sets the frontGear field to frontGear. More...
 
void setRearGearNum (const quint8z rearGearNum)
 Sets the rearGearNum field to rearGearNum. More...
 
void setRearGear (const quint8z rearGear)
 Sets the rearGear field to rearGear. More...
 
void setDeviceIndex (const DeviceIndex deviceIndex)
 Sets the deviceIndex field to deviceIndex. More...
 
void setRadarThreatLevelMax (const RadarThreatLevelType radarThreatLevelMax)
 Sets the radarThreatLevelMax field to radarThreatLevelMax. More...
 
void setRadarThreatCount (const quint8 radarThreatCount)
 Sets the radarThreatCount field to radarThreatCount. More...
 
- Public Member Functions inherited from AbstractDataMessage
 ~AbstractDataMessage ()
 Destroys the AbstractDataMessage object.
 
MesgNum globalMessageNumber () const
 Returns the data message's global message number. More...
 

Protected Member Functions

 EventMessage (EventMessagePrivate *const d)
 
- Protected Member Functions inherited from AbstractDataMessage
 AbstractDataMessage (AbstractDataMessagePrivate *const d)
 

Additional Inherited Members

- Static Public Member Functions inherited from AbstractDataMessage
static AbstractDataMessagefromData (const DataDefinition *const defn, const QByteArray &record)
 Constructs the relevant AbstractDataMessage-derived class to parse record according to defn. More...
 
- Protected Attributes inherited from AbstractDataMessage
AbstractDataMessagePrivate *const d_ptr
 Internal d-pointer.
 

Detailed Description

The EventMessage class represents a FIT EventMessage data message.

See also
DataMessage

Definition at line 39 of file eventmessage.h.

Constructor & Destructor Documentation

◆ EventMessage() [1/2]

EventMessage::EventMessage ( )

Constructs a EventMessage object.

Typically, instances of this class will be returned by FitStreamReader::readNext, but this constructor may be used, along with the relevant setter methods, to create a valid message.

Definition at line 52 of file eventmessage.cpp.

53 {
54 
55 }
The AbstractDataMessage class is the polymorphic base class for all FIT Data Message classes.

◆ EventMessage() [2/2]

EventMessage::EventMessage ( EventMessagePrivate *const  d)
explicitprotected

Constructs a EventMessage object with private implementation d.

Parameters
dPointer to private implementation.

Definition at line 64 of file eventmessage.cpp.

65 {
66 
67 }

Member Function Documentation

◆ data()

quint32 EventMessage::data ( ) const

Returns the EventMessage data message's data field's current value.

Returns
the data field value.

Definition at line 118 of file eventmessage.cpp.

119 {
120  Q_D(const EventMessage);
121  return d->data;
122 }
The EventMessage class represents a FIT EventMessage data message.
Definition: eventmessage.h:39

Referenced by setData().

Here is the caller graph for this function:

◆ data16()

quint16 EventMessage::data16 ( ) const

Returns the EventMessage data message's data16 field's current value.

Returns
the data16 field value.

Definition at line 107 of file eventmessage.cpp.

108 {
109  Q_D(const EventMessage);
110  return d->data16;
111 }

Referenced by setData16().

Here is the caller graph for this function:

◆ deviceIndex()

DeviceIndex EventMessage::deviceIndex ( ) const

Returns the EventMessage data message's deviceIndex field's current value.

Returns
the deviceIndex field value.

Definition at line 222 of file eventmessage.cpp.

223 {
224  Q_D(const EventMessage);
225  return d->deviceIndex;
226 }

Referenced by setDeviceIndex().

Here is the caller graph for this function:

◆ event()

Event EventMessage::event ( ) const

Returns the EventMessage data message's event field's current value.

Returns
the event field value.

Definition at line 85 of file eventmessage.cpp.

86 {
87  Q_D(const EventMessage);
88  return d->event;
89 }

Referenced by setEvent().

Here is the caller graph for this function:

◆ eventGroup()

quint8 EventMessage::eventGroup ( ) const

Returns the EventMessage data message's eventGroup field's current value.

Returns
the eventGroup field value.

Definition at line 129 of file eventmessage.cpp.

130 {
131  Q_D(const EventMessage);
132  return d->eventGroup;
133 }

Referenced by setEventGroup().

Here is the caller graph for this function:

◆ eventType()

EventType EventMessage::eventType ( ) const

Returns the EventMessage data message's eventType field's current value.

Returns
the eventType field value.

Definition at line 96 of file eventmessage.cpp.

97 {
98  Q_D(const EventMessage);
99  return d->eventType;
100 }

Referenced by setEventType().

Here is the caller graph for this function:

◆ frontGear()

quint8z EventMessage::frontGear ( ) const

Returns the EventMessage data message's frontGear field's current value.

Do not populate directly. Autogenerated by decoder for gear_change subfield components. Number of front teeth.

Returns
the frontGear field value.

Definition at line 183 of file eventmessage.cpp.

184 {
185  Q_D(const EventMessage);
186  return d->frontGear;
187 }

Referenced by setFrontGear().

Here is the caller graph for this function:

◆ frontGearNum()

quint8z EventMessage::frontGearNum ( ) const

Returns the EventMessage data message's frontGearNum field's current value.

Do not populate directly. Autogenerated by decoder for gear_change subfield components. Front gear number. 1 is innermost.

Returns
the frontGearNum field value.

Definition at line 169 of file eventmessage.cpp.

170 {
171  Q_D(const EventMessage);
172  return d->frontGearNum;
173 }

Referenced by setFrontGearNum().

Here is the caller graph for this function:

◆ opponentScore()

quint16 EventMessage::opponentScore ( ) const

Returns the EventMessage data message's opponentScore field's current value.

Do not populate directly. Autogenerated by decoder for sport_point subfield components

Returns
the opponentScore field value.

Definition at line 155 of file eventmessage.cpp.

156 {
157  Q_D(const EventMessage);
158  return d->opponentScore;
159 }

Referenced by setOpponentScore().

Here is the caller graph for this function:

◆ radarThreatCount()

quint8 EventMessage::radarThreatCount ( ) const

Returns the EventMessage data message's radarThreatCount field's current value.

Do not populate directly. Autogenerated by decoder for threat_alert subfield components.

Returns
the radarThreatCount field value.

Definition at line 248 of file eventmessage.cpp.

249 {
250  Q_D(const EventMessage);
251  return d->radarThreatCount;
252 }

Referenced by setRadarThreatCount().

Here is the caller graph for this function:

◆ radarThreatLevelMax()

RadarThreatLevelType EventMessage::radarThreatLevelMax ( ) const

Returns the EventMessage data message's radarThreatLevelMax field's current value.

Do not populate directly. Autogenerated by decoder for threat_alert subfield components.

Returns
the radarThreatLevelMax field value.

Definition at line 235 of file eventmessage.cpp.

236 {
237  Q_D(const EventMessage);
238  return d->radarThreatLevelMax;
239 }

Referenced by setRadarThreatLevelMax().

Here is the caller graph for this function:

◆ rearGear()

quint8z EventMessage::rearGear ( ) const

Returns the EventMessage data message's rearGear field's current value.

Do not populate directly. Autogenerated by decoder for gear_change subfield components. Number of rear teeth.

Returns
the rearGear field value.

Definition at line 211 of file eventmessage.cpp.

212 {
213  Q_D(const EventMessage);
214  return d->rearGear;
215 }

Referenced by setRearGear().

Here is the caller graph for this function:

◆ rearGearNum()

quint8z EventMessage::rearGearNum ( ) const

Returns the EventMessage data message's rearGearNum field's current value.

Do not populate directly. Autogenerated by decoder for gear_change subfield components. Rear gear number. 1 is innermost.

Returns
the rearGearNum field value.

Definition at line 197 of file eventmessage.cpp.

198 {
199  Q_D(const EventMessage);
200  return d->rearGearNum;
201 }

Referenced by setRearGearNum().

Here is the caller graph for this function:

◆ score()

quint16 EventMessage::score ( ) const

Returns the EventMessage data message's score field's current value.

Do not populate directly. Autogenerated by decoder for sport_point subfield components

Returns
the score field value.

Definition at line 142 of file eventmessage.cpp.

143 {
144  Q_D(const EventMessage);
145  return d->score;
146 }

Referenced by setScore().

Here is the caller graph for this function:

◆ setData()

void EventMessage::setData ( const quint32  data)

Sets the data field to data.

Parameters
dataThe field value to set.

Definition at line 299 of file eventmessage.cpp.

300 {
301  Q_D(EventMessage);
302  d->data = data;
303 }
quint32 data() const
Returns the EventMessage data message's data field's current value.

References data().

Here is the call graph for this function:

◆ setData16()

void EventMessage::setData16 ( const quint16  data16)

Sets the data16 field to data16.

Parameters
data16The field value to set.

Definition at line 289 of file eventmessage.cpp.

290 {
291  Q_D(EventMessage);
292  d->data16 = data16;
293 }
quint16 data16() const
Returns the EventMessage data message's data16 field's current value.

References data16().

Here is the call graph for this function:

◆ setDeviceIndex()

void EventMessage::setDeviceIndex ( const DeviceIndex  deviceIndex)

Sets the deviceIndex field to deviceIndex.

Parameters
deviceIndexThe field value to set.

Definition at line 379 of file eventmessage.cpp.

380 {
381  Q_D(EventMessage);
382  d->deviceIndex = deviceIndex;
383 }
DeviceIndex deviceIndex() const
Returns the EventMessage data message's deviceIndex field's current value.

References deviceIndex().

Here is the call graph for this function:

◆ setEvent()

void EventMessage::setEvent ( const Event  event)

Sets the event field to event.

Parameters
eventThe field value to set.

Definition at line 269 of file eventmessage.cpp.

270 {
271  Q_D(EventMessage);
272  d->event = event;
273 }
Event event() const
Returns the EventMessage data message's event field's current value.

References event().

Here is the call graph for this function:

◆ setEventGroup()

void EventMessage::setEventGroup ( const quint8  eventGroup)

Sets the eventGroup field to eventGroup.

Parameters
eventGroupThe field value to set.

Definition at line 309 of file eventmessage.cpp.

310 {
311  Q_D(EventMessage);
312  d->eventGroup = eventGroup;
313 }
quint8 eventGroup() const
Returns the EventMessage data message's eventGroup field's current value.

References eventGroup().

Here is the call graph for this function:

◆ setEventType()

void EventMessage::setEventType ( const EventType  eventType)

Sets the eventType field to eventType.

Parameters
eventTypeThe field value to set.

Definition at line 279 of file eventmessage.cpp.

280 {
281  Q_D(EventMessage);
282  d->eventType = eventType;
283 }
EventType eventType() const
Returns the EventMessage data message's eventType field's current value.

References eventType().

Here is the call graph for this function:

◆ setFrontGear()

void EventMessage::setFrontGear ( const quint8z  frontGear)

Sets the frontGear field to frontGear.

Parameters
frontGearThe field value to set.

Definition at line 349 of file eventmessage.cpp.

350 {
351  Q_D(EventMessage);
352  d->frontGear = frontGear;
353 }
quint8z frontGear() const
Returns the EventMessage data message's frontGear field's current value.

References frontGear().

Here is the call graph for this function:

◆ setFrontGearNum()

void EventMessage::setFrontGearNum ( const quint8z  frontGearNum)

Sets the frontGearNum field to frontGearNum.

Parameters
frontGearNumThe field value to set.

Definition at line 339 of file eventmessage.cpp.

340 {
341  Q_D(EventMessage);
342  d->frontGearNum = frontGearNum;
343 }
quint8z frontGearNum() const
Returns the EventMessage data message's frontGearNum field's current value.

References frontGearNum().

Here is the call graph for this function:

◆ setOpponentScore()

void EventMessage::setOpponentScore ( const quint16  opponentScore)

Sets the opponentScore field to opponentScore.

Parameters
opponentScoreThe field value to set.

Definition at line 329 of file eventmessage.cpp.

330 {
331  Q_D(EventMessage);
332  d->opponentScore = opponentScore;
333 }
quint16 opponentScore() const
Returns the EventMessage data message's opponentScore field's current value.

References opponentScore().

Here is the call graph for this function:

◆ setRadarThreatCount()

void EventMessage::setRadarThreatCount ( const quint8  radarThreatCount)

Sets the radarThreatCount field to radarThreatCount.

Parameters
radarThreatCountThe field value to set.

Definition at line 399 of file eventmessage.cpp.

400 {
401  Q_D(EventMessage);
402  d->radarThreatCount = radarThreatCount;
403 }
quint8 radarThreatCount() const
Returns the EventMessage data message's radarThreatCount field's current value.

References radarThreatCount().

Here is the call graph for this function:

◆ setRadarThreatLevelMax()

void EventMessage::setRadarThreatLevelMax ( const RadarThreatLevelType  radarThreatLevelMax)

Sets the radarThreatLevelMax field to radarThreatLevelMax.

Parameters
radarThreatLevelMaxThe field value to set.

Definition at line 389 of file eventmessage.cpp.

390 {
391  Q_D(EventMessage);
392  d->radarThreatLevelMax = radarThreatLevelMax;
393 }
RadarThreatLevelType radarThreatLevelMax() const
Returns the EventMessage data message's radarThreatLevelMax field's current value.

References radarThreatLevelMax().

Here is the call graph for this function:

◆ setRearGear()

void EventMessage::setRearGear ( const quint8z  rearGear)

Sets the rearGear field to rearGear.

Parameters
rearGearThe field value to set.

Definition at line 369 of file eventmessage.cpp.

370 {
371  Q_D(EventMessage);
372  d->rearGear = rearGear;
373 }
quint8z rearGear() const
Returns the EventMessage data message's rearGear field's current value.

References rearGear().

Here is the call graph for this function:

◆ setRearGearNum()

void EventMessage::setRearGearNum ( const quint8z  rearGearNum)

Sets the rearGearNum field to rearGearNum.

Parameters
rearGearNumThe field value to set.

Definition at line 359 of file eventmessage.cpp.

360 {
361  Q_D(EventMessage);
362  d->rearGearNum = rearGearNum;
363 }
quint8z rearGearNum() const
Returns the EventMessage data message's rearGearNum field's current value.

References rearGearNum().

Here is the call graph for this function:

◆ setScore()

void EventMessage::setScore ( const quint16  score)

Sets the score field to score.

Parameters
scoreThe field value to set.

Definition at line 319 of file eventmessage.cpp.

320 {
321  Q_D(EventMessage);
322  d->score = score;
323 }
quint16 score() const
Returns the EventMessage data message's score field's current value.

References score().

Here is the call graph for this function:

◆ setTimestamp()

void EventMessage::setTimestamp ( const DateTime  timestamp)

Sets the timestamp field to timestamp.

Parameters
timestampThe field value to set.

Definition at line 259 of file eventmessage.cpp.

260 {
261  Q_D(EventMessage);
262  d->timestamp = timestamp;
263 }
DateTime timestamp() const
Returns the EventMessage data message's timestamp field's current value.

References timestamp().

Here is the call graph for this function:

◆ timestamp()

DateTime EventMessage::timestamp ( ) const

Returns the EventMessage data message's timestamp field's current value.

Returns
the timestamp field value.

Definition at line 74 of file eventmessage.cpp.

75 {
76  Q_D(const EventMessage);
77  return d->timestamp;
78 }

Referenced by setTimestamp().

Here is the caller graph for this function:

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