Garmin Fleet Management Controller  2.19.0
FmiApplicationLayer Class Reference

Serial communication controller for Garmin and FMI packets. More...

#include <FmiApplicationLayer.h>

+ Inheritance diagram for FmiApplicationLayer:

Public Types

enum  transfer_state {
  TRANSFER_NOT_STARTED,
  TRANSFER_STARTED,
  TRANSFER_IN_PROGRESS,
  TRANSFER_COMPLETED,
  TRANSFER_FAILED
}
 Enum to track file transfer status. More...
 

Public Member Functions

 FmiApplicationLayer (id_type freeformFmiPacketId)
 Constructor. More...
 
virtual ~FmiApplicationLayer ()
 Destructor. More...
 
void clearError ()
 Clear any communication error. More...
 
virtual void disconnectTransportLayer ()
 Disconnect the TransportLayer from this ApplicationLayer. More...
 
uint32 getNextStopId ()
 Find an available stop ID. More...
 
const char * getReceiveFilename (uint8 file_type) const
 Determine which filename to store a received file under. More...
 
virtual void onAck (const Packet *aPacket)
 Callback when a packet is ACKed by the client. More...
 
void rebootDevice ()
 Send a command to the attached device to reboot it. More...
 
void removeStopByIndex (uint16 aDeletedStopIndex)
 Remove a deleted stop. More...
 
void retryBaudRateSync ()
 
virtual bool rx (const Packet *aPacket)
 Handle a packet received from the client. More...
 
void sendA602Stop (double aLatitude, double aLongitude, char *aStopName)
 Initiates the A602 stop protocol. More...
 
void sendA602TextMessage (fmi_id_type aFmiPacketId, char *aMessageText, const MessageId &aMessageId)
 Send a server to client text message, for all A602 FMI protocols. More...
 
void sendA603Stop (double aLatitude, double aLongitude, char *aStopName, uint32 aStopId)
 Initiates the A603 stop protocol. More...
 
void sendA604TextMessage (const char *aMessageText, const MessageId &aMessageId, uint8 aMessageType=A604_MESSAGE_TYPE_NORMAL)
 Send an A604 server to client open text message. More...
 
void sendA607DriverIdRequest (uint8 aDriverIndex)
 Ask the client for the current Driver ID. More...
 
void sendA607DriverIdUpdate (char *aDriverId, uint8 aIndex)
 Send an A607 Driver ID Update to the client. More...
 
void sendA607DriverStatusRequest (uint8 aDriverIndex)
 Ask the client for the current Driver Status. More...
 
void sendA607DriverStatusUpdate (uint32 aDriverStatusId, uint8 aIndex)
 Initiate the A607 Driver Status Update protocol. More...
 
bool sendA611LongTextMessage (const char *aMessageText, const MessageId &aMessageId, uint8 aMessageType)
 Send an A611 server to client long text message. More...
 
void sendAOBRDDriverLogoff (const AobrdDriverItem &driver)
 Send an AOBRD driver logoff command to the device. More...
 
void sendAOBRDDriverProfile (const AobrdDriverItem &driver)
 Send an AOBRD driver profile to the device. More...
 
void sendAOBRDOdometerValue (uint32 aOdometer)
 Send AOBRD Odometer value to device. More...
 
void sendAutoArrival (uint32 aArrivalTime, uint32 aArrivalDistance)
 Send a request to update the auto-arrival preferences. More...
 
void sendCannedMessage (uint32 aMessageId, CString aMessageText)
 Transmit a new or updated canned message to the client. More...
 
void sendCannedResponse (uint32 aResponseId, CString aResponseText)
 Transmit a new or updated canned response to the client. More...
 
bool sendCannedResponseTextMessage (const char *aMessageText, const MessageId &aMessageId, uint8 aResponseCount, const uint32 *aResponseList, uint8 aMessageType)
 Initiate the canned response text message protocol. More...
 
void sendCreateWaypointCat (uint8 aCatId, CString &aCatName)
 Create waypoint category. More...
 
void sendDataDeletionRequest (del_data aDataType)
 Send a data deletion request and remove the appropriate data from the server. More...
 
void sendDeleteCannedMessageRequest (uint32 aMessageId)
 Send a request to the client to delete a canned message. More...
 
void sendDeleteCannedResponseRequest (uint32 aResponseId)
 Send a request to the client to delete a canned response. More...
 
void sendDeleteDriverStatusListItem (uint32 aDriverStatusId)
 Initiate the Delete Driver Status List Item protocol. More...
 
void sendDeleteWaypoint (uint16 aUniqueId)
 Delete a waypoint. More...
 
void sendDeleteWaypointCat (uint16 aCatIdx)
 Delete waypoint category. More...
 
void sendDriverIdRequest ()
 Ask the client for the current Driver ID. More...
 
void sendDriverIdUpdate (char *aDriverId)
 Send a Driver ID Update to the client. More...
 
void sendDriverStatusListItem (uint32 aDriverStatusId, CString aDriverStatusText)
 Initiate the Set Driver Status List Item protocol. More...
 
void sendDriverStatusRequest ()
 Asks the client for the current driver status. More...
 
void sendDriverStatusUpdate (uint32 aDriverStatusId)
 Initiate the Driver Status Update protocol. More...
 
void sendEnable (uint16 *aFeatureCodes=NULL, uint8 aFeatureCount=0)
 Transmit an FMI Enable packet, and clear any error state. More...
 
void sendEnablePvtCommand (bool aEnable)
 Send an Enable PVT or Disable PVT command. More...
 
void sendEtaModeRequest (FMI_eta_mode_type aModeType)
 Send an ETA mode request. More...
 
void sendEtaRequest ()
 Send a request for ETA data. More...
 
void sendFile (char *aFilename, uint8 aVersionLength, uint8 *aVersion, uint8 aFileType, BOOL gzipIt=FALSE)
 Start a file transfer protocol. More...
 
void sendFmiPacket (uint16 aFmiPacketId, uint8 *aFmiPayload, uint8 aFmiPayloadSize)
 Send an arbitrary FMI packet. More...
 
void sendFmiSafeModeSpeed (float speed)
 Set FMI safe mode speed. More...
 
void sendFreeformFmiPacket (fmi_id_type const aFmiPacketId, uint8 const *const aFmiPayload, uint8 const aFmiPayloadSize)
 
void sendGpiFileInfoRequest ()
 Send a GPI File Information Request to the client. More...
 
void sendMessageDeleteRequest (const MessageId &aMessageId)
 Ask the server to delete a text message. More...
 
void sendMessageThrottlingQuery ()
 Initiate the Message Throttling Query protocol. More...
 
void sendMessageThrottlingUpdate (uint16 aPacketId, uint16 aNewState)
 Sends an update to the client to tell it whether to enable or disable a protocol. More...
 
void sendPing ()
 Send a ping packet to the client. More...
 
void sendProductRequest ()
 Send an FMI Product ID request. More...
 
void sendSetSpeedLimitAlerts (uint8 aMode, uint8 aTimeOver, uint8 aTimeUnder, boolean aAlertUser, float aThreshold)
 Set FMI speed limit alerts. More...
 
void sendStopMoveRequest (uint16 aMoveToIndex, uint16 aMoveFromIndex)
 Send a stop move request. More...
 
void sendStopSortRequest ()
 Sends a sort stop list request to the client. More...
 
void sendStopStatusRequest (uint32 aStopId, stop_status_status_type aStopStatus, uint16 aMoveToIndex=INVALID16)
 Initiate the Stop Status protocol to update an A603 stop. More...
 
void sendTextMessageStatusRequest (const MessageId &aMessageId)
 Ask the server for the aStopStatus of a text message. More...
 
void sendUnitIdRequest ()
 Request the Unit ID (ESN) from the client. More...
 
void sendUserInterfaceText (uint32 aElementId, char *aText)
 Request that the text of a particular user interface text element be changed. More...
 
void sendWaypoint (uint16 aUniqueId, double aLat, double aLon, uint16 aSymbol, CString &aName, uint16 aCat, CString &aComment)
 Send a waypoint. More...
 
void stopFileTransfer ()
 Stop a file transfer protocol. More...
 

Public Attributes

FileBackedMap< StopListItemmA603Stops
 Map of unique ID to stop details for all A603 stops on the client. More...
 
bool mActiveRoute
 If TRUE, the client has a stop active. More...
 
uint32 mActiveStopId
 Unique ID of the active stop. More...
 
FileBackedMap< AobrdDriverItemmAOBRDDrivers
 Map of allowed driver IDs and passwords. More...
 
FileBackedMap< ClientListItemmCannedMessages
 Map of canned message IDs to names. More...
 
FileBackedMap< ClientListItemmCannedResponses
 Map of canned response IDs to names. More...
 
FileBackedMap< ClientListItemmCategories
 Map of waypoint category IDs to names. More...
 
codepage_type mClientCodepage
 Code page used for encoding of text fields when communicating with the client. More...
 
int mClientPingCount
 Number of client-to-server pings received; can be reset by the user. More...
 
uint16 mClientProductId
 Numeric product ID reported by the client. More...
 
sint16 mClientSoftwareVersion
 Raw software version reported by the client. More...
 
char mClientUnitId [11]
 Null-terminated ASCII string containing the Unit ID (ESN) of the client. More...
 
char mDriverId [FMI_DRIVER_COUNT][50]
 Last driver ID received from the client. More...
 
FileBackedMap< DriverLoginItemmDriverLogins
 Map of allowed driver IDs and passwords. More...
 
char mDriverStatus [FMI_DRIVER_COUNT][50]
 Last driver status received from the client. More...
 
FileBackedMap< ClientListItemmDriverStatuses
 Map of driver status IDs to names. More...
 
bool mEnablePending
 If true, the FMI Enable protocol is in progress. More...
 
char mEtaDistance [13]
 Null-terminated ASCII string containing the distance to the current destination, including units. More...
 
char mEtaLatitude [14]
 String representing the latitude in decimal degrees (and N or S) More...
 
char mEtaLongitude [14]
 String representing the longitude in decimal degrees (and E or W) More...
 
uint8 mEtaMode
 Unique ID of the active stop. More...
 
char mEtaTime [13]
 String containing the ETA time from the client, or "invalid". More...
 
uint32 mFileSize
 file size (FMI_GPI_FILE_INFORMATION) More...
 
uint32 mFileTransferBytesDone
 Number of bytes of the file that have been transferred so far. More...
 
uint32 mFileTransferSize
 Total number of bytes in the file being transferred. More...
 
transfer_state mFileTransferState
 State of the current file transfer (in progress, completed, etc.) More...
 
uint8 mFileVersion [16]
 file version (FMI_GPI_FILE_INFORMATION) More...
 
uint8 mFileVersionLength
 Number of significant bytes in mFileVersion. More...
 
id_type mFreeformFmiPacketId
 Defaults to ID_FMI_PACKET unless overridden on command line. More...
 
char mHorizontalVelocity [15]
 2-D velocity in the horizontal plane in meters per second from the last PVT packet, as an ASCII null-terminated string More...
 
CTime mLastClientPingTime
 Last time when a client to server ping was received. More...
 
CTime mLastServerPingTime
 Last time when a server to client ping was received. More...
 
char mProtocols [PROTOCOL_SIZE]
 Null-terminated ASCII string containing the protocols supported by the client. More...
 
char mPvtAltitude [13]
 Altitude in meters from the last PVT packet, as an ASCII null-terminated string. More...
 
char mPvtDate [11]
 Date from the last PVT packet, as an ASCII null-terminated string of the form MM/DD/YYYY. More...
 
char mPvtEastWestVelocity [15]
 East-west velocity in meters per second from the last PVT packet, as an ASCII null-terminated string. More...
 
char mPVTFixType [9]
 GPS fix type from the last PVT packet, interpreted as an null-terminated ASCII string. More...
 
char mPvtLatitude [14]
 Latitude in degrees from the last PVT packet, as an ASCII null-terminated string. More...
 
char mPvtLongitude [14]
 Longitude in degrees from the last PVT packet, as an ASCII null-terminated string. More...
 
char mPvtNorthSouthVelocity [15]
 North-south velocity in meters per second from the last PVT packet, as an ASCII null-terminated string. More...
 
char mPvtTime [13]
 Time from the last PVT packet. More...
 
char mPvtUpDownVelocity [15]
 Up-down velocity in meters per second from the last PVT packet, as an ASCII null-terminated string. More...
 
FileBackedMap< InboxListItemmSentCannedResponseMessages
 List of message IDs for canned response text messages. More...
 
int mServerPingCount
 Number of server-to-client pings sent; can be reset by the user. More...
 
bool mStopFileTransfer
 Flag to indicate that the user wants to stop the file transfer. More...
 
std::vector< uint32mStopIndexInList
 Vector relating the stop list to unique_ids. More...
 
bool mStopListInitialized
 If TRUE, the stop list has been initialized. More...
 
message_throttling_data_type mThrottledProtocols [60]
 Response from the last Message Throttling Query Protocol. More...
 
