Garmin Fleet Management Controller  2.19.0
GarminPacket.h
Go to the documentation of this file.
1 /*********************************************************************
2 *
3 * HEADER NAME:
4 * GarminPacket.h
5 *
6 * Copyright 2009 by Garmin Ltd. or its subsidiaries.
7 *---------------------------------------------------------------------
8 * $NoKeywords$
9 *********************************************************************/
10 #ifndef GarminPacket_H
11 #define GarminPacket_H
12 
13 class GarminPacket;
14 
15 #include <time.h>
16 #include "ApplicationLayer.h"
17 #include "Packet.h"
18 
19 //----------------------------------------------------------------------
25 //----------------------------------------------------------------------
26 class GarminPacket : public Packet
27 {
28 public:
29  GarminPacket();
30 
32  (
33  id_type aId,
34  uint8 * aPayloadData = NULL,
35  uint8 aPayloadSize = 0,
36  ApplicationLayer * aSender = NULL
37  );
38  virtual ~GarminPacket();
39 
40  virtual uint32 getRawSize();
41  virtual const uint8 * getRawBytes();
42 
45  time_t mTxTime;
52 };
53 
54 #endif
#define MAX_PACKET_SIZE
Maximum packet size that can be transmitted.
Definition: garmin_types.h:31
ApplicationLayer * mSender
The ApplicationLayer that originated this packet (for ACK callback)
Definition: GarminPacket.h:51
uint8 mFrame[MAX_PACKET_SIZE]
The packet as transmitted on the serial link (with DLE stuffing)
Definition: GarminPacket.h:50
Garmin serial packet.
Definition: GarminPacket.h:26
GarminPacket()
Construct an empty Garmin RS232 packet.
uint8 id_type
Garmin packet ID.
Definition: garmin_types.h:101
uint8 mChecksum
Twos-complement checksum of this packet.
Definition: GarminPacket.h:48
virtual uint32 getRawSize()
Get the raw size of the frame, in bytes.
virtual const uint8 * getRawBytes()
Get the bytes in the raw frame.
uint8 mPayload[MAX_PAYLOAD_SIZE]
The payload, before DLE stuffing.
Definition: GarminPacket.h:49
unsigned short int uint16
16-bit unsigned integer
Definition: garmin_types.h:64
virtual ~GarminPacket()
Destructor.
id_type mPacketId
A complete serial packet.
Definition: GarminPacket.h:44
Abstract base class for a packet of data.
Definition: Packet.h:18
uint16 mFrameSize
Number of bytes in the packet, with header, footer, and DLE stuffing.
Definition: GarminPacket.h:47
unsigned char uint8
8-bit unsigned integer
Definition: garmin_types.h:62
uint8 mPayloadSize
Size of the payload, before DLE stuffing.
Definition: GarminPacket.h:46
Abstract base class for the application layer in the OSI model.
time_t mTxTime
Time when the packet was last sent.
Definition: GarminPacket.h:45
unsigned long int uint32
32-bit unsigned integer
Definition: garmin_types.h:66
#define MAX_PAYLOAD_SIZE
Maximum payload size, before DLE stuffing.
Definition: garmin_types.h:21