Garmin Fleet Management Controller
2.19.0
|
Abstract base class for transport layer in the OSI model. More...
#include <TransportLayer.h>
Public Member Functions | |
TransportLayer () | |
Constructor. More... | |
virtual | ~TransportLayer () |
Destructor. More... | |
virtual void | addAppLayer (ApplicationLayer *aAppLayer) |
Add an app layer object to the callback list. More... | |
virtual void | removeAppLayer (ApplicationLayer *aAppLayer) |
Remove an app layer object from the callback list. More... | |
virtual void | retry ()=0 |
Retry the last transmit. More... | |
virtual void | rx (Packet *aPacket)=0 |
Callback when a complete packet is assembled by the LinkLayer. More... | |
virtual void | tx (Packet *aPacket, bool aSendNow)=0 |
Transmit a packet. More... | |
Protected Types | |
typedef std::list< ApplicationLayer * > | AppLayerList |
A list of app layers that are connected to this link layer. More... | |
Protected Attributes | |
AppLayerList | mAppLayers |
The application layer objects that send/receive using this GarminTransportLayer. More... | |
Abstract base class for transport layer in the OSI model.
In the OSI model, the transport layer is responsible for the reliable delivery of packets to the partner device. It handles flow control (sending packets to the link layer at the appropriate rate) and error control (handling errors and retransmitting or timing out as appropriate).
Definition at line 28 of file TransportLayer.h.
|
protected |
A list of app layers that are connected to this link layer.
Definition at line 71 of file TransportLayer.h.
TransportLayer::TransportLayer | ( | ) |
Constructor.
Definition at line 16 of file TransportLayer.cpp.
|
virtual |
|
virtual |
Add an app layer object to the callback list.
app | The ApplicationLayer to get packet notifications |
Definition at line 32 of file TransportLayer.cpp.
References mAppLayers, and removeAppLayer().
Referenced by ApplicationLayer::ApplicationLayer(), and ~TransportLayer().
|
virtual |
Remove an app layer object from the callback list.
app | The ApplicationLayer that should no longer get packet notifications |
Definition at line 45 of file TransportLayer.cpp.
References mAppLayers.
Referenced by addAppLayer(), and ApplicationLayer::~ApplicationLayer().
|
pure virtual |
Retry the last transmit.
Implemented in GarminTransportLayer.
Referenced by FmiApplicationLayer::clearError(), and FmiApplicationLayer::sendEnable().
|
pure virtual |
Callback when a complete packet is assembled by the LinkLayer.
aPacket | The packet that was received |
Implemented in GarminTransportLayer.
Referenced by GarminLinkLayer::getPacketFromFifo().
|
pure virtual |
Transmit a packet.
aPacket | The packet to transmit |
aSendNow | If true, the packet should be sent immediately (not FIFO) |
Implemented in GarminTransportLayer.
Referenced by GarminLinkLayer::getPacketFromFifo(), FmiApplicationLayer::sendEnablePvtCommand(), FmiApplicationLayer::sendFreeformFmiPacket(), FmiApplicationLayer::txCommand(), and FmiApplicationLayer::txFmi().
|
protected |
The application layer objects that send/receive using this GarminTransportLayer.
Definition at line 75 of file TransportLayer.h.
Referenced by addAppLayer(), removeAppLayer(), GarminTransportLayer::rx(), and GarminTransportLayer::~GarminTransportLayer().