Garmin Fleet Management Controller  2.19.0
ApplicationLayer Class Referenceabstract

Abstract base class for the application layer in the OSI model. More...

#include <ApplicationLayer.h>

+ Inheritance diagram for ApplicationLayer:

Public Member Functions

 ApplicationLayer (TransportLayer *aTransportLayer)
 Construct an ApplicationLayer. More...
 
virtual ~ApplicationLayer ()
 ApplicationLayer destructor. More...
 
virtual void disconnectTransportLayer ()
 Disconnect the TransportLayer from this ApplicationLayer. More...
 
virtual void onAck (const Packet *aPacket)=0
 Callback when a sent packet is ACKed. More...
 
virtual bool rx (const Packet *aPacket)=0
 Callback for received packets. More...
 

Protected Attributes

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

Detailed Description

Abstract base class for the application layer in the OSI model.

The ApplicationLayer sends packets to and receives packets from the TransportLayer. A mechanism is also provided that allows the ApplicationLayer to be notified when the other device has received and acknowledged a particular packet.

Definition at line 27 of file ApplicationLayer.h.

Constructor & Destructor Documentation

ApplicationLayer::ApplicationLayer ( TransportLayer aTransportLayer)

Construct an ApplicationLayer.

Parameters
aTransportLayerThe transport layer that this application layer communicates with

Definition at line 19 of file ApplicationLayer.cpp.

References TransportLayer::addAppLayer(), and mTransportLayer.

ApplicationLayer::~ApplicationLayer ( )
virtual

ApplicationLayer destructor.

Disconnect any TransportLayer from this ApplicationLayer

Definition at line 29 of file ApplicationLayer.cpp.

References mTransportLayer, and TransportLayer::removeAppLayer().

Member Function Documentation

void ApplicationLayer::disconnectTransportLayer ( )
virtual

Disconnect the TransportLayer from this ApplicationLayer.

Definition at line 40 of file ApplicationLayer.cpp.

References mTransportLayer.

virtual void ApplicationLayer::onAck ( const Packet aPacket)
pure virtual

Callback when a sent packet is ACKed.

Parameters
aPacketThe packet that was ACKed

Implemented in FmiApplicationLayer.

Referenced by GarminTransportLayer::rx().

virtual bool ApplicationLayer::rx ( const Packet aPacket)
pure virtual

Callback for received packets.

Parameters
aPacketThe aPacket that was received
Returns
true if the aPacket was processed, false otherwise

Implemented in FmiApplicationLayer.

Member Data Documentation


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