Garmin Fleet Management Controller
2.19.0
|
Serial communication controller for Garmin and FMI packets. More...
#include <FmiApplicationLayer.h>
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< StopListItem > | mA603Stops |
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< AobrdDriverItem > | mAOBRDDrivers |
Map of allowed driver IDs and passwords. More... | |
FileBackedMap< ClientListItem > | mCannedMessages |
Map of canned message IDs to names. More... | |
FileBackedMap< ClientListItem > | mCannedResponses |
Map of canned response IDs to names. More... | |
FileBackedMap< ClientListItem > | mCategories |
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< DriverLoginItem > | mDriverLogins |
Map of allowed driver IDs and passwords. More... | |
char | mDriverStatus [FMI_DRIVER_COUNT][50] |
Last driver status received from the client. More... | |
FileBackedMap< ClientListItem > | mDriverStatuses |
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< InboxListItem > | mSentCannedResponseMessages |
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< uint32 > | mStopIndexInList |
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< WaypointListItem > | mWaypoints |
Map of waypoint IDs to names. More... | |
Protected Attributes | |
TransportLayer * | mTransportLayer |
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... | |
Serial communication controller for Garmin and FMI packets.
The FmiApplicationLayer class performs the application- level communication with the client device.
Definition at line 72 of file FmiApplicationLayer.h.
Enum to track file transfer status.
Enumerator | |
---|---|
TRANSFER_NOT_STARTED | |
TRANSFER_STARTED | |
TRANSFER_IN_PROGRESS | |
TRANSFER_COMPLETED | |
TRANSFER_FAILED |
Definition at line 82 of file FmiApplicationLayer.h.
FmiApplicationLayer::FmiApplicationLayer | ( | id_type | freeformFmiPacketId | ) |
Constructor.
Definition at line 84 of file FmiApplicationLayer.cpp.
References CODEPAGE_ASCII, FALSE, INVALID32, mActiveRoute, mActiveStopId, mAOBRDCurrentShipmentTxIndex, mAOBRDStopShipmentTxIndex, mCannedResponseMessageBody, mCannedResponseMessageType, mClientCodepage, mClientPingCount, mClientProductId, mClientSoftwareVersion, mClientUnitId, mCurrentReceiptFile, mDriverId, mDriverStatus, mEnablePending, mEtaDistance, mEtaLatitude, mEtaLongitude, mEtaTime, mFilePath, mFileSize, mFileTransferBytesDone, mFileTransferSize, mFileTransferState, mFileVersion, mFileVersionLength, mFreeformFmiPacketId, mHorizontalVelocity, mLastFilePacketSent, mProtocols, mPvtAltitude, mPvtDate, mPvtEastWestVelocity, mPVTFixType, mPvtLatitude, mPvtLongitude, mPvtNorthSouthVelocity, mPvtTime, mPvtUpDownVelocity, mRefreshingCannedMessages, mRefreshingCannedResponses, mRefreshingDriverStatusList, mSentDriverId, mSentDriverStatus, mServerPingCount, mStopFileTransfer, mStopListInitialized, mUseMultipleDrivers, mUsePasswords, and TRANSFER_NOT_STARTED.
|
virtual |
|
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.
aMessageText | Message text, as a null-terminated string in the client codepage |
aMessageId | The message ID |
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().
|
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.
aNorthVelocity | The north velocity in m/s; negative values represent south |
aEasstVelocity | The 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().
|
private |
Save received file chunk.
offset | Current offset |
length | Length of recieved data |
data | Received 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().
|
virtualinherited |
Disconnect the TransportLayer from this ApplicationLayer.
Definition at line 40 of file ApplicationLayer.cpp.
References ApplicationLayer::mTransportLayer.
|
private |
Save received file chunk.
crc | CRC |
Definition at line 3846 of file FmiApplicationLayer.cpp.
References EVENT_FMI_AOBRD_FILE_TRANSFER_RECEIVED, EVENT_FMI_FORM_SUBMIT_RECEIVED, EVENT_FMI_IFTA_FILE_TRANSFER_RECEIVED, file_info_data_type::file_type, file_receipt_from_srvr_data_type::file_type, FMI_FILE_RESULT_SUCCESS, FMI_FILE_TYPE_AOBRD, FMI_FILE_TYPE_CUSTOM_FORMS, FMI_FILE_TYPE_IFTA, FMI_ID_FILE_END_RCPT, mCurrentReceiptFile, Event::post(), file_receipt_from_srvr_data_type::result_code, sendAOBRDDriverProfileV2(), and txFmi().
Referenced by rx().
uint32 FmiApplicationLayer::getNextStopId | ( | ) |
Find an available stop ID.
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.
file_type | The 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().
|
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.
aPacket | The 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().
|
private |
Process a Driver Status Update from the client.
aDriverStatusId | The new driver status. |
aDriverIndex | The driver index; must be zero if A607 support is not enabled. |
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().
|
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.
aUniqueId | The unique_id of the stop to delete |
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.
aStopIndex | The index of the stop in the list. |
Definition at line 2387 of file FmiApplicationLayer.cpp.
References FileBackedMap< T >::empty(), INVALID32, mA603Stops, mStopIndexInList, FileBackedMap< T >::remove(), and sendA603Stop().
Referenced by removeStopById().
|
private |
Clear the canned messages on the server.
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().
|
private |
Clear the canned response text messages on the server.
Definition at line 4170 of file FmiApplicationLayer.cpp.
References FileBackedMap< T >::clear(), and mSentCannedResponseMessages.
Referenced by sendDataDeletionRequest().
|
private |
Clear the canned responses on the server.
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().
|
private |
Clear the driver statuses on the server.
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().
|
private |
Clear the stop list on the server.
Definition at line 4131 of file FmiApplicationLayer.cpp.
References FileBackedMap< T >::clear(), mA603Stops, and mStopIndexInList.
Referenced by sendDataDeletionRequest().
|
private |
Clear the waypoint and waypoint category lists on the server.
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().
void FmiApplicationLayer::retryBaudRateSync | ( | ) |
Definition at line 4317 of file FmiApplicationLayer.cpp.
References fmi_set_baud_request::baud_rate_type, FMI_BAUD_RATE_38400, FMI_BAUD_RATE_57600, FMI_BAUD_RATE_9600, FMI_BAUD_RATE_SYNC_REQUEST, FMI_SET_BAUD_REQUEST, mBaudRateSyncRateType, fmi_set_baud_request::request_type, and txFmi().
|
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.
aPacket | The received packet to process |
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.
aDegreesLatitude | The destination latitude, in degrees (positive is north) |
aDegreesLongitude | The destination longitude, in degrees (positive is east) |
aStopName | A null-terminated string in the client codepage containing the name of the stop. |
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
aFmiPacketId | FMI packet ID for the protocol to use |
aMessageText | Message text, as a null-terminated string in the client codepage |
aMessageId | The message ID. |
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.
aLatitude | The destination latitude, in semicircles |
aLongitude | The destination longitude, in semicircles |
aStopName | A null-terminated string containing the name of the stop. |
aStopId | The stop ID to use. |
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.
aMessageText | Message text, as a null-terminated string in the client codepage |
aMessageId | The message ID. |
aMessageType | The message type, a value from the a604_message_type enum |
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.
aDriverIndex | The index of the driver |
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.
aDriverId | The new driver ID, in the client's code page |
aIndex | The driver index |
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.
aDriverIndex | The index of the driver |
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().
Initiate the A607 Driver Status Update protocol.
aDriverStatusId | The new driver status. |
aIndex | The driver index. |
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.
aMessageText | Message text, as a null-terminated string in the client codepage |
aMessageId | The message ID |
Definition at line 2715 of file FmiApplicationLayer.cpp.
References beginA611LongTextMessage(), and mLongTextMessageInProgress.
Referenced by CTxtMsgNewDlg::OnBnClickedOk(), and sendStopStatusRequest().
|
private |
Send an AOBRD driver profile V2 to the device per request from device.
Respond to device supporting A615 with profile for driver ID.
driver | The driver profile |
Definition at line 3940 of file FmiApplicationLayer.cpp.
References fmi_driver_profile_data_type_V2::carrier_id, fmi_driver_profile_data_type_V2::carrier_name, FileBackedMap< T >::contains(), fmi_driver_profile_data_type_V2::driver_id, fmi_driver_profile_data_type_V2::first_name, FMI_DRIVER_PROFILE_DOWNLOAD_RESPONSE_V2, FileBackedMap< T >::get(), AobrdDriverItem::getCarrierID(), AobrdDriverItem::getCarrierName(), AobrdDriverItem::getDriverId(), AobrdDriverItem::getFirstName(), AobrdDriverItem::getLastName(), AobrdDriverItem::getLoadTypeRuleset(), AobrdDriverItem::getLongTermRuleset(), AobrdDriverItem::getTimeZone(), fmi_driver_profile_data_type_V2::last_name, fmi_driver_profile_data_type_V2::load_type_rule_set, fmi_driver_profile_data_type_V2::long_term_rule_set, mAOBRDDrivers, mClientCodepage, fmi_driver_profile_data_type_V2::result_code, sendAOBRDDriverLogoff(), fmi_driver_profile_data_type_V2::status, fmi_driver_profile_data_type_V2::time_zone, and txFmi().
Referenced by rx(), and sendAOBRDDriverProfileV2().
void FmiApplicationLayer::sendAOBRDDriverLogoff | ( | const AobrdDriverItem & | driver | ) |
Send an AOBRD driver logoff command to the device.
Send driver logoff command to the device.
driver | The driver profile |
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::sendAOBRDDriverProfile | ( | const AobrdDriverItem & | driver | ) |
Send an AOBRD driver profile to the device.
Send updated driver profile to device.
driver | The driver profile |
Definition at line 3610 of file FmiApplicationLayer.cpp.
References fmi_driver_profile_data_type::carrier_id, fmi_driver_profile_data_type::carrier_name, fmi_driver_profile_data_type::driver_id, fmi_driver_profile_data_type::first_name, FMI_DRIVER_PROFILE_UPDATE, AobrdDriverItem::getCarrierID(), AobrdDriverItem::getCarrierName(), AobrdDriverItem::getDriverId(), AobrdDriverItem::getFirstName(), AobrdDriverItem::getLastName(), AobrdDriverItem::getLongTermRuleset(), AobrdDriverItem::getTimeZone(), fmi_driver_profile_data_type::last_name, fmi_driver_profile_data_type::long_term_rule_set, mClientCodepage, mProtocols, fmi_driver_profile_data_type::result_code, sendAOBRDDriverProfileV2(), fmi_driver_profile_data_type::status, fmi_driver_profile_data_type::time_zone, and txFmi().
Referenced by sendNextAOBRDShipment().
|
private |
Push an AOBRD driver profile V2 to the device.
Push updated driver profile to device supporting A615.
driver | The driver profile |
Definition at line 3893 of file FmiApplicationLayer.cpp.
References fmi_driver_profile_data_type_V2::adverse_condition_time, fmi_driver_profile_data_type_V2::carrier_id, fmi_driver_profile_data_type_V2::carrier_name, fmi_driver_profile_data_type_V2::driver_id, fmi_driver_profile_data_type_V2::first_name, FMI_DRIVER_PROFILE_UPDATE_V2, AobrdDriverItem::getCarrierID(), AobrdDriverItem::getCarrierName(), AobrdDriverItem::getDriverId(), AobrdDriverItem::getFirstName(), AobrdDriverItem::getLastName(), AobrdDriverItem::getLoadTypeRuleset(), AobrdDriverItem::getLongTermRuleset(), AobrdDriverItem::getTimeZone(), fmi_driver_profile_data_type_V2::last_name, fmi_driver_profile_data_type_V2::load_type_rule_set, fmi_driver_profile_data_type_V2::long_term_rule_set, mClientCodepage, fmi_driver_profile_data_type_V2::result_code, sendAOBRDDriverDownloadResponseV2(), fmi_driver_profile_data_type_V2::status, fmi_driver_profile_data_type_V2::time_zone, and txFmi().
Referenced by endFileReceive(), and sendAOBRDDriverProfile().
void FmiApplicationLayer::sendAOBRDOdometerValue | ( | uint32 | aOdometer | ) |
Send AOBRD Odometer value to device.
Set AOBRD odometer value.
This function sets odometer value on the client.
aOdometer | New odometer value |
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().
Send a request to update the auto-arrival preferences.
aAutoArrivalTime | The minimum stop time, in seconds |
aAutoArrivalDistance | The minimum stop distance, in meters |
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.
aMessageId | The canned message ID |
aMessageText | The message text associated with the ID |
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.
aResponseId | The canned response ID |
aResponseText | The response text associated with the ID |
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.
aMessageText | The message text, as a null-terminated string in the client codepage |
aMessageId | The message ID |
aResponseCount | The number of allowed responses |
aResponseList | Pointer to an array of allowed responses. |
aMessageType | The aMessageType for the message; see the a604_message_type enum. |
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 | ||
) |
Create waypoint category.
aCatId | The category ID (0-15) |
aCatName | The category name |
Definition at line 3477 of file FmiApplicationLayer.cpp.
References FMI_ID_CREATE_WAYPOINT_CAT, FileBackedMap< T >::get(), category_data_type::id, mCategories, mClientCodepage, category_data_type::name, FileBackedMap< T >::put(), sendMessageDeleteRequest(), ClientListItem::setUpdateName(), and txFmi().
Referenced by CWaypointDlg::OnBnClickedWptBtnCreateCat(), and sendDeleteWaypointCat().
void FmiApplicationLayer::sendDataDeletionRequest | ( | del_data | aDelDataType | ) |
Send a data deletion request and remove the appropriate data from the server.
aDelDataType | The type of data that the client should delete |
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.
aMessageId | The canned message ID to delete |
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.
aResponseId | The canned response ID to delete |
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.
aStatusId | The ID of the item to be deleted on the client |
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.
aUniqueId | The unique ID of the waypoint to delete |
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 | ) |
Delete waypoint category.
aCatIdx | The category to delete |
Definition at line 3442 of file FmiApplicationLayer.cpp.
References FileBackedMap< T >::begin(), FileBackedMap< T >::end(), EVENT_FMI_WAYPOINT_LIST_CHANGED, FALSE, FMI_ID_DELETE_WAYPOINT_CAT, FileBackedMap< T >::get(), mWaypoints, Event::post(), sendCreateWaypointCat(), ClientListItem::setValid(), and txFmi().
Referenced by CWaypointDlg::OnBnClickedWptBtnDeleteCat(), and sendDeleteWaypoint().
void FmiApplicationLayer::sendDriverIdRequest | ( | ) |
Ask the client for the current Driver ID.
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.
aDriverId | The new driver ID, in the client's code page |
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.
aStatusId | The ID of the aStatusText item to be added (or updated) on the client |
aStatusText | The textual description corresponding to the id |
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.
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.
aDriverStatusId | The new driver status. |
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().
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.
aFeatureCodes | Array of feature codes to send |
aFeatureCount | Number of feature codes to send. To send an A602 enable, this must be zero. |
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.
aEnable | If 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.
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.
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.
aFilename | The local file name to transfer |
aVersionLength | The number of significant bytes of aVersion (must be between 0 and 16, inclusive) |
aVersion | An array of bytes of aVersion data to associate with this file. |
aFileType | One of several options that the device should be aware of |
gzipIt | A flag for determining if the file should be compressed before sending |
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.
aFmiPacketId | The FMI packet ID |
aFmiPayload | The FMI payload |
aFmiPayloadSize | The size of the FMI payload |
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
aSpeed | Safe mode speed |
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 | ||
) |
Definition at line 2281 of file FmiApplicationLayer.cpp.
References ID_HOSART_PACKET, ID_SET_TIME_PACKET, MAX_PAYLOAD_SIZE, mFreeformFmiPacketId, ApplicationLayer::mTransportLayer, and TransportLayer::tx().
Referenced by sendFmiPacket().
void FmiApplicationLayer::sendGpiFileInfoRequest | ( | ) |
Send a GPI File Information Request to the client.
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 | ) |
Ask the server to delete a text message.
aMessageId | The message ID |
Definition at line 3502 of file FmiApplicationLayer.cpp.
References FMI_ID_TEXT_MSG_DELETE_REQUEST, MessageId::getId(), MessageId::getIdSize(), delete_message_request_data_type::id, delete_message_request_data_type::id_size, sendAOBRDOdometerValue(), and txFmi().
Referenced by CTxtMsgDeleteRequestDlg::OnBnClickedOk(), and sendCreateWaypointCat().
void FmiApplicationLayer::sendMessageThrottlingQuery | ( | ) |
Initiate the Message Throttling Query protocol.
Definition at line 3365 of file FmiApplicationLayer.cpp.
References FMI_ID_MSG_THROTTLING_QUERY, sendWaypoint(), and txFmi().
Referenced by CMsgThrottlingDlg::OnInitDialog().
Sends an update to the client to tell it whether to enable or disable a protocol.
aPacketId | The packet ID of the first packet in the protocol |
aThrottleState | The new state (0=disable, 1=enable) |
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().
|
private |
Send next AOBRD annotation to device.
driver | The driver profile |
Definition at line 3665 of file FmiApplicationLayer.cpp.
References cnt_of_array, CONTAINS_DATA, convertAnnotationRecord(), AobrdEventLogConverter::DRIVER_ANNOTATION, fmi_driver_annotation_data_type::driver_id, EMPTY_DATA, AobrdEventLogConverter::findRecordAt(), FMI_ANNOTATION_DOWNLOAD_RESPONSE, getReceiveFilename(), mAOBRDAnnotationDriverId, mAOBRDCurrentAnnotationTxIndex, mAOBRDStopAnnotationTxIndex, SAVE_CONVERTED_AOBRD_LOG, fmi_driver_annotation_data_type::server_result_code, txFmi(), and UNKNOWN_DRIVER.
Referenced by rx().
|
private |
Send next AOBRD shipment to device.
driver | The driver profile |
Definition at line 3541 of file FmiApplicationLayer.cpp.
References cnt_of_array, CONTAINS_DATA, fmi_driver_shipment_data_type::driver_id, EMPTY_DATA, FMI_SHIPMENT_DOWNLOAD_RESPONSE, FileBackedMap< T >::get(), AobrdShipment::getCommodity(), AobrdShipment::getDocNumber(), AobrdShipment::getServerEndTime(), AobrdShipment::getServerStartTime(), AobrdShipment::getServerTimestamp(), AobrdDriverItem::getShipments(), AobrdShipment::getShipperName(), mAOBRDCurrentShipmentTxIndex, mAOBRDDrivers, mAOBRDShipmentDriverId, mAOBRDStopShipmentTxIndex, mClientCodepage, sendAOBRDDriverProfile(), fmi_driver_shipment_data_type::server_commodity, fmi_driver_shipment_data_type::server_doc_number, fmi_driver_shipment_data_type::server_end_time, fmi_driver_shipment_data_type::server_result_code, fmi_driver_shipment_data_type::server_shipper_name, fmi_driver_shipment_data_type::server_start_time, fmi_driver_shipment_data_type::server_timestamp, txFmi(), and UNKNOWN_DRIVER.
Referenced by rx().
void FmiApplicationLayer::sendPing | ( | ) |
Send a ping packet to the client.
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.
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
aMode | Mode |
aTimeOver | Time over in seconds |
aTimeUnder | Time under in seconds |
aAlertUser | Alert audibly when speeding event begins |
aThreshold | Threshold in m/s over speed limit |
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().
Send a stop move request.
aMoveToIndex | The index that the stop should be moved to |
aMoveFromIndex | The index that the stop should be moved from |
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.
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.
aStopId | The unique_id of the stop to update |
aStopStatus | The new stop aStopStatus |
aMoveToIndex | The stop_position_in_list if this is a move stop request. Defaults to INVALID16 (0xFFFF) |
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.
aMessageId | The message ID |
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.
aElementId | The ID of the element |
aNewText | A null-terminated string (50 characters max) containing the new text for the element. |
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.
aUniqueId | Server-assigned unique ID for the waypoint |
aLat | The waypoint latitude, in degrees (east is positive) |
aLon | The waypoint longitude, in degrees (north is positive) |
aSymbol | The waypoint symbol |
aName | The waypoint name |
aCat | Categories that this waypoint is part of (bit mapped) |
aComment | The waypoint comment |
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().
|
private |
Save received file chunk.
file_size | The size of the file |
Definition at line 3751 of file FmiApplicationLayer.cpp.
References continueFileReceive(), file_info_data_type::file_type, file_receipt_from_srvr_data_type::file_type, FMI_FILE_RESULT_SUCCESS, FMI_ID_FILE_START_RCPT, getReceiveFilename(), mCurrentReceiptFile, file_receipt_from_srvr_data_type::result_code, and txFmi().
Referenced by getReceiveFilename(), and rx().
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().
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().
|
private |
Transmit Garmin command packet (packet ID = ID_COMMAND_BYTE)
aCommandId | The 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().
|
private |
Transmit FMI packet (packet ID = ID_FMI_BYTE)
This procedure frames and transmits a FMI specific packet.
aFmiPacketId | The FMI packet ID |
aData | The FMI payload. This may be NULL if aSize is 0. |
aSize | The number of bytes in the FMI payload. |
aSendNow | If 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. |
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().
FileBackedMap<StopListItem> FmiApplicationLayer::mA603Stops |
Map of unique ID to stop details for all A603 stops on the client.
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.
Definition at line 558 of file FmiApplicationLayer.h.
Referenced by FmiApplicationLayer(), and rx().
uint32 FmiApplicationLayer::mActiveStopId |
Unique ID of the active stop.
Definition at line 546 of file FmiApplicationLayer.h.
Referenced by FmiApplicationLayer(), and rx().
|
private |
Driver ID for annotations being sent to device.
Definition at line 877 of file FmiApplicationLayer.h.
Referenced by rx(), and sendNextAOBRDAnnotation().
|
private |
Iterator for annotations being sent to device.
Definition at line 880 of file FmiApplicationLayer.h.
Referenced by rx(), and sendNextAOBRDAnnotation().
|
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().
|
private |
Driver ID for shipments being sent to device.
Definition at line 868 of file FmiApplicationLayer.h.
Referenced by rx(), and sendNextAOBRDShipment().
|
private |
Iterator end for annotations being sent to device.
Definition at line 883 of file FmiApplicationLayer.h.
Referenced by rx(), and sendNextAOBRDAnnotation().
|
private |
Iterator end for shipments being sent to device.
Definition at line 874 of file FmiApplicationLayer.h.
Referenced by FmiApplicationLayer(), rx(), and sendNextAOBRDShipment().
|
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.
Definition at line 613 of file FmiApplicationLayer.h.
Referenced by resetCannedMessages(), rx(), and sendCannedMessage().
|
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.
Definition at line 838 of file FmiApplicationLayer.h.
Referenced by FmiApplicationLayer(), rx(), and sendCannedResponseTextMessage().
|
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.
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.
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().
codepage_type FmiApplicationLayer::mClientCodepage |
Code page used for encoding of text fields when communicating with the client.
Definition at line 418 of file FmiApplicationLayer.h.
Referenced by FmiApplicationLayer(), CDashcamNtfctnFromClient::init(), CSendSensorDlg::OnBnClickedCreate(), CSendAlertDlg::OnBnClickedOk(), CFeatureDlg::OnBnClickedOk(), CSafeModeDlg::OnBnClickedOk(), CTxtMsgStatusRequestDlg::OnBnClickedOk(), CAobrdOdometerDlg::OnBnClickedOk(), CUITextChangeDlg::OnBnClickedOk(), CTxtMsgDeleteRequestDlg::OnBnClickedOk(), CStopNewDlg::OnBnClickedOk(), CTxtMsgNewDlg::OnBnClickedOk(), CSendSensorDlg::OnBnClickedUpdate(), CSendAlertDlg::OnEnChangeAlertText(), CSendSensorDlg::OnEnChangeSensorDescription(), CSendSensorDlg::OnEnChangeSensorName(), CSendSensorDlg::OnEnChangeSensorStatus(), CGpiQueryDlg::OnGpiInfoReceived(), CTxtMsgFromClient::OnInitDialog(), CTxtMsgAckDlg::OnInitDialog(), CTxtMsgStatusDlg::OnInitDialog(), procDriverStatusUpdate(), rx(), sendA603Stop(), sendAOBRDDriverDownloadResponseV2(), sendAOBRDDriverLogoff(), sendAOBRDDriverProfile(), sendAOBRDDriverProfileV2(), sendCannedMessage(), sendCannedResponse(), sendCreateWaypointCat(), sendDriverStatusListItem(), sendNextAOBRDShipment(), and sendWaypoint().
int FmiApplicationLayer::mClientPingCount |
Number of client-to-server pings received; can be reset by the user.
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.
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().
|
private |
Current file being received.
Definition at line 865 of file FmiApplicationLayer.h.
Referenced by continueFileReceive(), endFileReceive(), FmiApplicationLayer(), and startFileReceive().
|
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.
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.
Definition at line 571 of file FmiApplicationLayer.h.
Referenced by FmiApplicationLayer(), and procDriverStatusUpdate().
FileBackedMap<ClientListItem> FmiApplicationLayer::mDriverStatuses |
Map of driver status IDs to names.
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.
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.
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.
Definition at line 542 of file FmiApplicationLayer.h.
Referenced by FmiApplicationLayer(), and rx().
uint8 FmiApplicationLayer::mEtaMode |
Unique ID of the active stop.
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.
Definition at line 516 of file FmiApplicationLayer.h.
Referenced by FmiApplicationLayer(), and rx().
|
private |
Path to the file that is being transferred to the client.
Definition at line 829 of file FmiApplicationLayer.h.
Referenced by FmiApplicationLayer(), rx(), and sendFile().
uint32 FmiApplicationLayer::mFileSize |
file size (FMI_GPI_FILE_INFORMATION)
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.
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.
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.)
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)
Definition at line 575 of file FmiApplicationLayer.h.
Referenced by FmiApplicationLayer(), CGpiQueryDlg::OnGpiInfoReceived(), and rx().
uint8 FmiApplicationLayer::mFileVersionLength |
Number of significant bytes in mFileVersion.
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.
Definition at line 602 of file FmiApplicationLayer.h.
Referenced by rx(), and CPingStatusDlg::updateTextFields().
|
private |
The last file packet that was sent.
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.
Definition at line 606 of file FmiApplicationLayer.h.
Referenced by rx(), and CPingStatusDlg::updateTextFields().
|
private |
Contains the data for the most recent long text message.
Definition at line 891 of file FmiApplicationLayer.h.
Referenced by beginA611LongTextMessage(), and rx().
|
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().
|
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().
|
private |
If TRUE, FmiApplicationLayer is handling a request to refresh the canned message list.
Definition at line 857 of file FmiApplicationLayer.h.
Referenced by FmiApplicationLayer(), and rx().
|
private |
If TRUE, FmiApplicationLayer is handling a request to refresh the canned response list.
Definition at line 853 of file FmiApplicationLayer.h.
Referenced by FmiApplicationLayer(), and rx().
|
private |
If TRUE, FmiApplicationLayer is handling a request to refresh the driver status list.
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.
Definition at line 622 of file FmiApplicationLayer.h.
Referenced by resetCannedResponseMessages(), and rx().
|
private |
The last driver ID that was sent to the client.
This is a null-terminated string in the client's codepage.
Definition at line 825 of file FmiApplicationLayer.h.
Referenced by FmiApplicationLayer(), rx(), sendA607DriverIdUpdate(), and sendDriverIdUpdate().
|
private |
The last driver status that was sent to the client.
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.
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.
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.
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.
Definition at line 635 of file FmiApplicationLayer.h.
Referenced by rx().
|
protectedinherited |
The next layer down in the stack.
Definition at line 56 of file ApplicationLayer.h.
Referenced by ApplicationLayer::ApplicationLayer(), clearError(), ApplicationLayer::disconnectTransportLayer(), sendEnable(), sendEnablePvtCommand(), sendFreeformFmiPacket(), txCommand(), txFmi(), and ApplicationLayer::~ApplicationLayer().
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().
FileBackedMap<WaypointListItem> FmiApplicationLayer::mWaypoints |
Map of waypoint IDs to names.
Definition at line 643 of file FmiApplicationLayer.h.
Referenced by CWaypointDlg::OnBnClickedWptBtnDelete(), resetWaypoints(), rx(), sendDeleteWaypoint(), sendDeleteWaypointCat(), sendWaypoint(), and CWaypointDlg::updateListBox().