Garmin Fleet Management Controller  2.19.0
LinkLayer.cpp
Go to the documentation of this file.
1 /*********************************************************************
2 *
3 * MODULE NAME:
4 * LinkLayer.cpp
5 *
6 * Copyright 2009 by Garmin Ltd. or its subsidiaries.
7 *---------------------------------------------------------------------
8 * $NoKeywords$
9 *********************************************************************/
10 
11 #include "LinkLayer.h"
12 
13 //----------------------------------------------------------------------
17 //----------------------------------------------------------------------
19  : mPhysicalLayer( NULL )
20  , mTransportLayer( NULL )
21 {
22 
23 }
24 
25 //----------------------------------------------------------------------
27 //----------------------------------------------------------------------
29 {
30  if( mPhysicalLayer )
32 }
33 
34 //----------------------------------------------------------------------
39 //----------------------------------------------------------------------
41  (
42  PhysicalLayer * aPort
43  )
44 {
45  mPhysicalLayer = aPort;
46 }
47 
48 //----------------------------------------------------------------------
53 //----------------------------------------------------------------------
55  (
56  TransportLayer * aTransport
57  )
58 {
59  mTransportLayer = aTransport;
60 }
Abstract base class for the physical layer.
Definition: PhysicalLayer.h:25
LinkLayer()
Construct a LinkLayer.
Definition: LinkLayer.cpp:18
PhysicalLayer * mPhysicalLayer
The serial port that this link layer communicates with.
Definition: LinkLayer.h:74
void setTransportLayer(TransportLayer *aTransport)
Set the transport layer.
Definition: LinkLayer.cpp:55
Abstract base class for transport layer in the OSI model.
virtual void setLinkLayer(LinkLayer *aLinkLayer)
Change the link layer that receives bytes from this SerialPort.
TransportLayer * mTransportLayer
The transport layer that this link layer communicates with.
Definition: LinkLayer.h:77
void setPhysicalLayer(PhysicalLayer *aPort)
Set the physical layer.
Definition: LinkLayer.cpp:41
virtual ~LinkLayer()
Destructor.
Definition: LinkLayer.cpp:28