Garmin Fleet Management Controller
2.19.0
|
Data structure to hold details of an A617 sensor that the server needs to keep. More...
#include <SensorListItem.h>
Public Types | |
typedef uint32 | key_type |
Public Member Functions | |
SensorListItem () | |
Constructor. More... | |
void | commitName () |
Commit the item name. More... | |
CString | getCurrentName () const |
Get the current name of this item. More... | |
const char * | getDescription () const |
Get the description. More... | |
uint8 | getDisplayIndex () const |
Get display index. More... | |
uint16 | getIcon () const |
Get icon. More... | |
const key_type & | getId () const |
Get item's ID. More... | |
const char * | getName () const |
Get name. More... | |
uint32 | getNumUpdates () const |
Get the number of updates submitted. More... | |
boolean | getPlaySound () const |
Get the play sound setting. More... | |
boolean | getRecordSensor () const |
Get the record sensor setting. More... | |
uint8 | getSeverity () const |
Get the severity. More... | |
const char * | getStatus () const |
Get the status. More... | |
uint32 | getUniqueId () const |
Get the unique id. More... | |
BOOL | isValid () const |
Check whether this item is valid. More... | |
virtual void | readFromStream (std::istream &aStream) |
Read a ClientListItem from an input stream. More... | |
void | setConfig (fmi_sensor_config_request aConfig) |
Set the sensor. More... | |
void | setCurrentName (CString aName) |
Set the current name of the sensor. More... | |
void | setDisplayIndex (uint8 index) |
Set dispolay index in the list. More... | |
void | setId (const key_type &aId) |
Set item's ID. More... | |
void | setParent (FileBackedMap< SensorListItem > *aParent) |
Set the parent. More... | |
void | setParent (FileBackedMap< ClientListItem > *aParent) |
Set the parent. More... | |
void | setUpdate (fmi_sensor_update_request mUpdate) |
Set the update. More... | |
void | setUpdateName (CString aName) |
Set pending name. More... | |
void | setValid (BOOL aValid=TRUE) |
Set this item as valid. More... | |
virtual void | writeToStream (std::ofstream &aStream) |
virtual void | writeToStream (std::ofstream &aStream) const |
Write a ClientListItem to an output stream. More... | |
Protected Member Functions | |
virtual void | save () |
Save this item. More... | |
Protected Attributes | |
CString | mCurrentName |
The last name acknowledged by the client. More... | |
key_type | mId |
The unique ID of this item. More... | |
BOOL | mIsValid |
True if this list item is mIsValid. More... | |
CString | mUpdateName |
The last name entered by the user. More... | |
Private Member Functions | |
uint32 | getChangeId () const |
Get the change id. More... | |
Private Attributes | |
fmi_sensor_config_request | mConfig |
FileBackedMap< SensorListItem > * | mParent |
The map that this item belongs to, or NULL if none. More... | |
fmi_sensor_update_request | mUpdate |
uint32 | numUpdates |
Data structure to hold details of an A617 sensor that the server needs to keep.
Definition at line 22 of file SensorListItem.h.
typedef uint32 SensorListItem::key_type |
Definition at line 28 of file SensorListItem.h.
SensorListItem::SensorListItem | ( | ) |
|
inherited |
Commit the item name.
Commit the item name and set the ClientListItem as valid
Definition at line 29 of file ClientListItem.cpp.
References ClientListItem::mCurrentName, ClientListItem::mUpdateName, and ClientListItem::setValid().
Referenced by FmiApplicationLayer::rx().
|
private |
Get the change id.
Definition at line 204 of file SensorListItem.cpp.
References fmi_sensor_config_request::change_id, and mConfig.
Referenced by writeToStream().
|
inherited |
Get the current name of this item.
Definition at line 39 of file ClientListItem.cpp.
References ClientListItem::mCurrentName.
Referenced by CDriverIdAndStatusDlg::OnLbnSelchangeStatuslist(), FmiApplicationLayer::procDriverStatusUpdate(), CSendSensorDlg::RefreshList(), and FmiApplicationLayer::rx().
const char * SensorListItem::getDescription | ( | ) | const |
Get the description.
Definition at line 285 of file SensorListItem.cpp.
References fmi_sensor_update_request::description, mUpdate, and setConfig().
Referenced by CSendSensorDlg::RefreshList(), and writeToStream().
uint8 SensorListItem::getDisplayIndex | ( | ) | const |
Get display index.
Definition at line 231 of file SensorListItem.cpp.
References fmi_sensor_config_request::display_index, and mConfig.
Referenced by CSendSensorDlg::RefreshList(), and writeToStream().
uint16 SensorListItem::getIcon | ( | ) | const |
Get icon.
Definition at line 222 of file SensorListItem.cpp.
References fmi_sensor_config_request::icon, and mConfig.
Referenced by CSendSensorDlg::RefreshList(), and writeToStream().
|
inherited |
Get item's ID.
Get the unique ID of this item
Definition at line 49 of file ClientListItem.cpp.
References ClientListItem::mId.
Referenced by FmiApplicationLayer::rx().
const char * SensorListItem::getName | ( | ) | const |
Get name.
Definition at line 240 of file SensorListItem.cpp.
References mConfig, and fmi_sensor_config_request::name.
uint32 SensorListItem::getNumUpdates | ( | ) | const |
Get the number of updates submitted.
Definition at line 195 of file SensorListItem.cpp.
References numUpdates.
Referenced by CSendSensorDlg::RefreshList().
boolean SensorListItem::getPlaySound | ( | ) | const |
Get the play sound setting.
Definition at line 258 of file SensorListItem.cpp.
References mUpdate, and fmi_sensor_update_request::play_sound.
Referenced by CSendSensorDlg::RefreshList(), and writeToStream().
boolean SensorListItem::getRecordSensor | ( | ) | const |
Get the record sensor setting.
Definition at line 267 of file SensorListItem.cpp.
References mUpdate, and fmi_sensor_update_request::record_sensor.
Referenced by CSendSensorDlg::RefreshList(), and writeToStream().
uint8 SensorListItem::getSeverity | ( | ) | const |
Get the severity.
Definition at line 249 of file SensorListItem.cpp.
References mUpdate, and fmi_sensor_update_request::severity.
Referenced by CSendSensorDlg::RefreshList().
const char * SensorListItem::getStatus | ( | ) | const |
Get the status.
Definition at line 276 of file SensorListItem.cpp.
References mUpdate, and fmi_sensor_update_request::status.
Referenced by CSendSensorDlg::RefreshList(), and writeToStream().
uint32 SensorListItem::getUniqueId | ( | ) | const |
Get the unique id.
Definition at line 213 of file SensorListItem.cpp.
References mConfig, and fmi_sensor_config_request::unique_id.
Referenced by CSendSensorDlg::RefreshList(), and setUpdate().
|
inherited |
Check whether this item is valid.
Definition at line 58 of file ClientListItem.cpp.
References ClientListItem::mIsValid, and ClientListItem::readFromStream().
Referenced by CFileTransferDlg::AddPSRtoStopList(), CAobrdDriversDlg::OnBnClickedSet(), FmiApplicationLayer::procDriverStatusUpdate(), and FmiApplicationLayer::rx().
|
virtual |
Read a ClientListItem from an input stream.
Read id and current name from the input stream, and updates the member variables appropriately.
aStream | The stream to read from |
Reimplemented from ClientListItem.
Definition at line 24 of file SensorListItem.cpp.
References fmi_sensor_config_request::change_id, fmi_sensor_update_request::change_id, fmi_sensor_update_request::description, fmi_sensor_config_request::display_index, fmi_sensor_config_request::icon, fmi_sensor_config_request::name, numUpdates, fmi_sensor_update_request::play_sound, fmi_sensor_update_request::record_sensor, setConfig(), setCurrentName(), ClientListItem::setId(), setUpdate(), ClientListItem::setValid(), fmi_sensor_update_request::severity, fmi_sensor_update_request::status, fmi_sensor_config_request::unique_id, and fmi_sensor_update_request::unique_id.
|
protectedvirtualinherited |
Save this item.
Invokes parent to save all items
Reimplemented in AobrdDriverItem, WaypointListItem, and DriverLoginItem.
Definition at line 172 of file ClientListItem.cpp.
References ClientListItem::mParent, and FileBackedMap< T >::save().
Referenced by ClientListItem::setValid().
void SensorListItem::setConfig | ( | fmi_sensor_config_request | aConfig | ) |
Set the sensor.
aConfig | The config that serves as our sensor |
Definition at line 295 of file SensorListItem.cpp.
References mConfig, and setUpdate().
Referenced by getDescription(), CSendSensorDlg::OnBnClickedCreate(), and readFromStream().
void SensorListItem::setCurrentName | ( | CString | aName | ) |
Set the current name of the sensor.
aName | The new name of the sensor |
Definition at line 335 of file SensorListItem.cpp.
References ClientListItem::mCurrentName, and setDisplayIndex().
Referenced by CSendSensorDlg::OnBnClickedCreate(), readFromStream(), and setParent().
void SensorListItem::setDisplayIndex | ( | uint8 | index | ) |
Set dispolay index in the list.
index,the | new index |
Definition at line 346 of file SensorListItem.cpp.
References fmi_sensor_config_request::display_index, and mConfig.
Referenced by setCurrentName().
|
inherited |
Set item's ID.
aId | The item's ID |
Definition at line 101 of file ClientListItem.cpp.
References ClientListItem::mId, and ClientListItem::setParent().
Referenced by CSendSensorDlg::OnBnClickedCreate(), CStopNewDlg::OnBnClickedOk(), ClientListItem::readFromStream(), readFromStream(), and FmiApplicationLayer::sendCannedMessage().
void SensorListItem::setParent | ( | FileBackedMap< SensorListItem > * | aParent | ) |
Set the parent.
aParent | The FileBackedMap that contains this item |
Definition at line 323 of file SensorListItem.cpp.
References mParent, and setCurrentName().
Referenced by CSendSensorDlg::OnBnClickedCreate(), and setUpdate().
|
inherited |
Set the parent.
aParent | The FileBackedMap that contains this item |
Definition at line 113 of file ClientListItem.cpp.
References ClientListItem::mParent, and ClientListItem::setUpdateName().
Referenced by ClientListItem::setId().
void SensorListItem::setUpdate | ( | fmi_sensor_update_request | aUpdate | ) |
Set the update.
aUpdate | The update to this sensor |
Definition at line 307 of file SensorListItem.cpp.
References getUniqueId(), mUpdate, numUpdates, setParent(), and fmi_sensor_update_request::unique_id.
Referenced by readFromStream(), and setConfig().
|
inherited |
Set pending name.
Set the pending name of this ClientListItem. This does not become the item's name until commitName is called.
aName | The pending name to set |
Definition at line 127 of file ClientListItem.cpp.
References ClientListItem::mUpdateName, and ClientListItem::setValid().
Referenced by FmiApplicationLayer::sendCannedMessage(), FmiApplicationLayer::sendCannedResponse(), FmiApplicationLayer::sendCreateWaypointCat(), FmiApplicationLayer::sendDriverStatusListItem(), FmiApplicationLayer::sendWaypoint(), and ClientListItem::setParent().
|
inherited |
Set this item as valid.
Set the valid flag. If this item is part of a FileBackedMap, save the map.
aValid | If TRUE, the item is valid. |
Definition at line 141 of file ClientListItem.cpp.
References ClientListItem::mIsValid, ClientListItem::save(), and ClientListItem::writeToStream().
Referenced by CFileTransferDlg::AddPSRtoStopList(), CMapViewerDlg::addStopToCatalog(), ClientListItem::commitName(), CSendSensorDlg::OnBnClickedCreate(), CStopNewDlg::OnBnClickedOk(), readFromStream(), FmiApplicationLayer::rx(), FmiApplicationLayer::sendA603Stop(), FmiApplicationLayer::sendDeleteWaypointCat(), CMapViewerDlg::sendRouteToDevice(), AobrdDriverItem::setCarrierID(), AobrdDriverItem::setCarrierName(), AobrdDriverItem::setFirstName(), AobrdDriverItem::setLastName(), AobrdDriverItem::setLoadTypeRuleset(), AobrdDriverItem::setLongTermRuleset(), DriverLoginItem::setPassword(), AobrdDriverItem::setPassword(), AobrdDriverItem::setTimeZone(), and ClientListItem::setUpdateName().
|
virtual |
Definition at line 122 of file SensorListItem.cpp.
References fmi_sensor_update_request::change_id, getChangeId(), getDescription(), getDisplayIndex(), getIcon(), getPlaySound(), getRecordSensor(), getStatus(), mUpdate, numUpdates, fmi_sensor_update_request::severity, fmi_sensor_update_request::unique_id, and ClientListItem::writeToStream().
|
virtualinherited |
Write a ClientListItem to an output stream.
Append id and current name to the output stream.
aStream | The stream to write to |
Reimplemented in AobrdDriverItem, DriverLoginItem, and WaypointListItem.
Definition at line 155 of file ClientListItem.cpp.
References ClientListItem::mCurrentName, and ClientListItem::mId.
Referenced by ClientListItem::setValid(), WaypointListItem::writeToStream(), and writeToStream().
|
private |
Definition at line 90 of file SensorListItem.h.
Referenced by getChangeId(), getDisplayIndex(), getIcon(), getName(), getUniqueId(), setConfig(), and setDisplayIndex().
|
protectedinherited |
The last name acknowledged by the client.
Definition at line 75 of file ClientListItem.h.
Referenced by ClientListItem::ClientListItem(), ClientListItem::commitName(), ClientListItem::getCurrentName(), ClientListItem::readFromStream(), StopListItem::setCurrentName(), setCurrentName(), and ClientListItem::writeToStream().
|
protectedinherited |
The unique ID of this item.
Definition at line 84 of file ClientListItem.h.
Referenced by ClientListItem::getId(), ClientListItem::readFromStream(), ClientListItem::setId(), and ClientListItem::writeToStream().
|
protectedinherited |
True if this list item is mIsValid.
Definition at line 81 of file ClientListItem.h.
Referenced by ClientListItem::ClientListItem(), ClientListItem::isValid(), InboxListItem::readFromStream(), DriverLoginItem::readFromStream(), ClientListItem::readFromStream(), AobrdDriverItem::readFromStream(), and ClientListItem::setValid().
|
private |
The map that this item belongs to, or NULL if none.
Definition at line 95 of file SensorListItem.h.
Referenced by setParent().
|
private |
Definition at line 92 of file SensorListItem.h.
Referenced by getDescription(), getPlaySound(), getRecordSensor(), getSeverity(), getStatus(), setUpdate(), and writeToStream().
|
protectedinherited |
The last name entered by the user.
Definition at line 78 of file ClientListItem.h.
Referenced by ClientListItem::ClientListItem(), ClientListItem::commitName(), ClientListItem::readFromStream(), and ClientListItem::setUpdateName().
|
private |
Definition at line 88 of file SensorListItem.h.
Referenced by getNumUpdates(), readFromStream(), SensorListItem(), setUpdate(), and writeToStream().