Garmin Fleet Management Controller  2.19.0
SensorListItem.h
Go to the documentation of this file.
1 /*********************************************************************
2 *
3 * HEADER NAME:
4 * SensorListItem.h
5 *
6 * Copyright 2014 by Garmin Ltd. or its subsidiaries.
7 *---------------------------------------------------------------------
8 * $NoKeywords$
9 *********************************************************************/
10 #ifndef _SENSORLISTITEM_H
11 #define _SENSORLISTITEM_H
12 
13 #include "ClientListItem.h"
14 #include "fmi.h"
15 #include "FmiApplicationLayer.h"
16 
17 #if( FMI_SUPPORT_A617 )
18 
23 {
24 public:
25 
27 
28  typedef uint32 key_type;
29 
30  uint32 getNumUpdates() const;
31 
32  uint32 getUniqueId() const;
33 
34  uint16 getIcon() const;
35 
36  uint8 getDisplayIndex() const;
37 
38  const char* getName() const;
39 
40  uint8 getSeverity() const;
41 
42  boolean getPlaySound() const;
43 
44  boolean getRecordSensor() const;
45 
46  const char* getStatus() const;
47 
48  const char* getDescription() const;
49 
50  void setParent
51  (
53  );
54 
55  virtual void readFromStream
56  (
57  std::istream &aStream
58  );
59 
60  virtual void writeToStream
61  (
62  std::ofstream &aStream
63  );
64 
65  void setConfig
66  (
68  );
69 
70  void setUpdate
71  (
73  );
74 
75  void setCurrentName
76  (
77  CString aName
78  );
79 
80  void setDisplayIndex
81  (
82  uint8 index
83  );
84 
85 private:
86  //keep track of the number of updates for each sensor for
87  //code convenience
89 
91 
93 
96 
97  uint32 getChangeId() const;
98 };
99 
100 #endif
101 
102 #endif
boolean getPlaySound() const
Get the play sound setting.
uint32 getNumUpdates() const
Get the number of updates submitted.
Data type for Update Sensor Request Packet ID (0x1406) from server to client.
Definition: fmi.h:2184
boolean getRecordSensor() const
Get the record sensor setting.
fmi_sensor_config_request mConfig
uint32 getChangeId() const
Get the change id.
Data structure to hold details of an A617 sensor that the server needs to keep.
FileBackedMap< SensorListItem > * mParent
The map that this item belongs to, or NULL if none.
void setCurrentName(CString aName)
Set the current name of the sensor.
void setDisplayIndex(uint8 index)
Set dispolay index in the list.
fmi_sensor_update_request mUpdate
virtual void readFromStream(std::istream &aStream)
Read a ClientListItem from an input stream.
unsigned short int uint16
16-bit unsigned integer
Definition: garmin_types.h:64
uint8 getDisplayIndex() const
Get display index.
virtual void writeToStream(std::ofstream &aStream)
Stores the name associated with a list item that is sent to the client.
const char * getName() const
Get name.
void setUpdate(fmi_sensor_update_request mUpdate)
Set the update.
unsigned char uint8
8-bit unsigned integer
Definition: garmin_types.h:62
uint32 getUniqueId() const
Get the unique id.
uint8 getSeverity() const
Get the severity.
Data type for Configure Sensor Request Packet ID (0x1402) from server to client.
Definition: fmi.h:2155
const char * getStatus() const
Get the status.
uint16 getIcon() const
Get icon.
void setConfig(fmi_sensor_config_request aConfig)
Set the sensor.
unsigned long int uint32
32-bit unsigned integer
Definition: garmin_types.h:66
void setParent(FileBackedMap< SensorListItem > *aParent)
Set the parent.
const char * getDescription() const
Get the description.
SensorListItem()
Constructor.