bool mUseAOBRD
 If true, allow AOBRD driver provisioning. More...
 
bool mUseMultipleDrivers
 If true, multiple driver support is enabled. More...
 
bool mUsePasswords
 If true, driver password support is enabled. More...
 
FileBackedMap< WaypointListItemmWaypoints
 Map of waypoint IDs to names. More...
 

Protected Attributes

TransportLayermTransportLayer
 The next layer down in the stack. More...
 

Private Member Functions

void beginA611LongTextMessage (const char *aMessageText, const MessageId &aMessageId, uint8 aMessageType)
 Send the first packet of an A611 server to client long text message. More...
 
void calculate2DVelocity (float32 aNorthVelocity, float32 aEastVelocity)
 Calculate and format a 2D velocity given the north and east components. More...
 
void continueFileReceive (uint32 offset, uint8 length, uint8 const *data)
 Save received file chunk. More...
 
void endFileReceive ()
 Save received file chunk. More...
 
boolean procDriverStatusUpdate (uint32 aDriverStatusId, uint8 aDriverIndex=0)
 Process a Driver Status Update from the client. More...
 
void removeStopById (uint32 aStopId)
 Find the index of the deleted stop corresponding to a stop ID. More...
 
void resetCannedMessages ()
 Clear the canned messages on the server. More...
 
void resetCannedResponseMessages ()
 Clear the canned response text messages on the server. More...
 
void resetCannedResponses ()
 Clear the canned responses on the server. More...
 
void resetDriverStatusList ()
 Clear the driver statuses on the server. More...
 
void resetSavedStops ()
 Clear the stop list on the server. More...
 
void resetWaypoints ()
 Clear the waypoint and waypoint category lists on the server. More...
 
void sendAOBRDDriverDownloadResponseV2 (const char *driverId)
 Send an AOBRD driver profile V2 to the device per request from device. More...
 
void sendAOBRDDriverProfileV2 (const AobrdDriverItem &driver)
 Push an AOBRD driver profile V2 to the device. More...
 
void sendNextAOBRDAnnotation (char *driver_id)
 Send next AOBRD annotation to device. More...
 
void sendNextAOBRDShipment (char *driver_id)
 Send next AOBRD shipment to device. More...
 
void startFileReceive (const file_info_data_type &file_size)
 Save received file chunk. More...
 
void txCommand (command_type const aCommandId)
 Transmit Garmin command packet (packet ID = ID_COMMAND_BYTE) More...
 
void txFmi (fmi_id_type const aFmiPacketId, uint8 const *const aFmiPayload, uint8 const aFmiPayloadSize, bool const aSendNow=false)
 Transmit FMI packet (packet ID = ID_FMI_BYTE) More...
 

Private Attributes

CString mAOBRDAnnotationDriverId
 Driver ID for annotations being sent to device. More...
 
int mAOBRDCurrentAnnotationTxIndex
 Iterator for annotations being sent to device. More...
 
int mAOBRDCurrentShipmentTxIndex
 Iterator for shipments being sent to device. More...
 
CString mAOBRDShipmentDriverId
 Driver ID for shipments being sent to device. More...
 
int mAOBRDStopAnnotationTxIndex
 Iterator end for annotations being sent to device. More...
 
int mAOBRDStopShipmentTxIndex
 Iterator end for shipments being sent to device. More...
 
uint8 mBaudRateSyncRateType
 Mark which baud rate is currently being synced. More...
 
char mCannedResponseMessageBody [TEXT_MSG_BUFFER_MAX_SIZE]
 The message text for the server to client canned text message. More...
 
uint8 mCannedResponseMessageType
 The message_type for the server to client canned text message. More...
 
file_info_data_type mCurrentReceiptFile
 Current file being received. More...
 
uint8 mCurrentSendFileType
 Current file type for file being sent. More...
 
char mFilePath [200]
 Path to the file that is being transferred to the client. More...
 
file_packet_data_type mLastFilePacketSent
 The last file packet that was sent. More...
 
long_text_msg_data_type mLongTextMessage [10]
 Contains the data for the most recent long text message. More...
 
bool mLongTextMessageInProgress
 Indicates whether a long text message is in progress. More...
 
uint8 mLongTextMessagePayloadSize [10]
 Indicates the lengths of the long text message packets. More...
 
bool mRefreshingCannedMessages
 If TRUE, FmiApplicationLayer is handling a request to refresh the canned message list. More...
 
bool mRefreshingCannedResponses
 If TRUE, FmiApplicationLayer is handling a request to refresh the canned response list. More...
 
bool mRefreshingDriverStatusList
 If TRUE, FmiApplicationLayer is handling a request to refresh the driver status list. More...
 
char mSentDriverId [50]
 The last driver ID that was sent to the client. More...
 
uint32 mSentDriverStatus
 The last driver status that was sent to the client. More...
 

Detailed Description

Serial communication controller for Garmin and FMI packets.

The FmiApplicationLayer class performs the application- level communication with the client device.

Note
This implementation makes the assumption that the client correctly follows the protocols. If the client follows the link-layer protocol but does not send the application-level response, the protocol will not continue. For example, during a file transfer, a file data packet is not sent until the receipt is received for the previous packet; if the previous packet is ACKed but a receipt is not received, the file transfer will stall. A robust implementation should include appropriate timeouts at the application layer to account for this possibility.

Definition at line 72 of file FmiApplicationLayer.h.

Member Enumeration Documentation

Enum to track file transfer status.

Since
Protocol A604
Enumerator
TRANSFER_NOT_STARTED 
TRANSFER_STARTED 
TRANSFER_IN_PROGRESS 
TRANSFER_COMPLETED 
TRANSFER_FAILED 

Definition at line 82 of file FmiApplicationLayer.h.

Constructor & Destructor Documentation

FmiApplicationLayer::~FmiApplicationLayer ( )
virtual

Destructor.

Definition at line 188 of file FmiApplicationLayer.cpp.

References rx().

Member Function Documentation

void FmiApplicationLayer::beginA611LongTextMessage ( const char *  aMessageText,
const MessageId aMessageId,
uint8  aMessageType 
)
private

Send the first packet of an A611 server to client long text message.

This function is called to set up and begin sending an A611 server to client long text message. Subsequent packets of the long text message will be sent only once the previous packets have been acknowledged. Do not call this function if a long text message is already in progress.

Parameters
aMessageTextMessage text, as a null-terminated string in the client codepage
aMessageIdThe message ID
Since
Protocol A611

Definition at line 2744 of file FmiApplicationLayer.cpp.

References long_text_msg_data_type::finished_flag, FMI_ID_LONG_TEXT_MSG, MessageId::getId(), MessageId::getIdSize(), long_text_msg_data_type::id_size, LONG_TEXT_MSG_CHUNK_SIZE, mLongTextMessage, mLongTextMessageInProgress, mLongTextMessagePayloadSize, offset_of, long_text_msg_data_type::origination_time, sendA604TextMessage(), long_text_msg_data_type::sequence_number, txFmi(), long_text_msg_data_type::type, and UTIL_get_current_garmin_time().

Referenced by rx(), and sendA611LongTextMessage().

void FmiApplicationLayer::calculate2DVelocity ( float32  aNorthVelocity,
float32  aEasstVelocity 
)
private

Calculate and format a 2D velocity given the north and east components.

Formats into a human-readable speed and direction in m/s, and updates the member variable mHorizontalVelocity.

Parameters
aNorthVelocityThe north velocity in m/s; negative values represent south
aEasstVelocityThe east velocity in m/s; negative values represent west

Definition at line 4027 of file FmiApplicationLayer.cpp.

References mHorizontalVelocity, txCommand(), UTIL_calc_2d_direction(), and UTIL_calc_2d_speed().

Referenced by rx(), and sendAOBRDDriverLogoff().

void FmiApplicationLayer::clearError ( )

Clear any communication error.

Instructs the TransportLayer to retry sending the last packet.

Definition at line 2106 of file FmiApplicationLayer.cpp.

References ApplicationLayer::mTransportLayer, TransportLayer::retry(), and sendA602Stop().

Referenced by CCommErrorDlg::OnBnClickedRetry().

void FmiApplicationLayer::continueFileReceive ( uint32  offset,
uint8  length,
uint8 const *  data 
)
private

Save received file chunk.

Parameters
offsetCurrent offset
lengthLength of recieved data
dataReceived data

Definition at line 3782 of file FmiApplicationLayer.cpp.

References file_info_data_type::file_size, file_info_data_type::file_type, FMI_ID_FILE_PACKET_RCPT, getReceiveFilename(), mCurrentReceiptFile, packet_receipt_data_type::next_offset, packet_receipt_data_type::offset, and txFmi().

Referenced by rx(), and startFileReceive().

void ApplicationLayer::disconnectTransportLayer ( )
virtualinherited

Disconnect the TransportLayer from this ApplicationLayer.

Definition at line 40 of file ApplicationLayer.cpp.

References ApplicationLayer::mTransportLayer.

uint32 FmiApplicationLayer::getNextStopId ( )

Find an available stop ID.

Returns
A stop ID that is not in the map.
Since
Protocol A603

Definition at line 2329 of file FmiApplicationLayer.cpp.

References FileBackedMap< T >::begin(), FileBackedMap< T >::contains(), FileBackedMap< T >::empty(), FileBackedMap< T >::end(), mA603Stops, and removeStopById().

Referenced by CStopNewDlg::OnBnClickedOk(), and CStopNewDlg::OnInitDialog().

const char * FmiApplicationLayer::getReceiveFilename ( uint8  file_type) const

Determine which filename to store a received file under.

Parameters
file_typeThe information about the file.

Definition at line 3717 of file FmiApplicationLayer.cpp.

References FMI_FILE_TYPE_AOBRD, FMI_FILE_TYPE_CUSTOM_FORMS, FMI_FILE_TYPE_IFTA, SAVE_RECEIVED_AOBRD_LOG, SAVE_RECEIVED_FORM_SUBMIT, SAVE_RECEIVED_IFTA_FILE, and startFileReceive().

Referenced by continueFileReceive(), sendNextAOBRDAnnotation(), and startFileReceive().

void FmiApplicationLayer::onAck ( const Packet aPacket)
virtual

Callback when a packet is ACKed by the client.

If the packet that was sent was an FMI Enable packet, clear the flag that indicates that protocol is in progress.

Parameters
aPacketThe packet that the client ACKed

Implements ApplicationLayer.

Definition at line 1954 of file FmiApplicationLayer.cpp.

References data_deletion_data_type::data_type, DISABLE_FMI, EVENT_FMI_DISABLE_COMPLETE, FMI_ID_DATA_DELETION, FMI_ID_ENABLE, FMI_SUPPORT_A604, ID_FMI_PACKET, ID_HOSART_PACKET, mEnablePending, GarminPacket::mPacketId, GarminPacket::mPayload, Event::post(), and sendEnablePvtCommand().

Referenced by rx().

boolean FmiApplicationLayer::procDriverStatusUpdate ( uint32  aDriverStatusId,
uint8  aDriverIndex = 0 
)
private

Process a Driver Status Update from the client.

Parameters
aDriverStatusIdThe new driver status.
aDriverIndexThe driver index; must be zero if A607 support is not enabled.
Since
Protocol A604

Definition at line 4270 of file FmiApplicationLayer.cpp.

References FileBackedMap< T >::contains(), EVENT_FMI_DRIVER_STATUS_CHANGED, FALSE, FMI_DRIVER_COUNT, FileBackedMap< T >::get(), ClientListItem::getCurrentName(), INVALID32, ClientListItem::isValid(), mClientCodepage, mDriverStatus, mDriverStatuses, Event::post(), and TRUE.

Referenced by rx(), and sendA607DriverStatusUpdate().

void FmiApplicationLayer::rebootDevice ( )

Send a command to the attached device to reboot it.

Definition at line 4310 of file FmiApplicationLayer.cpp.

References FMI_REBOOT_DEVICE_REQUEST, and txFmi().

void FmiApplicationLayer::removeStopById ( uint32  aUniqueId)
private

Find the index of the deleted stop corresponding to a stop ID.

Since the index in the stop list is not sent back on a stop status update for a deleted stop, we must find the index that needs to be deleted before calling update_delete_stop.

Parameters
aUniqueIdThe unique_id of the stop to delete
Since
Protocol A603

Definition at line 2364 of file FmiApplicationLayer.cpp.

References mStopIndexInList, and removeStopByIndex().

Referenced by getNextStopId(), and rx().

void FmiApplicationLayer::removeStopByIndex ( uint16  aStopIndex)

Remove a deleted stop.

This function is called when the client deletes a stop or responds to a delete request by the server. It removes the unique id from the mA603Stops, updates the mStopIndexInList vector, and deletes the stop from the save file.

Parameters
aStopIndexThe index of the stop in the list.
Since
Protocol A603

Definition at line 2387 of file FmiApplicationLayer.cpp.

