Garmin Fleet Management Controller  2.19.0
FmiApplicationLayer.h
Go to the documentation of this file.
1 /*********************************************************************
2 *
3 * HEADER NAME:
4 * FmiApplicationLayer.h
5 *
6 * Copyright 2008-2016 by Garmin Ltd. or its subsidiaries.
7 *---------------------------------------------------------------------
8 * $NoKeywords$
9 *********************************************************************/
10 #ifndef FmiApplicationLayer_H
11 #define FmiApplicationLayer_H
12 
14 
15 #include <map>
16 #include <vector>
17 #include <list>
18 
19 #include "fmi.h"
20 
21 #include "ApplicationLayer.h"
22 
23 #if( FMI_SUPPORT_A602 )
24 #include "MessageId.h"
25 #endif
26 
27 #if( FMI_SUPPORT_A603 )
28 #include "ClientListItem.h"
29 #include "StopListItem.h"
30 #endif
31 
32 #if( FMI_SUPPORT_A603 || FMI_SUPPORT_A617 )
33 #include "FileBackedMap.h"
34 #endif
35 
36 #if( FMI_SUPPORT_A604 )
37 #include "InboxListItem.h"
38 #endif
39 
40 #if( FMI_SUPPORT_A606 )
41 #include "CSafeModeDlg.h"
42 #endif
43 
44 #if( FMI_SUPPORT_A607 )
45 #include "WaypointListItem.h"
46 #include "DriverLoginItem.h"
47 #endif
48 
49 #if( FMI_SUPPORT_A610 )
50 #include "AobrdDriverItem.h"
51 #endif
52 
53 #if( FMI_SUPPORT_A617 )
54 #include "SensorListItem.h"
55 #endif
56 
57 //----------------------------------------------------------------------
71 //----------------------------------------------------------------------
73 {
74  //
75  // TYPES
76  //
77 public:
78 
79 #if( FMI_SUPPORT_A604 )
80  enum transfer_state
83  {
89  };
90 #endif
91 
92  //
93  // METHODS
94  //
95  public:
97 #if( FMI_SUPPORT_A602 )
98  id_type freeformFmiPacketId
99 #endif
100  );
101 
102  virtual ~FmiApplicationLayer();
103 
104  virtual bool rx
105  (
106  const Packet * aPacket
107  );
108 
109  virtual void onAck
110  (
111  const Packet * aPacket
112  );
113 
115  (
116  bool aEnable
117  );
118 
119  void sendUnitIdRequest();
120 
121  void clearError();
122 
123 #if( FMI_SUPPORT_LEGACY )
124  void sendLegacyProductRequest();
125 
126  void sendLegacyStop
127  (
128  double aLatitude,
129  double aLongitude,
130  char * aStopName
131  );
132 
133  void sendLegacyTextMessage
134  (
135  char * aMessageText
136  );
137 #endif
138 
139 #if( FMI_SUPPORT_A602 )
140  void sendA602Stop
141  (
142  double aLatitude,
143  double aLongitude,
144  char * aStopName
145  );
146 
148  (
149  fmi_id_type aFmiPacketId,
150  char * aMessageText,
151  const MessageId & aMessageId
152  );
153 
154  void sendEnable
155  (
156  uint16 *aFeatureCodes = NULL,
157  uint8 aFeatureCount = 0
158  );
159 
160  void sendFmiPacket
161  (
162  uint16 aFmiPacketId,
163  uint8 * aFmiPayload,
164  uint8 aFmiPayloadSize
165  );
166 
168  (
169  fmi_id_type const aFmiPacketId,
170  uint8 const * const aFmiPayload,
171  uint8 const aFmiPayloadSize
172  );
173 
174  void sendProductRequest();
175 #endif
176 
177 #if( FMI_SUPPORT_A603 )
179 
180  void sendA603Stop
181  (
182  double aLatitude,
183  double aLongitude,
184  char * aStopName,
185  uint32 aStopId
186  );
187 
189  (
190  uint32 aStopId,
191  stop_status_status_type aStopStatus,
192  uint16 aMoveToIndex = INVALID16
193  );
194 
196  (
197  uint16 aMoveToIndex,
198  uint16 aMoveFromIndex
199  );
200 
201  void removeStopByIndex
202  (
203  uint16 aDeletedStopIndex
204  );
205 
206  void sendAutoArrival
207  (
208  uint32 aArrivalTime,
209  uint32 aArrivalDistance
210  );
211 
212  void sendEtaRequest();
213 
214  void sendEtaModeRequest
215  (
216  FMI_eta_mode_type aModeType
217  );
218 
220  (
221  del_data aDataType
222  );
223 #endif
224 
225 #if( FMI_SUPPORT_A604 )
227  (
228  const char * aMessageText,
229  const MessageId & aMessageId,
230  uint8 aMessageType = A604_MESSAGE_TYPE_NORMAL
231  );
233  (
234  const char * aMessageText,
235  const MessageId & aMessageId,
236  uint8 aResponseCount,
237  const uint32 * aResponseList,
238  uint8 aMessageType
239  );
240 
241  void sendFile
242  (
243  char * aFilename,
244  uint8 aVersionLength,
245  uint8 * aVersion,
246  uint8 aFileType,
247  BOOL gzipIt = FALSE
248  );
249 
250  void stopFileTransfer();
251 
252  void sendCannedResponse
253  (
254  uint32 aResponseId,
255  CString aResponseText
256  );
257 
259  (
260  uint32 aResponseId
261  );
262 
263  void sendCannedMessage
264  (
265  uint32 aMessageId,
266  CString aMessageText
267  );
268 
270  (
271  uint32 aMessageId
272  );
273 
274  void sendPing();
275 
276  void sendGpiFileInfoRequest();
277 
278  void sendDriverIdUpdate
279  (
280  char * aDriverId
281  );
282 
283  void sendDriverIdRequest();
284 
286  (
287  uint32 aDriverStatusId,
288  CString aDriverStatusText
289  );
290 
292  (
293  uint32 aDriverStatusId
294  );
295 
297  (
298  uint32 aDriverStatusId
299  );
300 
302 
304  (
305  const MessageId & aMessageId
306  );
307 
308  void sendStopSortRequest();
309 
311  (
312  uint32 aElementId,
313  char * aText
314  );
315 
317  (
318  uint16 aPacketId,
319  uint16 aNewState
320  );
321 #endif
322 
323 #if( FMI_SUPPORT_A605 )
325 #endif
326 
327 #if (FMI_SUPPORT_A606)
329  (
330  float speed
331  );
332 #endif
333 
334 #if( FMI_SUPPORT_A607 )
336  (
337  uint8 aDriverIndex
338  );
339 
341  (
342  uint8 aDriverIndex
343  );
344 
346  (
347  char * aDriverId,
348  uint8 aIndex
349  );
350 
352  (
353  uint32 aDriverStatusId,
354  uint8 aIndex
355  );
356 
358  (
359  uint8 aCatId,
360  CString &aCatName
361  );
362  void sendDeleteWaypoint
363  (
364  uint16 aUniqueId
365  );
366 
368  (
369  uint16 aCatIdx
370  );
371 
372  void sendWaypoint
373  (
374  uint16 aUniqueId,
375  double aLat,
376  double aLon,
377  uint16 aSymbol,
378  CString &aName,
379  uint16 aCat,
380  CString &aComment
381  );
382 
383 #endif
384 
385 #if( FMI_SUPPORT_A607 )
387  (
388  const MessageId & aMessageId
389  );
390 #endif
391 
392 #if( FMI_SUPPORT_A608 )
394  (
395  uint8 aMode,
396  uint8 aTimeOver,
397  uint8 aTimeUnder,
398  boolean aAlertUser,
399  float aThreshold
400  );
401 #endif
402 
403 #if( FMI_SUPPORT_A611 )
405  (
406  const char * aMessageText,
407  const MessageId & aMessageId,
408  uint8 aMessageType
409  );
410 #endif
411 
412 #if( FMI_SUPPORT_A616 )
413  void retryBaudRateSync();
414 #endif
415 
419 
422 
425  char mClientUnitId[11];
426 
429  char mPVTFixType[9];
430 
433  char mPvtDate[11];
434 
438  char mPvtTime[13];
439 
444  char mPvtLatitude[14];
445 
450  char mPvtLongitude[14];
451 
456  char mPvtAltitude[13];
457 
463 
469 
475 
482 
487 
493 
500 
501 #if( FMI_SUPPORT_A602 )
502  bool mEnablePending;
504 
507 #endif
508 
509 #if( FMI_SUPPORT_A603 )
510  char mEtaTime[13];
524  char mEtaDistance[13];
533  char mEtaLatitude[14];
542  char mEtaLongitude[14];
543 
547 
552  std::vector<uint32> mStopIndexInList;
553 
559 
563 #endif
564 
565 #if( FMI_SUPPORT_A604 )
566  char mDriverId[FMI_DRIVER_COUNT][50];
572 
579 
592 
599 
603 
607 
623 
630 #endif
631 
632 #if( FMI_SUPPORT_A605 )
636 #endif
637 
638 #if( FMI_SUPPORT_A607 )
641 
644 
647 
650 
653 #endif
654 
655 #if( FMI_SUPPORT_A609 )
656  void rebootDevice();
658 #endif
659 
660 #if( FMI_SUPPORT_A610 )
663  (
664  uint32 aOdometer
665  );
666 
669  (
670  const AobrdDriverItem & driver
671  );
672 
674  const char * getReceiveFilename
675  (
676  uint8 file_type
677  ) const;
678 
681 
683  bool mUseAOBRD;
684 #endif
685 
686 #if( FMI_SUPPORT_A615 )
689  (
690  const AobrdDriverItem & driver
691  );
692 #endif
693 
694 #if( FMI_SUPPORT_A623 )
695  uint8 mEtaMode;
698 #endif
699 
700 #if( CDT_SUPPORT )
701  void txCdt
702  (
703  cdt_id_type const aCdtPacketId,
704  uint8 const * const aCdtPayload,
705  uint8 const aCdtPayloadSize,
706  bool const aSendNow = false
707  );
708 #endif
709 
710  private:
711 
712 #if( FMI_SUPPORT_A610 )
714  (
715  char * driver_id
716  );
717 
719  (
720  char * driver_id
721  );
722 
724  (
725  const file_info_data_type & file_size
726  );
727 
729  (
730  uint32 offset,
731  uint8 length,
732  uint8 const* data
733  );
734 
736 
739  #define SAVE_AOBRD_LOG "aobrd_compressed.dat"
740 
743  #define SAVE_CONVERTED_AOBRD_LOG "aobrd_event_log.%s.csv"
744 
745  #define SAVE_RECEIVED_AOBRD_LOG "aobrd_from_client.dat"
746 #endif
747 
748 #if( FMI_SUPPORT_A615 )
749  #define SAVE_RECEIVED_IFTA_FILE "received_ifta.dat.gz"
750 
753  (
754  const AobrdDriverItem & driver
755  );
758  (
759  const char * driverId
760  );
761 #endif
762 
763  void txCommand
764  (
765  command_type const aCommandId
766  );
767 
769  (
770  float32 aNorthVelocity,
771  float32 aEastVelocity
772  );
773 
774 #if( FMI_SUPPORT_A602 )
775  void txFmi
776  (
777  fmi_id_type const aFmiPacketId,
778  uint8 const * const aFmiPayload,
779  uint8 const aFmiPayloadSize,
780  bool const aSendNow = false
781  );
782 #endif
783 #if( FMI_SUPPORT_A603 )
784  void removeStopById
785  (
786  uint32 aStopId
787  );
788 
789  void resetSavedStops();
790 #endif
791 
792 #if( FMI_SUPPORT_A604 )
793  boolean procDriverStatusUpdate
794  (
795  uint32 aDriverStatusId,
796  uint8 aDriverIndex = 0
797  );
799  void resetDriverStatusList();
800  void resetCannedMessages();
801  void resetCannedResponses();
802 #endif
803 
804 #if( FMI_SUPPORT_A607 )
805  void resetWaypoints();
806 #endif
807 
808 #if( FMI_SUPPORT_A611 )
810  (
811  const char * aMessageText,
812  const MessageId & aMessageId,
813  uint8 aMessageType
814  );
815 #endif
816 
817 #if( FMI_SUPPORT_A604 )
825  char mSentDriverId[50];
826 
829  char mFilePath[200];
833 
839 
845 
858 #endif
859 
860 #if( FMI_SUPPORT_A610 )
863 
866 
869 
872 
875 
878 
881 
884 #endif
885 
886 #if( FMI_SUPPORT_A611 )
889 
892 
895 #endif
896 
897 #if( FMI_SUPPORT_A612 )
898  #define SAVE_RECEIVED_FORM_SUBMIT "tmp_submitted_form.xml"
901 #endif
902 
903 #if( FMI_SUPPORT_A616 )
906 #endif
907 
908 };
909 
910 #endif
file_info_data_type mCurrentReceiptFile
Current file being received.
void sendAOBRDDriverDownloadResponseV2(const char *driverId)
Send an AOBRD driver profile V2 to the device per request from device.
void sendAutoArrival(uint32 aArrivalTime, uint32 aArrivalDistance)
Send a request to update the auto-arrival preferences.
char mEtaTime[13]
String containing the ETA time from the client, or "invalid".
uint8 mCannedResponseMessageType
The message_type for the server to client canned text message.
void sendA607DriverIdRequest(uint8 aDriverIndex)
Ask the client for the current Driver ID.
#define INVALID16
Placeholder for an invalid 16-bit value.
Definition: fmi.h:142
void resetSavedStops()
Clear the stop list on the server.
void sendProductRequest()
Send an FMI Product ID request.
bool mUsePasswords
If true, driver password support is enabled.
int mAOBRDCurrentShipmentTxIndex
Iterator for shipments being sent to device.
void calculate2DVelocity(float32 aNorthVelocity, float32 aEastVelocity)
Calculate and format a 2D velocity given the north and east components.
void sendAOBRDDriverProfileV2(const AobrdDriverItem &driver)
Push an AOBRD driver profile V2 to the device.
#define TEXT_MSG_BUFFER_MAX_SIZE
The maximum size of any text message, in bytes.
Definition: fmi.h:172
void beginA611LongTextMessage(const char *aMessageText, const MessageId &aMessageId, uint8 aMessageType)
Send the first packet of an A611 server to client long text message.
void sendA607DriverStatusRequest(uint8 aDriverIndex)
Ask the client for the current Driver Status.
uint16 fmi_id_type
Fleet Management packet ID (first two bytes of payload when Garmin packet ID == ID_FMI_PACKET) ...
Definition: fmi.h:272
void sendUnitIdRequest()
Request the Unit ID (ESN) from the client.
uint8 mLongTextMessagePayloadSize[10]
Indicates the lengths of the long text message packets.
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)
char mPvtLongitude[14]
Longitude in degrees from the last PVT packet, as an ASCII null-terminated string.
sint16 mClientSoftwareVersion
Raw software version reported by the client.
int mAOBRDCurrentAnnotationTxIndex
Iterator for annotations being sent to device.
void endFileReceive()
Save received file chunk.
uint32 mFileTransferBytesDone
Number of bytes of the file that have been transferred so far.
void sendDriverIdRequest()
Ask the client for the current Driver ID.
char mSentDriverId[50]
The last driver ID that was sent to the client.
FileBackedMap< DriverLoginItem > mDriverLogins
Map of allowed driver IDs and passwords.
bool sendCannedResponseTextMessage(const char *aMessageText, const MessageId &aMessageId, uint8 aResponseCount, const uint32 *aResponseList, uint8 aMessageType)
Initiate the canned response text message protocol.
transfer_state
Enum to track file transfer status.
char mDriverStatus[FMI_DRIVER_COUNT][50]
Last driver status received from the client.
void startFileReceive(const file_info_data_type &file_size)
Save received file chunk.
uint8 id_type
Garmin packet ID.
Definition: garmin_types.h:101
char mEtaLatitude[14]
String representing the latitude in decimal degrees (and N or S)
void sendStopMoveRequest(uint16 aMoveToIndex, uint16 aMoveFromIndex)
Send a stop move request.
void sendA607DriverIdUpdate(char *aDriverId, uint8 aIndex)
Send an A607 Driver ID Update to the client.
FileBackedMap< ClientListItem > mCannedResponses
Map of canned response IDs to names.
CTime mLastClientPingTime
Last time when a client to server ping was received.
void sendNextAOBRDShipment(char *driver_id)
Send next AOBRD shipment to device.
void sendFmiPacket(uint16 aFmiPacketId, uint8 *aFmiPayload, uint8 aFmiPayloadSize)
Send an arbitrary FMI packet.
uint8 mFileVersionLength
Number of significant bytes in mFileVersion.
uint32 mActiveStopId
Unique ID of the active stop.
Data type for File Data Packet ID.
Definition: fmi.h:1305
CString mAOBRDAnnotationDriverId
Driver ID for annotations being sent to device.
bool mLongTextMessageInProgress
Indicates whether a long text message is in progress.
void sendMessageThrottlingUpdate(uint16 aPacketId, uint16 aNewState)
Sends an update to the client to tell it whether to enable or disable a protocol. ...
char mEtaDistance[13]
Null-terminated ASCII string containing the distance to the current destination, including units...
#define FALSE
Definition: garmin_types.h:46
void sendDriverIdUpdate(char *aDriverId)
Send a Driver ID Update to the client.
void sendCreateWaypointCat(uint8 aCatId, CString &aCatName)
Create waypoint category.
void sendEnable(uint16 *aFeatureCodes=NULL, uint8 aFeatureCount=0)
Transmit an FMI Enable packet, and clear any error state.
#define PROTOCOL_SIZE
Size of the formatted "supported protocols" string.
Definition: fmi.h:157
void sendA602TextMessage(fmi_id_type aFmiPacketId, char *aMessageText, const MessageId &aMessageId)
Send a server to client text message, for all A602 FMI protocols.
void sendDeleteCannedMessageRequest(uint32 aMessageId)
Send a request to the client to delete a canned message.
bool sendA611LongTextMessage(const char *aMessageText, const MessageId &aMessageId, uint8 aMessageType)
Send an A611 server to client long text message.
FileBackedMap< StopListItem > mA603Stops
Map of unique ID to stop details for all A603 stops on the client.
codepage_type
The code page used for encoding of text fields sent to or received from the client.
Definition: fmi.h:189
void sendTextMessageStatusRequest(const MessageId &aMessageId)
Ask the server for the aStopStatus of a text message.
bool mRefreshingCannedResponses
If TRUE, FmiApplicationLayer is handling a request to refresh the canned response list...
void sendAOBRDOdometerValue(uint32 aOdometer)
Send AOBRD Odometer value to device.
virtual bool rx(const Packet *aPacket)
Handle a packet received from the client.
void sendWaypoint(uint16 aUniqueId, double aLat, double aLon, uint16 aSymbol, CString &aName, uint16 aCat, CString &aComment)
Send a waypoint.
bool mStopFileTransfer
Flag to indicate that the user wants to stop the file transfer.
id_type mFreeformFmiPacketId
Defaults to ID_FMI_PACKET unless overridden on command line.
void sendA602Stop(double aLatitude, double aLongitude, char *aStopName)
Initiates the A602 stop protocol.
uint32 mFileTransferSize
Total number of bytes in the file being transferred.
FileBackedMap< InboxListItem > mSentCannedResponseMessages
List of message IDs for canned response text messages.
CTime mLastServerPingTime
Last time when a server to client ping was received.
FileBackedMap< AobrdDriverItem > mAOBRDDrivers
Map of allowed driver IDs and passwords.
char mClientUnitId[11]
Null-terminated ASCII string containing the Unit ID (ESN) of the client.
void removeStopByIndex(uint16 aDeletedStopIndex)
Remove a deleted stop.
signed short int sint16
16-bit signed integer
Definition: garmin_types.h:57
void continueFileReceive(uint32 offset, uint8 length, uint8 const *data)
Save received file chunk.
void sendEtaRequest()
Send a request for ETA data.
void sendDeleteDriverStatusListItem(uint32 aDriverStatusId)
Initiate the Delete Driver Status List Item protocol.
void sendSetSpeedLimitAlerts(uint8 aMode, uint8 aTimeOver, uint8 aTimeUnder, boolean aAlertUser, float aThreshold)
Set FMI speed limit alerts.
char mPvtDate[11]
Date from the last PVT packet, as an ASCII null-terminated string of the form MM/DD/YYYY.
bool mActiveRoute
If TRUE, the client has a stop active.
message_throttling_data_type mThrottledProtocols[60]
Response from the last Message Throttling Query Protocol.
codepage_type mClientCodepage
Code page used for encoding of text fields when communicating with the client.
char mPvtEastWestVelocity[15]
East-west velocity in meters per second from the last PVT packet, as an ASCII null-terminated string...
FmiApplicationLayer(id_type freeformFmiPacketId)
Constructor.
int mAOBRDStopShipmentTxIndex
Iterator end for shipments being sent to device.
float float32
32-bit IEEE-format floating point data. (1 sign bit, 8 exponent bits, and 23 mantissa bits) ...
Definition: garmin_types.h:70
char mProtocols[PROTOCOL_SIZE]
Null-terminated ASCII string containing the protocols supported by the client.
bool mUseMultipleDrivers
If true, multiple driver support is enabled.
char mPvtTime[13]
Time from the last PVT packet.
void sendStopStatusRequest(uint32 aStopId, stop_status_status_type aStopStatus, uint16 aMoveToIndex=INVALID16)
Initiate the Stop Status protocol to update an A603 stop.
int mServerPingCount
Number of server-to-client pings sent; can be reset by the user.
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
void sendUserInterfaceText(uint32 aElementId, char *aText)
Request that the text of a particular user interface text element be changed.
#define FMI_DRIVER_COUNT
Number of supported drivers.
Definition: fmi.h:147
void sendFreeformFmiPacket(fmi_id_type const aFmiPacketId, uint8 const *const aFmiPayload, uint8 const aFmiPayloadSize)
Data type for Long Text Message Request Packet ID (0X0055) from server to client. ...
Definition: fmi.h:1873
Serial communication controller for Garmin and FMI packets.
void txCommand(command_type const aCommandId)
Transmit Garmin command packet (packet ID = ID_COMMAND_BYTE)
bool mRefreshingCannedMessages
If TRUE, FmiApplicationLayer is handling a request to refresh the canned message list.
int mAOBRDStopAnnotationTxIndex
Iterator end for annotations being sent to device.
void sendCannedMessage(uint32 aMessageId, CString aMessageText)
Transmit a new or updated canned message to the client.
char mDriverId[FMI_DRIVER_COUNT][50]
Last driver ID received from the client.
bool mStopListInitialized
If TRUE, the stop list has been initialized.
void sendDeleteCannedResponseRequest(uint32 aResponseId)
Send a request to the client to delete a canned response.
#define FMI_SUPPORT_A602
If true, app was build with support for A602 protocols.
Definition: fmi.h:27
uint32 getNextStopId()
Find an available stop ID.
void sendNextAOBRDAnnotation(char *driver_id)
Send next AOBRD annotation to device.
uint8 mFileVersion[16]
file version (FMI_GPI_FILE_INFORMATION)
uint8 mBaudRateSyncRateType
Mark which baud rate is currently being synced.
uint32 mFileSize
file size (FMI_GPI_FILE_INFORMATION)
FileBackedMap< ClientListItem > mDriverStatuses
Map of driver status IDs to names.
unsigned short int uint16
16-bit unsigned integer
Definition: garmin_types.h:64
void sendDriverStatusListItem(uint32 aDriverStatusId, CString aDriverStatusText)
Initiate the Set Driver Status List Item protocol.
void rebootDevice()
Send a command to the attached device to reboot it.
Abstract base class for a packet of data.
Definition: Packet.h:18
char mCannedResponseMessageBody[TEXT_MSG_BUFFER_MAX_SIZE]
The message text for the server to client canned text message.
char mPVTFixType[9]
GPS fix type from the last PVT packet, interpreted as an null-terminated ASCII string.
void resetCannedResponseMessages()
Clear the canned response text messages on the server.
CString mAOBRDShipmentDriverId
Driver ID for shipments being sent to device.
void sendEnablePvtCommand(bool aEnable)
Send an Enable PVT or Disable PVT command.
void sendDeleteWaypointCat(uint16 aCatIdx)
Delete waypoint category.
void resetCannedMessages()
Clear the canned messages on the server.
void sendA603Stop(double aLatitude, double aLongitude, char *aStopName, uint32 aStopId)
Initiates the A603 stop protocol.
void sendDriverStatusRequest()
Asks the client for the current driver status.
bool mEnablePending
If true, the FMI Enable protocol is in progress.
Data type for the Message Throttling Command Packet ID and Message Throttling Response Packet ID...
Definition: fmi.h:1579
void sendDriverStatusUpdate(uint32 aDriverStatusId)
Initiate the Driver Status Update protocol.
Data structure to holds an AOBRD driver info. Used by the FmiApplicationLayer to validate logins when...
void clearError()
Clear any communication error.
Data type for the File Transfer Start Packet ID.
Definition: fmi.h:1274
transfer_state mFileTransferState
State of the current file transfer (in progress, completed, etc.)
const char * getReceiveFilename(uint8 file_type) const
Determine which filename to store a received file under.
virtual void onAck(const Packet *aPacket)
Callback when a packet is ACKed by the client.
bool mUseAOBRD
If true, allow AOBRD driver provisioning.
int mClientPingCount
Number of client-to-server pings received; can be reset by the user.
void sendAOBRDDriverProfile(const AobrdDriverItem &driver)
Send an AOBRD driver profile to the device.
char mPvtNorthSouthVelocity[15]
North-south velocity in meters per second from the last PVT packet, as an ASCII null-terminated strin...
virtual ~FmiApplicationLayer()
Destructor.
uint16 stop_status_status_type
Enumeration for Stop Status protocol.
Definition: fmi.h:962
FileBackedMap< ClientListItem > mCategories
Map of waypoint category IDs to names.
void sendDeleteWaypoint(uint16 aUniqueId)
Delete a waypoint.
bool mRefreshingDriverStatusList
If TRUE, FmiApplicationLayer is handling a request to refresh the driver status list.
unsigned char uint8
8-bit unsigned integer
Definition: garmin_types.h:62
void sendMessageDeleteRequest(const MessageId &aMessageId)
Ask the server to delete a text message.
void sendCannedResponse(uint32 aResponseId, CString aResponseText)
Transmit a new or updated canned response to the client.
void resetDriverStatusList()
Clear the driver statuses on the server.
char mEtaLongitude[14]
String representing the longitude in decimal degrees (and E or W)
char mPvtUpDownVelocity[15]
Up-down velocity in meters per second from the last PVT packet, as an ASCII null-terminated string...
void sendEtaModeRequest(FMI_eta_mode_type aModeType)
Send an ETA mode request.
void sendFile(char *aFilename, uint8 aVersionLength, uint8 *aVersion, uint8 aFileType, BOOL gzipIt=FALSE)
Start a file transfer protocol.
void sendStopSortRequest()
Sends a sort stop list request to the client.
Abstract base class for the application layer in the OSI model.
uint32 mSentDriverStatus
The last driver status that was sent to the client.
FileBackedMap< ClientListItem > mCannedMessages
Map of canned message IDs to names.
uint16 mClientProductId
Numeric product ID reported by the client.
void sendDataDeletionRequest(del_data aDataType)
Send a data deletion request and remove the appropriate data from the server.
void resetWaypoints()
Clear the waypoint and waypoint category lists on the server.
void removeStopById(uint32 aStopId)
Find the index of the deleted stop corresponding to a stop ID.
std::vector< uint32 > mStopIndexInList
Vector relating the stop list to unique_ids.
char mPvtLatitude[14]
Latitude in degrees from the last PVT packet, as an ASCII null-terminated string. ...
void stopFileTransfer()
Stop a file transfer protocol.
file_packet_data_type mLastFilePacketSent
The last file packet that was sent.
void sendGpiFileInfoRequest()
Send a GPI File Information Request to the client.
uint16 command_type
Garmin command ID (payload when packet ID == ID_COMMAND_BYTE)
Definition: fmi.h:260
void sendPing()
Send a ping packet to the client.
void sendA607DriverStatusUpdate(uint32 aDriverStatusId, uint8 aIndex)
Initiate the A607 Driver Status Update protocol.
del_data
Enumeration for Data Deletion protocol.
Definition: fmi.h:982
void sendA604TextMessage(const char *aMessageText, const MessageId &aMessageId, uint8 aMessageType=A604_MESSAGE_TYPE_NORMAL)
Send an A604 server to client open text message.
unsigned long int uint32
32-bit unsigned integer
Definition: garmin_types.h:66
boolean procDriverStatusUpdate(uint32 aDriverStatusId, uint8 aDriverIndex=0)
Process a Driver Status Update from the client.
FileBackedMap< WaypointListItem > mWaypoints
Map of waypoint IDs to names.
char mPvtAltitude[13]
Altitude in meters from the last PVT packet, as an ASCII null-terminated string.
long_text_msg_data_type mLongTextMessage[10]
Contains the data for the most recent long text message.
void sendFmiSafeModeSpeed(float speed)
Set FMI safe mode speed.
char mFilePath[200]
Path to the file that is being transferred to the client.
Encapsulation of a message ID.
Definition: MessageId.h:26
uint8 mCurrentSendFileType
Current file type for file being sent.
void sendMessageThrottlingQuery()
Initiate the Message Throttling Query protocol.
uint8 FMI_eta_mode_type
Definition: fmi.h:1045
uint8 mEtaMode
Unique ID of the active stop.
void sendAOBRDDriverLogoff(const AobrdDriverItem &driver)
Send an AOBRD driver logoff command to the device.
void resetCannedResponses()
Clear the canned responses on the server.