10 #ifndef GarminLinkLayer_H 11 #define GarminLinkLayer_H 20 #define FIFO_SIZE ( 1024 ) 52 uint8 const *
const aData,
Abstract base class for the physical layer.
virtual void rx(uint8 const *const aData, uint32 const aSize)
Copy Data to FIFO.
A circular FIFO buffer for processing received bytes into packets.
int numBytesInFifo()
Calculate the number of bytes in the FIFO buffer.
GarminLinkLayer()
Construct a new GarminLinkLayer.
uint32 head
Index of first byte of data.
static GarminLinkLayer * getInstance()
Get the one and only link layer object.
bool getPacketFromFifo()
Frame Packet.
uint8 buffer[FIFO_SIZE]
Data buffer.
Abstract base class for link Layers in the OSI model.
fifo_type mFifo
FIFO (First-In, First-Out) buffer used to store bytes received from the client until they are parsed ...
void resetPhysicalLayer(PhysicalLayer *aPort)
Reset the physical layer.
void incrementHead(uint32 aIncrement)
Increment FIFO head.
Abstract base class for a packet of data.
void getDataFromFifo(uint8 *aData, uint32 aSize)
Get Data From FIFO.
uint32 tail
Index of last byte of data.
unsigned char uint8
8-bit unsigned integer
static GarminLinkLayer * sInstance
The one and only instance of this class.
uint32 size
Number of bytes of data in the buffer.
Link Layer in the OSI model.
#define FIFO_SIZE
The size of the server's internal FIFO buffer for parsing raw data into packets for processing...
unsigned long int uint32
32-bit unsigned integer
static void destroyInstance()
Delete the one and only link layer object.
virtual bool tx(Packet *aPacket)
Transmit a packet.