References FileBackedMap< T >::empty(), INVALID32, mA603Stops, mStopIndexInList, FileBackedMap< T >::remove(), and sendA603Stop().

Referenced by removeStopById().

void FmiApplicationLayer::resetCannedMessages ( )
private

Clear the canned messages on the server.

Since
Protocol A604

Definition at line 4159 of file FmiApplicationLayer.cpp.

References FileBackedMap< T >::clear(), EVENT_FMI_CANNED_MSG_LIST_CHANGED, mCannedMessages, and Event::post().

Referenced by sendDataDeletionRequest().

void FmiApplicationLayer::resetCannedResponseMessages ( )
private

Clear the canned response text messages on the server.

Since
Protocol A604

Definition at line 4170 of file FmiApplicationLayer.cpp.

References FileBackedMap< T >::clear(), and mSentCannedResponseMessages.

Referenced by sendDataDeletionRequest().

void FmiApplicationLayer::resetCannedResponses ( )
private

Clear the canned responses on the server.

Since
Protocol A604

Definition at line 4179 of file FmiApplicationLayer.cpp.

References FileBackedMap< T >::clear(), EVENT_FMI_CANNED_RESP_LIST_CHANGED, mCannedResponses, and Event::post().

Referenced by sendDataDeletionRequest().

void FmiApplicationLayer::resetDriverStatusList ( )
private

Clear the driver statuses on the server.

Since
Protocol A604

Definition at line 4190 of file FmiApplicationLayer.cpp.

References FileBackedMap< T >::clear(), EVENT_FMI_DRIVER_STATUS_LIST_CHANGED, mDriverStatuses, Event::post(), and sendA607DriverIdUpdate().

Referenced by sendDataDeletionRequest().

void FmiApplicationLayer::resetSavedStops ( )
private

Clear the stop list on the server.

Since
Protocol A603

Definition at line 4131 of file FmiApplicationLayer.cpp.

References FileBackedMap< T >::clear(), mA603Stops, and mStopIndexInList.

Referenced by sendDataDeletionRequest().

void FmiApplicationLayer::resetWaypoints ( )
private

Clear the waypoint and waypoint category lists on the server.

Since
Protocol A607

Definition at line 4144 of file FmiApplicationLayer.cpp.

References FileBackedMap< T >::clear(), EVENT_FMI_CATEGORY_LIST_CHANGED, EVENT_FMI_WAYPOINT_LIST_CHANGED, mCategories, mWaypoints, and Event::post().

Referenced by sendDataDeletionRequest().

bool FmiApplicationLayer::rx ( const Packet aPacket)
virtual

Handle a packet received from the client.

This is where all the magic happens. This function sets up the state variables containing the data received from the client to be displayed by the fmi_pc_app user interface, and dispatches Windows messages as appropriate for the user interface to process. It also transmits the next packet in the protocol when there is one.

Parameters
aPacketThe received packet to process
Returns
true if the packet was handled, false if an error occurred (for example, a packet was to be sent in response, but the send failed)

Implements ApplicationLayer.

Definition at line 206 of file FmiApplicationLayer.cpp.

References text_msg_ack_event_type::ack_text, pvt_data_type::altitude, fmi_set_baud_request::baud_rate_type, fmi_set_baud_receipt::baud_rate_type, FileBackedMap< T >::begin(), beginA611LongTextMessage(), calculate2DVelocity(), CANNED_RESP_LIST_SUCCESS, fmi_driver_profile_data_type::carrier_id, fmi_driver_profile_data_type::carrier_name, delete_by_category_rcpt_data_type::cat_id, fmi_dashcam_ntfctn_receipt_data_type::change_id, cnt_of_array, CODEPAGE_UNICODE, ClientListItem::commitName(), FileBackedMap< T >::contains(), continueFileReceive(), AobrdEventLogConverter::convertToRaw(), AobrdEventLogConverter::countRecords(), file_end_data_type::crc, custom_form_position_ack_type::current_position, protocol_support_data_type::data, file_packet_data_type::data_length, stop_calc_ack_type::distance, eta_data_type::distance_to_destination, AobrdEventLogConverter::DRIVER_ANNOTATION, driver_id_data_type::driver_id, driver_id_D607_data_type::driver_id, driver_login_service_data_type::driver_id, fmi_driver_profile_type::driver_id, fmi_driver_profile_data_type::driver_id, fmi_driver_status_update_request_data_type::driver_id, fmi_driver_status_log_dnld_resp_data_type::driver_id, fmi_driver_shipment_data_type::driver_id, fmi_shipment_download_receipt_data_type::driver_id, fmi_annotation_download_request_data_type::driver_id, fmi_driver_annotation_data_type::driver_id, fmi_driver_aobrd_ack_data_type::driver_id, driver_id_D607_data_type::driver_idx, driver_id_receipt_data_type::driver_idx, driver_status_D607_data_type::driver_idx, driver_status_receipt_data_type::driver_idx, driver_login_service_data_type::driver_password, driver_status_data_type::driver_status, driver_status_D607_data_type::driver_status, pvt_data_type::east_velocity, EMPTY_DATA, FileBackedMap< T >::end(), endFileReceive(), eta_data_type::eta_time, EVENT_ESN_RECEIVED, EVENT_FMI_A604_TXT_MSG_ERROR, EVENT_FMI_BAUD_RATE_SYNCHRONIZED, EVENT_FMI_BAUD_RATE_SYNCHRONIZING, EVENT_FMI_CANNED_MSG_LIST_CHANGED, EVENT_FMI_CANNED_RESP_LIST_CHANGED, EVENT_FMI_CANNED_RESP_LIST_RCPT_ERROR, EVENT_FMI_CATEGORY_LIST_CHANGED, EVENT_FMI_DASHCAM_CONFIG_RECEIPT, EVENT_FMI_DASHCAM_GET_NTFCTN_SETTINGS_RESPONSE, EVENT_FMI_DASHCAM_GET_SETTINGS_RESPONSE, EVENT_FMI_DASHCAM_INCIDENT_FILE_NTFCTN, EVENT_FMI_DASHCAM_LOCK_RECEIPT, EVENT_FMI_DASHCAM_NTFCTN, EVENT_FMI_DASHCAM_SET_NTFCTN_RECEIPT, EVENT_FMI_DELETE_TEXT_MESSAGE_STATUS, EVENT_FMI_DRIVER_ID_CHANGED, EVENT_FMI_DRIVER_STATUS_LIST_CHANGED, EVENT_FMI_DRIVER_STATUS_LIST_DELETE_FAILED, EVENT_FMI_ETA_MODE_RECEIVED, EVENT_FMI_ETA_RECEIVED, EVENT_FMI_FILE_TRANSFER_PROGRESS, EVENT_FMI_FILE_TRANSFER_STATE_CHANGED, EVENT_FMI_FORM_DELETED, EVENT_FMI_FORM_POSITION_CHANGED, EVENT_FMI_FORM_SHOW_FAILED, EVENT_FMI_FORM_SHOW_SUCCESS, EVENT_FMI_GPI_FILE_INFO_RECEIVED, EVENT_FMI_LONG_TEXT_MSG_ERROR, EVENT_FMI_MSG_THROTTLE_ERROR, EVENT_FMI_MSG_THROTTLE_QUERY_RESP_RECEIVED, EVENT_FMI_PING_RECEIVED, EVENT_FMI_PING_RESPONSE_RECEIVED, EVENT_FMI_ROUTE_CALCULATED, EVENT_FMI_SAFE_MODE_ERROR, EVENT_FMI_SPEED_LIMIT_SET_RESULT, EVENT_FMI_STOP_STATUS_CHANGED, EVENT_FMI_TXT_MSG_ACK, EVENT_FMI_TXT_MSG_FROM_CLIENT, EVENT_FMI_TXT_MSG_STATUS_RECEIVED, EVENT_FMI_UI_UPDATE_ERROR, EVENT_FMI_WAYPOINT_LIST_CHANGED, EVENT_PRODUCT_ID_RECEIVED, EVENT_PROTOCOLS_RECEIVED, EVENT_PVT_RECEIVED, FALSE, file_packet_data_type::file_data, file_info_data_type::file_size, file_info_data_type::file_version, file_info_data_type::file_version_length, long_text_msg_data_type::finished_flag, fmi_driver_profile_data_type::first_name, FMI_ANNOTATION_DOWNLOAD_RECEIPT, FMI_ANNOTATION_DOWNLOAD_REQUEST, FMI_ANNOTATION_DOWNLOAD_RESPONSE, FMI_BAUD_NEW_RATE_REQUEST, FMI_BAUD_RATE_38400, FMI_BAUD_RATE_57600, FMI_BAUD_RATE_9600, FMI_BAUD_RATE_OK, FMI_BAUD_RATE_SYNC_REQUEST, FMI_CUSTOM_FORM_DEL_RECEIPT, FMI_CUSTOM_FORM_GET_POS_RECEIPT, FMI_CUSTOM_FORM_MOVE_RECEIPT, FMI_CUSTOM_FORM_SHOW_RECEIPT, FMI_DASHCAM_CONFIG_RECEIPT, FMI_DASHCAM_GET_NTFCTN_SETTINGS_RESPONSE, FMI_DASHCAM_GET_SETTINGS_RESPONSE, FMI_DASHCAM_INCDNT_FILE_NTFCTN_RECEIPT, FMI_DASHCAM_INCDNT_FILE_NTFCTN_REQUEST, FMI_DASHCAM_NTFCTN_RECEIPT, FMI_DASHCAM_NTFCTN_REQUEST, FMI_DASHCAM_SET_NTFCTN_RECEIPT, FMI_DASHCAM_SETTINGS_LOCK_RECEIPT, FMI_DOWNLOAD_SHIPMENTS_REQUEST, FMI_DRIVER_COUNT, FMI_DRIVER_LOGIN_REQUEST, FMI_DRIVER_LOGIN_RESPONSE, FMI_DRIVER_PROFILE_DOWNLOAD_REQUEST, FMI_DRIVER_PROFILE_DOWNLOAD_RESPONSE, FMI_DRIVER_STATUS_UPDATE_RECEIPT, FMI_DRIVER_STATUS_UPDATE_REQUEST, FMI_DRIVER_STATUS_UPDATE_RESPONSE, FMI_ETA_SETTING_SUCCESS, FMI_FILE_TYPE_AOBRD, FMI_ID_A604_OPEN_TEXT_MSG_RCPT, FMI_ID_A607_CLIENT_OPEN_TXT_MSG, FMI_ID_CANNED_RESP_LIST_RCPT, FMI_ID_CLIENT_OPEN_TXT_MSG, FMI_ID_CLIENT_TXT_MSG_RCPT, FMI_ID_CREATE_WAYPOINT_CAT_RCPT, FMI_ID_DEL_DRIVER_STATUS_LIST_ITEM_RCPT, FMI_ID_DELETE_CANNED_MSG_RCPT, FMI_ID_DELETE_CANNED_RESPONSE_RCPT, FMI_ID_DELETE_WAYPOINT_CAT_RCPT, FMI_ID_DRIVER_ID_RCPT, FMI_ID_DRIVER_ID_UPDATE, FMI_ID_DRIVER_ID_UPDATE_D607, FMI_ID_DRIVER_STATUS_LIST_REFRESH, FMI_ID_DRIVER_STATUS_RCPT, FMI_ID_DRIVER_STATUS_UPDATE, FMI_ID_DRIVER_STATUS_UPDATE_D607, FMI_ID_ETA_DATA, FMI_ID_ETA_DATA_RCPT, FMI_ID_ETA_MODE_RCPT, FMI_ID_FILE_DATA_PACKET, FMI_ID_FILE_END_RCPT, FMI_ID_FILE_PACKET_RCPT, FMI_ID_FILE_START_RCPT, FMI_ID_FILE_TRANSFER_END, FMI_ID_FILE_TRANSFER_START, FMI_ID_GPI_FILE_INFORMATION, FMI_ID_LONG_TEXT_MSG, FMI_ID_LONG_TEXT_MSG_RCPT, FMI_ID_MSG_THROTTLING_QUERY_RESPONSE, FMI_ID_MSG_THROTTLING_RESPONSE, FMI_ID_PING, FMI_ID_PING_RESPONSE, FMI_ID_PRODUCT_ID_DATA, FMI_ID_PROTOCOL_DATA, FMI_ID_REFRESH_CANNED_MSG_LIST, FMI_ID_REFRESH_CANNED_RESP_LIST, FMI_ID_SET_CANNED_MSG_RCPT, FMI_ID_SET_CANNED_RESPONSE_RCPT, FMI_ID_SET_DRIVER_STATUS_LIST_ITEM_RCPT, FMI_ID_SORT_STOP_LIST_ACK, FMI_ID_STOP_STATUS, FMI_ID_STOP_STATUS_RCPT, FMI_ID_TEXT_MSG_ACK, FMI_ID_TEXT_MSG_ACK_RCPT, FMI_ID_TEXT_MSG_DELETE_RESPONSE, FMI_ID_TEXT_MSG_STATUS, FMI_ID_UNICODE_REQUEST, FMI_ID_UNICODE_RESPONSE, FMI_ID_USER_INTERFACE_TEXT_RCPT, FMI_ID_WAYPOINT_DELETED, FMI_ID_WAYPOINT_DELETED_RCPT, FMI_ID_WAYPOINT_RCPT, FMI_LOGIN_NO_ERRORS, FMI_SAFE_MODE_RESP, FMI_SET_BAUD_RECEIPT, FMI_SET_BAUD_REQUEST, FMI_SHIPMENT_DOWNLOAD_RECEIPT, FMI_SHIPMENT_DOWNLOAD_RESPONSE, FMI_SPEED_LIMIT_ALERT, FMI_SPEED_LIMIT_ALERT_RCPT, FMI_SPEED_LIMIT_RCPT, FMI_STOP_CALC_ACK_RECEIPT, FMI_STOP_CALC_ACK_REQUEST, custom_form_delete_ack_type::form_id, custom_form_position_ack_type::form_id, custom_form_show_ack_type::form_id, FileBackedMap< T >::get(), AobrdDriverItem::getCarrierID(), AobrdDriverItem::getCarrierName(), ClientListItem::getCurrentName(), AobrdDriverItem::getFirstName(), ClientListItem::getId(), SerialPort::getInstance(), AobrdDriverItem::getLastName(), AobrdDriverItem::getLongTermRuleset(), DriverLoginItem::getPassword(), AobrdDriverItem::getPassword(), AobrdDriverItem::getShipments(), AobrdDriverItem::getTimeZone(), GPS_FIX_2D, GPS_FIX_2D_DIFF, GPS_FIX_3D, GPS_FIX_3D_DIFF, GPS_FIX_INVALID, GPS_FIX_UNUSABLE, text_msg_ack_data_type::id, client_to_server_D607_open_text_msg_data_type::id, server_to_client_text_msg_receipt_data_type::id, canned_response_list_receipt_data_type::id, message_status_data_type::id, text_msg_id_data_type::id, category_rcpt_data_type::id, long_text_msg_receipt_data_type::id, ID_FMI_PACKET, ID_HOSART_PACKET, ID_PRODUCT_DATA, ID_PVT_DATA, text_msg_ack_data_type::id_size, client_to_server_D607_open_text_msg_data_type::id_size, server_to_client_text_msg_receipt_data_type::id_size, canned_response_list_receipt_data_type::id_size, message_status_data_type::id_size, text_msg_id_data_type::id_size, long_text_msg_receipt_data_type::id_size, ID_UNIT_ID, INVALID16, INVALID32, INVALID_LAT, ClientListItem::isValid(), fmi_driver_profile_data_type::last_name, sc_position_type::lat, double_position_type::lat, text_msg_from_client_event_type::latitude, pvt_data_type::leap_seconds, text_msg_from_client_event_type::link_id, sc_position_type::lon, double_position_type::lon, fmi_driver_profile_data_type::long_term_rule_set, LONG_TEXT_MSG_CHUNK_SIZE, LONG_TEXT_SUCCESS, text_msg_from_client_event_type::longitude, mA603Stops, mActiveRoute, mActiveStopId, mAOBRDAnnotationDriverId, mAOBRDCurrentAnnotationTxIndex, mAOBRDCurrentShipmentTxIndex, mAOBRDDrivers, mAOBRDShipmentDriverId, mAOBRDStopAnnotationTxIndex, mAOBRDStopShipmentTxIndex, MAX_THROTTLED_PROTOCOLS, maxval, mBaudRateSyncRateType, mCannedMessages, mCannedResponseMessageBody, mCannedResponseMessageType, mCannedResponses, mCategories, mClientCodepage, mClientPingCount, mClientProductId, mClientSoftwareVersion, mClientUnitId, mDriverId, mDriverLogins, mDriverStatuses, text_msg_ack_event_type::message_id, text_msg_from_client_event_type::message_id, canned_message_receipt_data_type::message_id, text_msg_status_event_type::message_status, text_msg_from_client_event_type::message_text, MESSAGE_THROTTLE_STATE_DISABLE, MESSAGE_THROTTLE_STATE_ENABLE, mEtaDistance, mEtaLatitude, mEtaLongitude, mEtaMode, mEtaTime, mFilePath, mFileSize, mFileTransferBytesDone, mFileTransferSize, mFileTransferState, mFileVersion, mFileVersionLength, minval, mLastClientPingTime, mLastFilePacketSent, mLastServerPingTime, mLongTextMessage, mLongTextMessageInProgress, mLongTextMessagePayloadSize, GarminPacket::mPacketId, GarminPacket::mPayload, GarminPacket::mPayloadSize, mProtocols, mPvtAltitude, mPvtDate, mPvtEastWestVelocity, mPVTFixType, mPvtLatitude, mPvtLongitude, mPvtNorthSouthVelocity, mPvtTime, mPvtUpDownVelocity, mRefreshingCannedMessages, mRefreshingCannedResponses, mRefreshingDriverStatusList, mSentCannedResponseMessages, mSentDriverId, mSentDriverStatus, mServerPingCount, text_msg_ack_data_type::msg_ack_type, text_msg_status_event_type::msg_id, mStopFileTransfer, mStopIndexInList, mStopListInitialized, mThrottledProtocols, mUsePasswords, mWaypoints, eta_mode_setting_response_data_type::new_setting, message_throttling_data_type::new_state, packet_receipt_data_type::next_offset, NO_ACK, pvt_data_type::north_velocity, fmi_dashcam_ntfctn_req_data_type::ntfctn_type, file_packet_data_type::offset, packet_receipt_data_type::offset, OK_ACK, onAck(), text_msg_from_client_event_type::origination_time, client_to_server_open_text_msg_data_type::origination_time, client_to_server_D607_open_text_msg_data_type::origination_time, fmi_dashcam_ntfctn_req_data_type::origination_time, fmi_dashcam_ntfctn_incident_req_data_type::origination_time, message_throttling_data_type::packet_id, driver_id_D607_data_type::password, pvt_data_type::position, eta_data_type::position_of_destination, Event::post(), procDriverStatusUpdate(), product_id_data_type::product_id, FileBackedMap< T >::put(), FileBackedMap< T >::remove(), removeStopById(), REQUEST_STOP_STATUS, fmi_set_baud_request::request_type, fmi_set_baud_receipt::request_type, request_canned_response_list_refresh_data_type::response_count, message_throttling_list_data_type::response_count, canned_response_receipt_data_type::response_id, request_canned_response_list_refresh_data_type::response_id, message_throttling_list_data_type::response_list, file_receipt_data_type::result_code, server_to_client_text_msg_receipt_data_type::result_code, canned_response_receipt_data_type::result_code, canned_response_list_receipt_data_type::result_code, driver_id_receipt_data_type::result_code, driver_status_list_item_receipt_data_type::result_code, driver_status_receipt_data_type::result_code, canned_message_receipt_data_type::result_code, user_interface_text_receipt_data_type::result_code, safe_mode_speed_receipt_data_type::result_code, speed_limit_receipt_data_type::result_code, waypoint_rcpt_data_type::result_code, category_rcpt_data_type::result_code, delete_message_response_data_type::result_code, driver_login_service_receipt::result_code, fmi_driver_profile_data_type::result_code, fmi_driver_status_log_dnld_resp_data_type::result_code, fmi_shipment_download_receipt_data_type::result_code, fmi_driver_aobrd_ack_data_type::result_code, long_text_msg_receipt_data_type::result_code, stop_calc_ack_type::result_code, fmi_set_baud_receipt::result_code, fmi_dashcam_receipt_data_type::result_code, fmi_dashcam_get_settings_response_data_type::result_code, fmi_dashcam_get_ntfctn_settings_data_type::result_code, custom_form_delete_ack_type::return_code, custom_form_position_ack_type::return_code, custom_form_show_ack_type::return_code, eta_mode_setting_response_data_type::return_code, SAVE_AOBRD_LOG, SAVE_CONVERTED_AOBRD_LOG, client_to_server_D607_open_text_msg_data_type::scposn, fmi_dashcam_ntfctn_req_data_type::scposn, sendA604TextMessage(), sendAOBRDDriverDownloadResponseV2(), sendCannedMessage(), sendCannedResponse(), sendDriverStatusListItem(), sendFile(), sendNextAOBRDAnnotation(), sendNextAOBRDShipment(), sendStopStatusRequest(), long_text_msg_receipt_data_type::sequence_number, fmi_driver_shipment_data_type::server_result_code, fmi_driver_annotation_data_type::server_result_code, SerialPort::setBaudRate(), setbit, StopListItem::setStopStatus(), ClientListItem::setValid(), product_id_data_type::software_version, startFileReceive(), fmi_driver_profile_data_type::status, driver_id_data_type::status_change_id, driver_id_D607_data_type::status_change_id, driver_id_receipt_data_type::status_change_id, driver_status_data_type::status_change_id, driver_status_D607_data_type::status_change_id, driver_status_receipt_data_type::status_change_id, message_status_data_type::status_code, driver_status_list_item_receipt_data_type::status_id, stop_status_data_type::stop_index_in_list, stop_status_data_type::stop_status, STOP_STATUS_ACTIVE, STOP_STATUS_DELETED, protocol_support_data_type::tag, client_to_server_open_text_msg_data_type::text_message, client_to_server_D607_open_text_msg_data_type::text_message, gps_time_type::time_of_week, pvt_data_type::time_of_week, fmi_driver_profile_data_type::time_zone, speed_limit_alert_data_type::timestamp, speed_limit_alert_receipt_data_type::timestamp, TRANSFER_COMPLETED, TRANSFER_FAILED, TRANSFER_IN_PROGRESS, TRUE, txFmi(), pvt_data_type::type_of_gps_fix, driver_login_service_data_type::ui_timestamp, driver_login_service_receipt::ui_timestamp, client_to_server_open_text_msg_data_type::unique_id, client_to_server_text_msg_receipt_data_type::unique_id, client_to_server_D607_open_text_msg_data_type::unique_id, stop_status_data_type::unique_id, stop_status_receipt_data_type::unique_id, eta_data_type::unique_id, eta_data_receipt_type::unique_id, waypoint_rcpt_data_type::unique_id, stop_calc_ack_type::unique_id, stop_calc_ack_rcpt_type::unique_id, unit_id_data_type::unit_id, UNKNOWN_DRIVER, pvt_data_type::up_velocity, UTIL_convert_gps_time_to_seconds(), UTIL_convert_radians_to_degrees(), UTIL_convert_seconds_to_date_type(), UTIL_convert_seconds_to_time_type(), UTIL_convert_semicircles_to_degrees(), UTIL_convert_UTC_to_local(), UTIL_format_date_string(), UTIL_format_time_string(), UTIL_hex_to_uint8(), UTL_calc_crc32(), gps_time_type::week_number_days, pvt_data_type::week_number_days, and YES_ACK.

Referenced by ~FmiApplicationLayer().

void FmiApplicationLayer::sendA602Stop ( double  aDegreesLatitude,
double  aDegreesLongitude,
char *  aStopName 
)

Initiates the A602 stop protocol.

Parameters
aDegreesLatitudeThe destination latitude, in degrees (positive is north)
aDegreesLongitudeThe destination longitude, in degrees (positive is east)
aStopNameA null-terminated string in the client codepage containing the name of the stop.
Note
This does not include a stop id, so no further updates will be sent about this stop.
Since
Protocol A602

Definition at line 2126 of file FmiApplicationLayer.cpp.

References FMI_ID_A602_STOP, sc_position_type::lat, sc_position_type::lon, offset_of, A602_stop_data_type::origination_time, sendA602TextMessage(), A602_stop_data_type::stop_position, A602_stop_data_type::text, txFmi(), UTIL_convert_degrees_to_semicircles(), and UTIL_get_current_garmin_time().

Referenced by clearError(), and CStopNewDlg::OnBnClickedOk().

void FmiApplicationLayer::sendA602TextMessage ( fmi_id_type  aFmiPacketId,
char *  aMessageText,
const MessageId aMessageId 
)

Send a server to client text message, for all A602 FMI protocols.

This function is called for all A602 FMI text messages. Since these text message protocols don't need an id or id_size, these arguments are given default values of NULL and 0 respectively

Parameters
aFmiPacketIdFMI packet ID for the protocol to use
aMessageTextMessage text, as a null-terminated string in the client codepage
aMessageIdThe message ID.
Since
Protocol A602

Definition at line 2167 of file FmiApplicationLayer.cpp.

References FMI_ID_SERVER_OPEN_TXT_MSG, MessageId::getId(), MessageId::getIdSize(), server_to_client_ack_text_msg_data_type::id, server_to_client_ack_text_msg_data_type::id_size, offset_of, A602_server_to_client_open_text_msg_data_type::origination_time, server_to_client_ack_text_msg_data_type::origination_time, sendEnable(), A602_server_to_client_open_text_msg_data_type::text_message, server_to_client_ack_text_msg_data_type::text_message, txFmi(), and UTIL_get_current_garmin_time().

Referenced by CTxtMsgNewDlg::OnBnClickedOk(), and sendA602Stop().

void FmiApplicationLayer::sendA603Stop ( double  aLatitude,
double  aLongitude,
char *  aStopName,
uint32  aStopId 
)

Initiates the A603 stop protocol.

Parameters
aLatitudeThe destination latitude, in semicircles
aLongitudeThe destination longitude, in semicircles
aStopNameA null-terminated string containing the name of the stop.
aStopIdThe stop ID to use.
Since
Protocol A603

Definition at line 2436 of file FmiApplicationLayer.cpp.

References FMI_ID_A603_STOP, FileBackedMap< T >::get(), sc_position_type::lat, sc_position_type::lon, mA603Stops, mClientCodepage, minval, offset_of, A603_stop_data_type::origination_time, FileBackedMap< T >::put(), sendAutoArrival(), StopListItem::setCurrentName(), StopListItem::setStopStatus(), ClientListItem::setValid(), A603_stop_data_type::stop_position, STOP_STATUS_UNREAD, A603_stop_data_type::text, txFmi(), A603_stop_data_type::unique_id, and UTIL_get_current_garmin_time().

Referenced by CStopNewDlg::OnBnClickedOk(), and removeStopByIndex().

void FmiApplicationLayer::sendA604TextMessage ( const char *  aMessageText,
const MessageId aMessageId,
uint8  aMessageType = A604_MESSAGE_TYPE_NORMAL 
)

Send an A604 server to client open text message.

This function is called to send an A604 server to client text message.

Parameters
aMessageTextMessage text, as a null-terminated string in the client codepage
aMessageIdThe message ID.
aMessageTypeThe message type, a value from the a604_message_type enum
Since
Protocol A604

Definition at line 2792 of file FmiApplicationLayer.cpp.

References FMI_ID_A604_OPEN_TEXT_MSG, MessageId::getId(), MessageId::getIdSize(), A604_server_to_client_open_text_msg_data_type::id, A604_server_to_client_open_text_msg_data_type::id_size, A604_server_to_client_open_text_msg_data_type::message_type, offset_of, A604_server_to_client_open_text_msg_data_type::origination_time, sendCannedResponseTextMessage(), A604_server_to_client_open_text_msg_data_type::text_message, txFmi(), and UTIL_get_current_garmin_time().

Referenced by beginA611LongTextMessage(), CTxtMsgNewDlg::OnBnClickedOk(), and rx().

void FmiApplicationLayer::sendA607DriverIdRequest ( uint8  aDriverIndex)

Ask the client for the current Driver ID.

Parameters
aDriverIndexThe index of the driver
Since
Protocol A607

Definition at line 3002 of file FmiApplicationLayer.cpp.

References driver_id_request_data_type::driver_idx, FMI_ID_DRIVER_ID_REQUEST, sendA607DriverStatusRequest(), and txFmi().

Referenced by sendDriverIdRequest().

void FmiApplicationLayer::sendA607DriverIdUpdate ( char *  aDriverId,
uint8  aIndex 
)

Send an A607 Driver ID Update to the client.

Parameters
aDriverIdThe new driver ID, in the client's code page
aIndexThe driver index
Since
Protocol A607

Definition at line 4206 of file FmiApplicationLayer.cpp.

References cnt_of_array, driver_id_D607_data_type::driver_id, driver_id_D607_data_type::driver_idx, FMI_ID_DRIVER_ID_UPDATE_D607, mSentDriverId, offset_of, sendA607DriverStatusUpdate(), driver_id_D607_data_type::status_change_id, driver_id_D607_data_type::status_change_time, txFmi(), and UTIL_get_current_garmin_time().

Referenced by resetDriverStatusList().

void FmiApplicationLayer::sendA607DriverStatusRequest ( uint8  aDriverIndex)

Ask the client for the current Driver Status.

Parameters
aDriverIndexThe index of the driver
Since
Protocol A607

Definition at line 3019 of file FmiApplicationLayer.cpp.

References driver_id_request_data_type::driver_idx, FMI_ID_DRIVER_STATUS_REQUEST, sendDriverIdUpdate(), and txFmi().

Referenced by sendA607DriverIdRequest().

void FmiApplicationLayer::sendA607DriverStatusUpdate ( uint32  aDriverStatusId,
uint8  aIndex 
)

Initiate the A607 Driver Status Update protocol.

Parameters
aDriverStatusIdThe new driver status.
aIndexThe driver index.
Note
The driver_status specified must already have been sent to the client using the Set Driver Status List Item protocol.
Since
Protocol A607

Definition at line 4239 of file FmiApplicationLayer.cpp.

References driver_status_D607_data_type::driver_idx, driver_status_D607_data_type::driver_status, FMI_ID_DRIVER_STATUS_UPDATE_D607, mSentDriverStatus, procDriverStatusUpdate(), driver_status_D607_data_type::status_change_id, driver_status_D607_data_type::status_change_time, txFmi(), and UTIL_get_current_garmin_time().

Referenced by sendA607DriverIdUpdate().

bool FmiApplicationLayer::sendA611LongTextMessage ( const char *  aMessageText,
const MessageId aMessageId,
uint8  aMessageType 
)

Send an A611 server to client long text message.

This function is called to send an A611 server to client long text message. It will fail if a long text message is already in progress.

Parameters
aMessageTextMessage text, as a null-terminated string in the client codepage
aMessageIdThe message ID
Returns
True if the text message is being sent, false if another long text message is already in progress
Since
Protocol A611

Definition at line 2715 of file FmiApplicationLayer.cpp.

References beginA611LongTextMessage(), and mLongTextMessageInProgress.

Referenced by CTxtMsgNewDlg::OnBnClickedOk(), and sendStopStatusRequest().

void FmiApplicationLayer::sendAOBRDDriverLogoff ( const AobrdDriverItem driver)

Send an AOBRD driver logoff command to the device.

Send driver logoff command to the device.

Parameters
driverThe driver profile
Since
Protocol A615

Definition at line 3999 of file FmiApplicationLayer.cpp.

References calculate2DVelocity(), fmi_logoff_driver_request::driver_id, FMI_AOBRD_DRIVER_LOGOFF_REQUEST, AobrdDriverItem::getDriverId(), mClientCodepage, and txFmi().

Referenced by sendAOBRDDriverDownloadResponseV2().

void FmiApplicationLayer::sendAOBRDOdometerValue ( uint32  aOdometer)

Send AOBRD Odometer value to device.

Set AOBRD odometer value.

This function sets odometer value on the client.

Parameters
aOdometerNew odometer value
Since
Protocol A610

Definition at line 3524 of file FmiApplicationLayer.cpp.

References FMI_SET_ODOMETER_REQUEST, set_odometer_request_data_type::odometer_value, and txFmi().

Referenced by CAobrdOdometerDlg::OnBnClickedOk(), and sendMessageDeleteRequest().

void FmiApplicationLayer::sendAutoArrival ( uint32  aAutoArrivalTime,
uint32  aAutoArrivalDistance 
)

Send a request to update the auto-arrival preferences.

Parameters
aAutoArrivalTimeThe minimum stop time, in seconds
aAutoArrivalDistanceThe minimum stop distance, in meters
Since
Protocol A603

Definition at line 2487 of file FmiApplicationLayer.cpp.

References FMI_ID_AUTO_ARRIVAL, sendFmiSafeModeSpeed(), auto_arrival_data_type::stop_distance, auto_arrival_data_type::stop_time, and txFmi().

Referenced by CAutoArrivalDlg::OnBnClickedOk(), and sendA603Stop().

void FmiApplicationLayer::sendCannedMessage ( uint32  aMessageId,
CString  aMessageText 
)

Transmit a new or updated canned message to the client.

Parameters
aMessageIdThe canned message ID
aMessageTextThe message text associated with the ID
Since
Protocol A604

Definition at line 2915 of file FmiApplicationLayer.cpp.

References FMI_ID_SET_CANNED_MSG, FileBackedMap< T >::get(), mCannedMessages, mClientCodepage, canned_message_data_type::message, canned_message_data_type::message_id, offset_of, FileBackedMap< T >::put(), sendDeleteCannedResponseRequest(), ClientListItem::setId(), ClientListItem::setUpdateName(), and txFmi().

Referenced by rx(), and sendCannedResponse().

void FmiApplicationLayer::sendCannedResponse ( uint32  aResponseId,
CString  aResponseText 
)

Transmit a new or updated canned response to the client.

Parameters
aResponseIdThe canned response ID
aResponseTextThe response text associated with the ID
Since
Protocol A604

Definition at line 2882 of file FmiApplicationLayer.cpp.

References FMI_ID_SET_CANNED_RESPONSE, FileBackedMap< T >::get(), mCannedResponses, mClientCodepage, offset_of, FileBackedMap< T >::put(), canned_response_data_type::response_id, canned_response_data_type::response_text, sendCannedMessage(), ClientListItem::setUpdateName(), and txFmi().

Referenced by rx(), and sendCannedResponseTextMessage().

bool FmiApplicationLayer::sendCannedResponseTextMessage ( const char *  aMessageText,
const MessageId aMessageId,
uint8  aResponseCount,
const uint32 aResponseList,
uint8  aMessageType 
)

Initiate the canned response text message protocol.

Send a Canned Response List packet, and save the values (message text, message type, etc.) that are sent in later packets. The actual text message will be sent by handle_rx when the canned response list receipt is processed.

Parameters
aMessageTextThe message text, as a null-terminated string in the client codepage
aMessageIdThe message ID
aResponseCountThe number of allowed responses
aResponseListPointer to an array of allowed responses.
aMessageTypeThe aMessageType for the message; see the a604_message_type enum.
Returns
False if A611 protocol is available, a long text message is necessary, and a long text message is in progress. Otherwise true.
Since
Protocol A604

Definition at line 2834 of file FmiApplicationLayer.cpp.

References cnt_of_array, FMI_ID_SET_CANNED_RESP_LIST, MessageId::getId(), MessageId::getIdSize(), canned_response_list_data_type::id, canned_response_list_data_type::id_size, LONG_TEXT_MSG_CHUNK_SIZE, mCannedResponseMessageBody, mCannedResponseMessageType, minval, mLongTextMessageInProgress, offset_of, canned_response_list_data_type::response_count, canned_response_list_data_type::response_id, sendCannedResponse(), and txFmi().

Referenced by sendA604TextMessage().

void FmiApplicationLayer::sendCreateWaypointCat ( uint8  aCatId,
CString &  aCatName 
)
void FmiApplicationLayer::sendDataDeletionRequest ( del_data  aDelDataType)

Send a data deletion request and remove the appropriate data from the server.

Parameters
aDelDataTypeThe type of data that the client should delete
Since
Protocol A603

Definition at line 2529 of file FmiApplicationLayer.cpp.

References data_deletion_data_type::data_type, DELETE_ALL_MESSAGES, DELETE_ALL_STOPS, DELETE_CANNED_MESSAGES, DELETE_CANNED_RESPONSES, DELETE_DRIVER_ID_AND_STATUS, DELETE_WAYPOINTS, DISABLE_FMI, FMI_ID_DATA_DELETION, resetCannedMessages(), resetCannedResponseMessages(), resetCannedResponses(), resetDriverStatusList(), resetSavedStops(), resetWaypoints(), and txFmi().

Referenced by sendFmiSafeModeSpeed().

void FmiApplicationLayer::sendDeleteCannedMessageRequest ( uint32  aMessageId)

Send a request to the client to delete a canned message.

Parameters
aMessageIdThe canned message ID to delete
Since
Protocol A604

Definition at line 2962 of file FmiApplicationLayer.cpp.

References FMI_ID_DELETE_CANNED_MSG, canned_message_delete_data_type::message_id, sendDeleteDriverStatusListItem(), and txFmi().

Referenced by sendDeleteCannedResponseRequest().

void FmiApplicationLayer::sendDeleteCannedResponseRequest ( uint32  aResponseId)

Send a request to the client to delete a canned response.

Parameters
aResponseIdThe canned response ID to delete
Since
Protocol A604

Definition at line 2947 of file FmiApplicationLayer.cpp.

References FMI_ID_DELETE_CANNED_RESPONSE, canned_response_delete_data_type::response_id, sendDeleteCannedMessageRequest(), and txFmi().

Referenced by sendCannedMessage().

void FmiApplicationLayer::sendDeleteDriverStatusListItem ( uint32  aStatusId)

Initiate the Delete Driver Status List Item protocol.

Parameters
aStatusIdThe ID of the item to be deleted on the client
Since
Protocol A604

Definition at line 2977 of file FmiApplicationLayer.cpp.

References FMI_ID_DELETE_DRIVER_STATUS_LIST_ITEM, driver_status_list_item_delete_data_type::status_id, and txFmi().

Referenced by sendDeleteCannedMessageRequest().

void FmiApplicationLayer::sendDeleteWaypoint ( uint16  aUniqueId)

Delete a waypoint.

Parameters
aUniqueIdThe unique ID of the waypoint to delete
Since
Protocol A607

Definition at line 3424 of file FmiApplicationLayer.cpp.

References FileBackedMap< T >::contains(), EVENT_FMI_WAYPOINT_LIST_CHANGED, FMI_ID_WAYPOINT_DELETE, mWaypoints, Event::post(), FileBackedMap< T >::remove(), sendDeleteWaypointCat(), and txFmi().

Referenced by CWaypointDlg::OnBnClickedWptBtnDelete(), and sendWaypoint().

void FmiApplicationLayer::sendDeleteWaypointCat ( uint16  aCatIdx)
void FmiApplicationLayer::sendDriverIdRequest ( )

Ask the client for the current Driver ID.

Since
Protocol A604

Definition at line 2990 of file FmiApplicationLayer.cpp.

References FMI_ID_DRIVER_ID_REQUEST, sendA607DriverIdRequest(), and txFmi().

void FmiApplicationLayer::sendDriverIdUpdate ( char *  aDriverId)

Send a Driver ID Update to the client.

Parameters
aDriverIdThe new driver ID, in the client's code page
Since
Protocol A604

Definition at line 3037 of file FmiApplicationLayer.cpp.

References cnt_of_array, driver_id_data_type::driver_id, FMI_ID_DRIVER_ID_UPDATE, mSentDriverId, offset_of, sendDriverStatusListItem(), driver_id_data_type::status_change_id, driver_id_data_type::status_change_time, txFmi(), and UTIL_get_current_garmin_time().

Referenced by sendA607DriverStatusRequest().

void FmiApplicationLayer::sendDriverStatusListItem ( uint32  aStatusId,
CString  aStatusText 
)

Initiate the Set Driver Status List Item protocol.

Parameters
aStatusIdThe ID of the aStatusText item to be added (or updated) on the client
aStatusTextThe textual description corresponding to the id
Since
Protocol A604

Definition at line 3067 of file FmiApplicationLayer.cpp.

References FMI_ID_SET_DRIVER_STATUS_LIST_ITEM, FileBackedMap< T >::get(), mClientCodepage, mDriverStatuses, offset_of, FileBackedMap< T >::put(), ClientListItem::setUpdateName(), driver_status_list_item_data_type::status, driver_status_list_item_data_type::status_id, and txFmi().

Referenced by rx(), and sendDriverIdUpdate().

void FmiApplicationLayer::sendDriverStatusRequest ( )

Asks the client for the current driver status.

Since
Protocol A604

Definition at line 3097 of file FmiApplicationLayer.cpp.

References FMI_ID_DRIVER_STATUS_REQUEST, sendDriverStatusUpdate(), and txFmi().

void FmiApplicationLayer::sendDriverStatusUpdate ( uint32  aDriverStatusId)

Initiate the Driver Status Update protocol.

Parameters
aDriverStatusIdThe new driver status.
Note
The driver_status specified must already have been sent to the client using the Set Driver Status List Item protocol.
Since
Protocol A604

Definition at line 3110 of file FmiApplicationLayer.cpp.

References driver_status_data_type::driver_status, FMI_ID_DRIVER_STATUS_UPDATE, mSentDriverStatus, sendMessageThrottlingUpdate(), driver_status_data_type::status_change_id, driver_status_data_type::status_change_time, txFmi(), and UTIL_get_current_garmin_time().

Referenced by sendDriverStatusRequest().

void FmiApplicationLayer::sendEnable ( uint16 aFeatureCodes = NULL,
uint8  aFeatureCount = 0 
)

Transmit an FMI Enable packet, and clear any error state.

Make sure there is an FMI Enable packet at the head of the tx queue, then send it. This packet may already be present if a previous enable timed out.

Parameters
aFeatureCodesArray of feature codes to send
aFeatureCountNumber of feature codes to send. To send an A602 enable, this must be zero.
Since
Protocol A602

Definition at line 2225 of file FmiApplicationLayer.cpp.

References fmi_features_data_type::feature_count, fmi_features_data_type::features, FMI_ID_ENABLE, mEnablePending, ApplicationLayer::mTransportLayer, offset_of, fmi_features_data_type::reserved, TransportLayer::retry(), sendFmiPacket(), TRUE, and txFmi().

Referenced by CFeatureDlg::OnBnClickedOk(), CCommErrorDlg::OnBnClickedRetry(), and sendA602TextMessage().

void FmiApplicationLayer::sendEnablePvtCommand ( bool  aEnable)

Send an Enable PVT or Disable PVT command.

Parameters
aEnableIf TRUE, send an enable PVT command, else send a disable PVT command

Definition at line 2007 of file FmiApplicationLayer.cpp.

References COMMAND_TURN_OFF_PVT_DATA, COMMAND_TURN_ON_PVT_DATA, FALSE, ID_PRODUCT_RQST, sc_position_type::lat, sc_position_type::lon, minval, ApplicationLayer::mTransportLayer, offset_of, TRUE, TransportLayer::tx(), txCommand(), and UTIL_convert_degrees_to_semicircles().

Referenced by onAck().

void FmiApplicationLayer::sendEtaModeRequest ( FMI_eta_mode_type  aModeType)

Send an ETA mode request.

Since
Protocol A623

Definition at line 2598 of file FmiApplicationLayer.cpp.

References FMI_ID_ETA_MODE_REQUEST, sendStopMoveRequest(), and txFmi().

Referenced by sendEtaRequest().

void FmiApplicationLayer::sendEtaRequest ( )

Send a request for ETA data.

Since
Protocol A603

Definition at line 2588 of file FmiApplicationLayer.cpp.

References FMI_ID_ETA_DATA_REQUEST, sendEtaModeRequest(), and txFmi().

void FmiApplicationLayer::sendFile ( char *  aFilename,
uint8  aVersionLength,
uint8 aVersion,
uint8  aFileType,
BOOL  gzipIt = FALSE 
)

Start a file transfer protocol.

This sends the start request, the rest of the transfer is performed in rx when the receipt packets are received.

Parameters
aFilenameThe local file name to transfer
aVersionLengthThe number of significant bytes of aVersion (must be between 0 and 16, inclusive)
aVersionAn array of bytes of aVersion data to associate with this file.
aFileTypeOne of several options that the device should be aware of
gzipItA flag for determining if the file should be compressed before sending
Since
Protocol A604

Definition at line 3164 of file FmiApplicationLayer.cpp.

References cnt_of_array, EVENT_FMI_FILE_TRANSFER_STATE_CHANGED, FALSE, file_info_data_type::file_size, file_info_data_type::file_type, file_info_data_type::file_version, file_info_data_type::file_version_length, FMI_ID_FILE_TRANSFER_START, GZIPPED_TRANSFER_FILENAME, mCurrentSendFileType, mFilePath, mFileTransferSize, mFileTransferState, minval, mStopFileTransfer, Event::post(), TRANSFER_STARTED, and txFmi().

Referenced by CStopNewDlg::OnBnClickedOk(), rx(), and sendMessageThrottlingUpdate().

void FmiApplicationLayer::sendFmiPacket ( uint16  aFmiPacketId,
uint8 aFmiPayload,
uint8  aFmiPayloadSize 
)

Send an arbitrary FMI packet.

Sends a user-specified FMI packet to the client. This packet is not checked for errors, and no data structures are updated when the packet is sent. However, packets received in response to this packet are handled normally.

Parameters
aFmiPacketIdThe FMI packet ID
aFmiPayloadThe FMI payload
aFmiPayloadSizeThe size of the FMI payload
Since
Protocol A602

Definition at line 2271 of file FmiApplicationLayer.cpp.

References sendFreeformFmiPacket(), and txFmi().

Referenced by CSendSensorDlg::OnBnClickedCreate(), CIftaDlg::OnBnClickedDataDelete(), CIftaDlg::OnBnClickedDataFetch(), CSendSensorDlg::OnBnClickedDelete(), CSendAlertDlg::OnBnClickedOk(), CFeatureDlg::OnBnClickedOk(), CDashcamNtfctnDlg::OnBnClickedSet(), CDashcamDlg::OnBnClickedSet(), CDashcamDlg::OnBnClickedSetLock(), CSendSensorDlg::OnBnClickedUpdate(), CChangeBaudRateDlg::OnOK(), CDashcamNtfctnDlg::OnRefreshNtfctnSettings(), CDashcamDlg::OnRefreshSettings(), and sendEnable().

void FmiApplicationLayer::sendFmiSafeModeSpeed ( float  aSpeed)

Set FMI safe mode speed.

This function sets safe mode speed on the client

Parameters
aSpeedSafe mode speed
Returns
TRUE if the packet was ACK'd, FALSE if a timeout occurred
Since
Protocol A606

Definition at line 2507 of file FmiApplicationLayer.cpp.

References FMI_SAFE_MODE, sendDataDeletionRequest(), safe_mode_speed_data_type::speed, and txFmi().

Referenced by CSafeModeDlg::OnBnClickedOk(), and sendAutoArrival().

void FmiApplicationLayer::sendFreeformFmiPacket ( fmi_id_type const  aFmiPacketId,
uint8 const *const  aFmiPayload,
uint8 const  aFmiPayloadSize 
)
void FmiApplicationLayer::sendGpiFileInfoRequest ( )

Send a GPI File Information Request to the client.

Since
Protocol A604

Definition at line 3236 of file FmiApplicationLayer.cpp.

References FMI_ID_GPI_FILE_INFORMATION_REQUEST, and txFmi().

Referenced by CGpiQueryDlg::OnBnClickedUpdate().

void FmiApplicationLayer::sendMessageDeleteRequest ( const MessageId aMessageId)
void FmiApplicationLayer::sendMessageThrottlingQuery ( )

Initiate the Message Throttling Query protocol.

Since
Protocol A605

Definition at line 3365 of file FmiApplicationLayer.cpp.

References FMI_ID_MSG_THROTTLING_QUERY, sendWaypoint(), and txFmi().

Referenced by CMsgThrottlingDlg::OnInitDialog().

void FmiApplicationLayer::sendMessageThrottlingUpdate ( uint16  aPacketId,
uint16  aThrottleState 
)

Sends an update to the client to tell it whether to enable or disable a protocol.

Parameters
aPacketIdThe packet ID of the first packet in the protocol
aThrottleStateThe new state (0=disable, 1=enable)
Since
Protocol A604

Definition at line 3137 of file FmiApplicationLayer.cpp.

References FMI_ID_MSG_THROTTLING_COMMAND, message_throttling_data_type::new_state, message_throttling_data_type::packet_id, sendFile(), and txFmi().

Referenced by CMsgThrottlingDlg::OnBnClickedUpdate(), and sendDriverStatusUpdate().

void FmiApplicationLayer::sendPing ( )

Send a ping packet to the client.

Since
Protocol A604

Definition at line 3259 of file FmiApplicationLayer.cpp.

References FMI_ID_PING, and txFmi().

Referenced by CPingStatusDlg::OnBnClickedSendPing().

void FmiApplicationLayer::sendProductRequest ( )

Send an FMI Product ID request.

Since
Protocol A602

Definition at line 2317 of file FmiApplicationLayer.cpp.

References FMI_ID_PRODUCT_ID_SUPPORT_RQST, and txFmi().

void FmiApplicationLayer::sendSetSpeedLimitAlerts ( uint8  aMode,
uint8  aTimeOver,
uint8  aTimeUnder,
boolean  aAlertUser,
float  aThreshold 
)

Set FMI speed limit alerts.

This function sets speed limit alerts on the client

Parameters
aModeMode
aTimeOverTime over in seconds
aTimeUnderTime under in seconds
aAlertUserAlert audibly when speeding event begins
aThresholdThreshold in m/s over speed limit
Since
Protocol A608

Definition at line 3341 of file FmiApplicationLayer.cpp.

References speed_limit_data_type::alert_user, FMI_SPEED_LIMIT_SET, speed_limit_data_type::mode, speed_limit_data_type::threshold, speed_limit_data_type::time_over, speed_limit_data_type::time_under, and txFmi().

Referenced by CSpeedLimitAlertsDlg::OnBnClickedSend(), and sendUserInterfaceText().

void FmiApplicationLayer::sendStopMoveRequest ( uint16  aMoveToIndex,
uint16  aMoveFromIndex 
)

Send a stop move request.

Parameters
aMoveToIndexThe index that the stop should be moved to
aMoveFromIndexThe index that the stop should be moved from
Since
Protocol A603

Definition at line 2613 of file FmiApplicationLayer.cpp.

References mStopIndexInList, REQUEST_MOVE_STOP, and sendStopStatusRequest().

Referenced by sendEtaModeRequest().

void FmiApplicationLayer::sendStopSortRequest ( )

Sends a sort stop list request to the client.

Note
Once the request is completed, the server will send stop aStopStatus requests for all A603 stops to determine their new position in the list. These requests are sent in rx().
Since
Protocol A604

Definition at line 3271 of file FmiApplicationLayer.cpp.

References FMI_ID_SORT_STOP_LIST, sendTextMessageStatusRequest(), and txFmi().

void FmiApplicationLayer::sendStopStatusRequest ( uint32  aStopId,
stop_status_status_type  aStopStatus,
uint16  aMoveToIndex = INVALID16 
)

Initiate the Stop Status protocol to update an A603 stop.

Parameters
aStopIdThe unique_id of the stop to update
aStopStatusThe new stop aStopStatus
aMoveToIndexThe stop_position_in_list if this is a move stop request. Defaults to INVALID16 (0xFFFF)
Since
Protocol A603

Definition at line 2671 of file FmiApplicationLayer.cpp.

References FMI_ID_STOP_STATUS_REQUEST, INVALID16, REQUEST_ACTIVATE_STOP, REQUEST_DELETE_STOP, REQUEST_MARK_STOP_DONE, REQUEST_MOVE_STOP, REQUEST_STOP_STATUS, sendA611LongTextMessage(), stop_status_data_type::stop_index_in_list, stop_status_data_type::stop_status, txFmi(), and stop_status_data_type::unique_id.

Referenced by rx(), and sendStopMoveRequest().

void FmiApplicationLayer::sendTextMessageStatusRequest ( const MessageId aMessageId)

Ask the server for the aStopStatus of a text message.

Parameters
aMessageIdThe message ID
Since
Protocol A604

Definition at line 3282 of file FmiApplicationLayer.cpp.

References FMI_ID_TEXT_MSG_STATUS_REQUEST, MessageId::getId(), MessageId::getIdSize(), message_status_request_data_type::id, message_status_request_data_type::id_size, sendUserInterfaceText(), and txFmi().

Referenced by CTxtMsgStatusRequestDlg::OnBnClickedOk(), and sendStopSortRequest().

void FmiApplicationLayer::sendUnitIdRequest ( )

Request the Unit ID (ESN) from the client.

Definition at line 2096 of file FmiApplicationLayer.cpp.

References COMMAND_REQ_UNIT_ID, and txCommand().

void FmiApplicationLayer::sendUserInterfaceText ( uint32  aElementId,
char *  aNewText 
)

Request that the text of a particular user interface text element be changed.

Parameters
aElementIdThe ID of the element
aNewTextA null-terminated string (50 characters max) containing the new text for the element.
Since
Protocol A604

Definition at line 3304 of file FmiApplicationLayer.cpp.

References FMI_ID_USER_INTERFACE_TEXT, minval, user_interface_text_data_type::new_text, offset_of, sendSetSpeedLimitAlerts(), user_interface_text_data_type::text_element_id, and txFmi().

Referenced by CUITextChangeDlg::OnBnClickedOk(), and sendTextMessageStatusRequest().

void FmiApplicationLayer::sendWaypoint ( uint16  aUniqueId,
double  aLat,
double  aLon,
uint16  aSymbol,
CString &  aName,
uint16  aCat,
CString &  aComment 
)

Send a waypoint.

Parameters
aUniqueIdServer-assigned unique ID for the waypoint
aLatThe waypoint latitude, in degrees (east is positive)
aLonThe waypoint longitude, in degrees (north is positive)
aSymbolThe waypoint symbol
aNameThe waypoint name
aCatCategories that this waypoint is part of (bit mapped)
aCommentThe waypoint comment
Since
Protocol A607

Definition at line 3384 of file FmiApplicationLayer.cpp.

References waypoint_data_type::cat, waypoint_data_type::comment, FMI_ID_WAYPOINT, FileBackedMap< T >::get(), sc_position_type::lat, sc_position_type::lon, mClientCodepage, mWaypoints, waypoint_data_type::name, waypoint_data_type::posn, FileBackedMap< T >::put(), sendDeleteWaypoint(), WaypointListItem::setCategories(), ClientListItem::setUpdateName(), waypoint_data_type::symbol, txFmi(), waypoint_data_type::unique_id, and UTIL_convert_degrees_to_semicircles().

Referenced by CWaypointDlg::OnBnClickedWptBtnSend(), and sendMessageThrottlingQuery().

void FmiApplicationLayer::startFileReceive ( const file_info_data_type file)
private
void FmiApplicationLayer::stopFileTransfer ( )

Stop a file transfer protocol.

This sets a flag to stop a file transfer. The flag will be processed when the next file or packet receipt is processed in handle_rx().

Since
Protocol A604

Definition at line 3248 of file FmiApplicationLayer.cpp.

References EVENT_FMI_FILE_TRANSFER_STATE_CHANGED, mFileTransferState, mStopFileTransfer, Event::post(), TRANSFER_FAILED, and TRUE.

Referenced by CFileTransferProgressDlg::OnBnClickedStop().

void FmiApplicationLayer::txCommand ( command_type const  aCommandId)
private

Transmit Garmin command packet (packet ID = ID_COMMAND_BYTE)

Parameters
aCommandIdThe command ID to send to the client.

Definition at line 4046 of file FmiApplicationLayer.cpp.

References FALSE, ID_COMMAND_BYTE, ApplicationLayer::mTransportLayer, TransportLayer::tx(), and txFmi().

Referenced by calculate2DVelocity(), sendEnablePvtCommand(), and sendUnitIdRequest().

void FmiApplicationLayer::txFmi ( fmi_id_type const  aFmiPacketId,
uint8 const *const  aData,
uint8 const  aSize,
bool const  aSendNow = false 
)
private

Transmit FMI packet (packet ID = ID_FMI_BYTE)

This procedure frames and transmits a FMI specific packet.

Parameters
aFmiPacketIdThe FMI packet ID
aDataThe FMI payload. This may be NULL if aSize is 0.
aSizeThe number of bytes in the FMI payload.
aSendNowIf TRUE, place this packet at the head of the tx_queue and send it immediately; otherwise add it to the end of the queue and send it after any other packets that are outstanding.
Since
Protocol A602

Definition at line 4068 of file FmiApplicationLayer.cpp.

References ID_FMI_PACKET, MAX_PAYLOAD_SIZE, ApplicationLayer::mTransportLayer, and TransportLayer::tx().

Referenced by beginA611LongTextMessage(), continueFileReceive(), endFileReceive(), rebootDevice(), retryBaudRateSync(), rx(), sendA602Stop(), sendA602TextMessage(), sendA603Stop(), sendA604TextMessage(), sendA607DriverIdRequest(), sendA607DriverIdUpdate(), sendA607DriverStatusRequest(), sendA607DriverStatusUpdate(), sendAOBRDDriverDownloadResponseV2(), sendAOBRDDriverLogoff(), sendAOBRDDriverProfile(), sendAOBRDDriverProfileV2(), sendAOBRDOdometerValue(), sendAutoArrival(), sendCannedMessage(), sendCannedResponse(), sendCannedResponseTextMessage(), sendCreateWaypointCat(), sendDataDeletionRequest(), sendDeleteCannedMessageRequest(), sendDeleteCannedResponseRequest(), sendDeleteDriverStatusListItem(), sendDeleteWaypoint(), sendDeleteWaypointCat(), sendDriverIdRequest(), sendDriverIdUpdate(), sendDriverStatusListItem(), sendDriverStatusRequest(), sendDriverStatusUpdate(), sendEnable(), sendEtaModeRequest(), sendEtaRequest(), sendFile(), sendFmiPacket(), sendFmiSafeModeSpeed(), sendGpiFileInfoRequest(), sendMessageDeleteRequest(), sendMessageThrottlingQuery(), sendMessageThrottlingUpdate(), sendNextAOBRDAnnotation(), sendNextAOBRDShipment(), sendPing(), sendProductRequest(), sendSetSpeedLimitAlerts(), sendStopSortRequest(), sendStopStatusRequest(), sendTextMessageStatusRequest(), sendUserInterfaceText(), sendWaypoint(), startFileReceive(), and txCommand().

Member Data Documentation

FileBackedMap<StopListItem> FmiApplicationLayer::mA603Stops

Map of unique ID to stop details for all A603 stops on the client.

Since
Protocol A603

Definition at line 562 of file FmiApplicationLayer.h.

Referenced by getNextStopId(), CStopNewDlg::OnBnClickedOk(), removeStopByIndex(), resetSavedStops(), rx(), and sendA603Stop().

bool FmiApplicationLayer::mActiveRoute

If TRUE, the client has a stop active.

This is derived from the ETA data so that it is correct for all stop types.

Since
Protocol A603

Definition at line 558 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), and rx().

uint32 FmiApplicationLayer::mActiveStopId

Unique ID of the active stop.

Since
Protocol A603

Definition at line 546 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), and rx().

CString FmiApplicationLayer::mAOBRDAnnotationDriverId
private

Driver ID for annotations being sent to device.

Definition at line 877 of file FmiApplicationLayer.h.

Referenced by rx(), and sendNextAOBRDAnnotation().

int FmiApplicationLayer::mAOBRDCurrentAnnotationTxIndex
private

Iterator for annotations being sent to device.

Definition at line 880 of file FmiApplicationLayer.h.

Referenced by rx(), and sendNextAOBRDAnnotation().

int FmiApplicationLayer::mAOBRDCurrentShipmentTxIndex
private

Iterator for shipments being sent to device.

Definition at line 871 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), rx(), and sendNextAOBRDShipment().

FileBackedMap<AobrdDriverItem> FmiApplicationLayer::mAOBRDDrivers

Map of allowed driver IDs and passwords.

Definition at line 680 of file FmiApplicationLayer.h.

Referenced by rx(), sendAOBRDDriverDownloadResponseV2(), and sendNextAOBRDShipment().

CString FmiApplicationLayer::mAOBRDShipmentDriverId
private

Driver ID for shipments being sent to device.

Definition at line 868 of file FmiApplicationLayer.h.

Referenced by rx(), and sendNextAOBRDShipment().

int FmiApplicationLayer::mAOBRDStopAnnotationTxIndex
private

Iterator end for annotations being sent to device.

Definition at line 883 of file FmiApplicationLayer.h.

Referenced by rx(), and sendNextAOBRDAnnotation().

int FmiApplicationLayer::mAOBRDStopShipmentTxIndex
private

Iterator end for shipments being sent to device.

Definition at line 874 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), rx(), and sendNextAOBRDShipment().

uint8 FmiApplicationLayer::mBaudRateSyncRateType
private

Mark which baud rate is currently being synced.

Definition at line 905 of file FmiApplicationLayer.h.

Referenced by retryBaudRateSync(), and rx().

FileBackedMap<ClientListItem> FmiApplicationLayer::mCannedMessages

Map of canned message IDs to names.

Since
Protocol A604

Definition at line 613 of file FmiApplicationLayer.h.

Referenced by resetCannedMessages(), rx(), and sendCannedMessage().

char FmiApplicationLayer::mCannedResponseMessageBody[TEXT_MSG_BUFFER_MAX_SIZE]
private

The message text for the server to client canned text message.

Stored so that the server can send it in response to the canned response list ack message.

Since
Protocol A604

Definition at line 838 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), rx(), and sendCannedResponseTextMessage().

uint8 FmiApplicationLayer::mCannedResponseMessageType
private

The message_type for the server to client canned text message.

Stored so that the server can send it in response to the canned response list ack message.

Since
Protocol A604

Definition at line 844 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), rx(), and sendCannedResponseTextMessage().

FileBackedMap<ClientListItem> FmiApplicationLayer::mCannedResponses

Map of canned response IDs to names.

Since
Protocol A604

Definition at line 610 of file FmiApplicationLayer.h.

Referenced by resetCannedResponses(), rx(), and sendCannedResponse().

FileBackedMap<ClientListItem> FmiApplicationLayer::mCategories

Map of waypoint category IDs to names.

Definition at line 640 of file FmiApplicationLayer.h.

Referenced by CWaypointDlg::getCatIds(), resetWaypoints(), rx(), sendCreateWaypointCat(), and CWaypointDlg::updateCatBox().

int FmiApplicationLayer::mClientPingCount

Number of client-to-server pings received; can be reset by the user.

Since
Protocol A604

Definition at line 595 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), CPingStatusDlg::OnBnClickedResetClient(), rx(), and CPingStatusDlg::updateTextFields().

uint16 FmiApplicationLayer::mClientProductId

Numeric product ID reported by the client.

See also
CFmiPcAppDlg::getProductName() for one way to translate this into a human-readable description of the client.

Definition at line 486 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), and rx().

sint16 FmiApplicationLayer::mClientSoftwareVersion

Raw software version reported by the client.

This should be divided by 100 to obtain a formatted representation. For example, 312 means software version 3.12.

Definition at line 492 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), and rx().

char FmiApplicationLayer::mClientUnitId[11]

Null-terminated ASCII string containing the Unit ID (ESN) of the client.

Definition at line 425 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), and rx().

file_info_data_type FmiApplicationLayer::mCurrentReceiptFile
private

Current file being received.

Definition at line 865 of file FmiApplicationLayer.h.

Referenced by continueFileReceive(), endFileReceive(), FmiApplicationLayer(), and startFileReceive().

uint8 FmiApplicationLayer::mCurrentSendFileType
private

Current file type for file being sent.

Definition at line 862 of file FmiApplicationLayer.h.

Referenced by sendFile().

char FmiApplicationLayer::mDriverId[FMI_DRIVER_COUNT][50]

Last driver ID received from the client.

Since
Protocol A604

Definition at line 568 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), and rx().

FileBackedMap<DriverLoginItem> FmiApplicationLayer::mDriverLogins

Map of allowed driver IDs and passwords.

Definition at line 646 of file FmiApplicationLayer.h.

Referenced by rx().

char FmiApplicationLayer::mDriverStatus[FMI_DRIVER_COUNT][50]

Last driver status received from the client.

Since
Protocol A604

Definition at line 571 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), and procDriverStatusUpdate().

FileBackedMap<ClientListItem> FmiApplicationLayer::mDriverStatuses

Map of driver status IDs to names.

Since
Protocol A604

Definition at line 616 of file FmiApplicationLayer.h.

Referenced by procDriverStatusUpdate(), resetDriverStatusList(), rx(), and sendDriverStatusListItem().

bool FmiApplicationLayer::mEnablePending

If true, the FMI Enable protocol is in progress.

Definition at line 503 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), onAck(), and sendEnable().

char FmiApplicationLayer::mEtaDistance[13]

Null-terminated ASCII string containing the distance to the current destination, including units.

This will be in meters if the distance is less than 1 km, otherwise the units are km. If either the ETA time or ETA distance received from the client is invalid, this will be an empty string.

Since
Protocol A603

Definition at line 524 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), and rx().

char FmiApplicationLayer::mEtaLatitude[14]

String representing the latitude in decimal degrees (and N or S)

Null-terminated ASCII string containing the latitude of the current destination in positive decimal degrees, followed by a direction suffix (N or S). This information is current as of the last ETA packet received. If the last ETA indicated that the ETA time or distance were invalid, this will be an empty string.

Since
Protocol A603

Definition at line 533 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), and rx().

char FmiApplicationLayer::mEtaLongitude[14]

String representing the longitude in decimal degrees (and E or W)

Null-terminated ASCII string containing the longitude of the current destination in positive decimal degrees, followed by a direction suffix (E or W). This information is current as of the last ETA packet received. If the last ETA indicated that the ETA time or distance were invalid, this will be an empty string.

Since
Protocol A603

Definition at line 542 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), and rx().

uint8 FmiApplicationLayer::mEtaMode

Unique ID of the active stop.

Since
Protocol A623

Definition at line 697 of file FmiApplicationLayer.h.

Referenced by rx().

char FmiApplicationLayer::mEtaTime[13]

String containing the ETA time from the client, or "invalid".

This is a null-terminated ASCII string of the form "HH:MM:SS AA" (hours, minutes, seconds, AM/PM, respectively), or the ASCII string "invalid" if the ETA time or distance received from the client is invalid.

Since
Protocol A603

Definition at line 516 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), and rx().

char FmiApplicationLayer::mFilePath[200]
private

Path to the file that is being transferred to the client.

Since
Protocol A604

Definition at line 829 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), rx(), and sendFile().

uint32 FmiApplicationLayer::mFileSize

file size (FMI_GPI_FILE_INFORMATION)

Since
Protocol A604

Definition at line 582 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), CGpiQueryDlg::OnGpiInfoReceived(), and rx().

uint32 FmiApplicationLayer::mFileTransferBytesDone

Number of bytes of the file that have been transferred so far.

Since
Protocol A604

Definition at line 585 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), CFileTransferProgressDlg::OnFileTransferProgress(), and rx().

uint32 FmiApplicationLayer::mFileTransferSize

Total number of bytes in the file being transferred.

Since
Protocol A604

Definition at line 588 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), CFileTransferProgressDlg::OnFileTransferProgress(), CFileTransferProgressDlg::OnFileTransferStateChange(), rx(), and sendFile().

transfer_state FmiApplicationLayer::mFileTransferState

State of the current file transfer (in progress, completed, etc.)

Since
Protocol A604

Definition at line 591 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), CFileTransferProgressDlg::OnFileTransferStateChange(), rx(), sendFile(), and stopFileTransfer().

uint8 FmiApplicationLayer::mFileVersion[16]

file version (FMI_GPI_FILE_INFORMATION)

Since
Protocol A604

Definition at line 575 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), CGpiQueryDlg::OnGpiInfoReceived(), and rx().

uint8 FmiApplicationLayer::mFileVersionLength

Number of significant bytes in mFileVersion.

Since
Protocol A604

Definition at line 578 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), CGpiQueryDlg::OnGpiInfoReceived(), and rx().

id_type FmiApplicationLayer::mFreeformFmiPacketId

Defaults to ID_FMI_PACKET unless overridden on command line.

Definition at line 506 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), and sendFreeformFmiPacket().

char FmiApplicationLayer::mHorizontalVelocity[15]

2-D velocity in the horizontal plane in meters per second from the last PVT packet, as an ASCII null-terminated string

String is formatted with three decimal places and includes the unit "m/s" and heading as the nearest cardinal (N, E, S, W) or inter-cardinal direction (NE, SE, NW, SW)

Definition at line 481 of file FmiApplicationLayer.h.

Referenced by calculate2DVelocity(), and FmiApplicationLayer().

CTime FmiApplicationLayer::mLastClientPingTime

Last time when a client to server ping was received.

Since
Protocol A604

Definition at line 602 of file FmiApplicationLayer.h.

Referenced by rx(), and CPingStatusDlg::updateTextFields().

file_packet_data_type FmiApplicationLayer::mLastFilePacketSent
private

The last file packet that was sent.

Since
Protocol A604

Definition at line 832 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), and rx().

CTime FmiApplicationLayer::mLastServerPingTime

Last time when a server to client ping was received.

Since
Protocol A604

Definition at line 606 of file FmiApplicationLayer.h.

Referenced by rx(), and CPingStatusDlg::updateTextFields().

long_text_msg_data_type FmiApplicationLayer::mLongTextMessage[10]
private

Contains the data for the most recent long text message.

Definition at line 891 of file FmiApplicationLayer.h.

Referenced by beginA611LongTextMessage(), and rx().

bool FmiApplicationLayer::mLongTextMessageInProgress
private

Indicates whether a long text message is in progress.

Definition at line 888 of file FmiApplicationLayer.h.

Referenced by beginA611LongTextMessage(), rx(), sendA611LongTextMessage(), and sendCannedResponseTextMessage().

uint8 FmiApplicationLayer::mLongTextMessagePayloadSize[10]
private

Indicates the lengths of the long text message packets.

Definition at line 894 of file FmiApplicationLayer.h.

Referenced by beginA611LongTextMessage(), and rx().

char FmiApplicationLayer::mProtocols[PROTOCOL_SIZE]

Null-terminated ASCII string containing the protocols supported by the client.

The list is space-delimited, and each protocol is in the format Xnnn where X is the protocol type (A/D/L/T) and nnn is the number (602, etc.)

Definition at line 499 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), rx(), and sendAOBRDDriverProfile().

char FmiApplicationLayer::mPvtAltitude[13]

Altitude in meters from the last PVT packet, as an ASCII null-terminated string.

Altitude is formatted with three decimal places and is relative to the WGS84 ellipsoid.

Definition at line 456 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), and rx().

char FmiApplicationLayer::mPvtDate[11]

Date from the last PVT packet, as an ASCII null-terminated string of the form MM/DD/YYYY.

Definition at line 433 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), and rx().

char FmiApplicationLayer::mPvtEastWestVelocity[15]

East-west velocity in meters per second from the last PVT packet, as an ASCII null-terminated string.

String is formatted with three decimal places and includes the unit "m/s" and direction (W or E)

Definition at line 462 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), and rx().

char FmiApplicationLayer::mPVTFixType[9]

GPS fix type from the last PVT packet, interpreted as an null-terminated ASCII string.

Definition at line 429 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), and rx().

char FmiApplicationLayer::mPvtLatitude[14]

Latitude in degrees from the last PVT packet, as an ASCII null-terminated string.

Latitude is formatted with six decimal places and is suffixed by the degree symbol and N or S.

Definition at line 444 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), and rx().

char FmiApplicationLayer::mPvtLongitude[14]

Longitude in degrees from the last PVT packet, as an ASCII null-terminated string.

Longitude is formatted with six decimal places and is suffixed by the degree symbol and E or W.

Definition at line 450 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), and rx().

char FmiApplicationLayer::mPvtNorthSouthVelocity[15]

North-south velocity in meters per second from the last PVT packet, as an ASCII null-terminated string.

String is formatted with three decimal places and includes the unit "m/s" and direction (N or S)

Definition at line 468 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), and rx().

char FmiApplicationLayer::mPvtTime[13]

Time from the last PVT packet.

This is an ASCII null-terminated string of the form HH:MM:SS AA (AA is AM or PM) in the server's time zone

Definition at line 438 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), and rx().

char FmiApplicationLayer::mPvtUpDownVelocity[15]

Up-down velocity in meters per second from the last PVT packet, as an ASCII null-terminated string.

String is formatted with three decimal places and includes the unit "m/s" and direction (U or D)

Definition at line 474 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), and rx().

bool FmiApplicationLayer::mRefreshingCannedMessages
private

If TRUE, FmiApplicationLayer is handling a request to refresh the canned message list.

Since
Protocol A604

Definition at line 857 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), and rx().

bool FmiApplicationLayer::mRefreshingCannedResponses
private

If TRUE, FmiApplicationLayer is handling a request to refresh the canned response list.

Since
Protocol A604

Definition at line 853 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), and rx().

bool FmiApplicationLayer::mRefreshingDriverStatusList
private

If TRUE, FmiApplicationLayer is handling a request to refresh the driver status list.

Since
Protocol A604

Definition at line 849 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), and rx().

FileBackedMap<InboxListItem> FmiApplicationLayer::mSentCannedResponseMessages

List of message IDs for canned response text messages.

Used in the handler for the text message ack to determine whether the ID corresponds to OK/Yes/No or a canned response id.

Since
Protocol A604

Definition at line 622 of file FmiApplicationLayer.h.

Referenced by resetCannedResponseMessages(), and rx().

char FmiApplicationLayer::mSentDriverId[50]
private

The last driver ID that was sent to the client.

This is a null-terminated string in the client's codepage.

Since
Protocol A604

Definition at line 825 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), rx(), sendA607DriverIdUpdate(), and sendDriverIdUpdate().

uint32 FmiApplicationLayer::mSentDriverStatus
private

The last driver status that was sent to the client.

Since
Protocol A604

Definition at line 820 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), rx(), sendA607DriverStatusUpdate(), and sendDriverStatusUpdate().

int FmiApplicationLayer::mServerPingCount

Number of server-to-client pings sent; can be reset by the user.

Since
Protocol A604

Definition at line 598 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), CPingStatusDlg::OnBnClickedResetServer(), rx(), and CPingStatusDlg::updateTextFields().

bool FmiApplicationLayer::mStopFileTransfer

Flag to indicate that the user wants to stop the file transfer.

Processed when the next file data receipt is received.

Since
Protocol A604

Definition at line 629 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), rx(), sendFile(), and stopFileTransfer().

std::vector<uint32> FmiApplicationLayer::mStopIndexInList

Vector relating the stop list to unique_ids.

mStopIndexInList[n] contains the unique_id of the nth stop in the list. n=0 is the first stop in the list.

Since
Protocol A603

Definition at line 552 of file FmiApplicationLayer.h.

Referenced by removeStopById(), removeStopByIndex(), resetSavedStops(), rx(), and sendStopMoveRequest().

bool FmiApplicationLayer::mStopListInitialized

If TRUE, the stop list has been initialized.

Definition at line 421 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), and rx().

message_throttling_data_type FmiApplicationLayer::mThrottledProtocols[60]

Response from the last Message Throttling Query Protocol.

Since
Protocol A605

Definition at line 635 of file FmiApplicationLayer.h.

Referenced by rx().

bool FmiApplicationLayer::mUseAOBRD

If true, allow AOBRD driver provisioning.

Definition at line 683 of file FmiApplicationLayer.h.

Referenced by CFeatureDlg::OnBnClickedOk().

bool FmiApplicationLayer::mUseMultipleDrivers

If true, multiple driver support is enabled.

Definition at line 649 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), and CFeatureDlg::OnBnClickedOk().

bool FmiApplicationLayer::mUsePasswords

If true, driver password support is enabled.

Definition at line 652 of file FmiApplicationLayer.h.

Referenced by FmiApplicationLayer(), CFeatureDlg::OnBnClickedOk(), and rx().


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