satellite-geo-llc.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2013 Magister Solutions Ltd
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Bastien TAURAN <bastien.tauran@viveris.fr>
19  */
20 
21 #ifndef SATELLITE_GEO_LLC_H_
22 #define SATELLITE_GEO_LLC_H_
23 
25 #include "satellite-llc.h"
26 #include "satellite-node-info.h"
27 
28 namespace ns3
29 {
30 
37 class SatGeoLlc : public SatLlc
38 {
39  public:
43  static TypeId GetTypeId(void);
44 
48  SatGeoLlc();
49 
55  SatGeoLlc(SatEnums::RegenerationMode_t forwardLinkRegenerationMode,
56  SatEnums::RegenerationMode_t returnLinkRegenerationMode);
57 
63  virtual ~SatGeoLlc();
64 
73  virtual bool Enque(Ptr<Packet> packet, Address dest, uint8_t flowId);
74 
88  virtual Ptr<Packet> NotifyTxOpportunity(uint32_t bytes,
89  Mac48Address utAddr,
90  uint8_t flowId,
91  uint32_t& bytesLeft,
92  uint32_t& nextMinTxO);
93 
101  virtual void ReceiveHigherLayerPdu(Ptr<Packet> packet, Mac48Address source, Mac48Address dest);
102 
109  virtual void GetSchedulingContexts(std::vector<Ptr<SatSchedulingObject>>& output) const;
110 
120  virtual uint32_t GetNBytesInQueue(Mac48Address utAddress) const;
121 
131  virtual uint32_t GetNPacketsInQueue(Mac48Address utAddress) const;
132 
137  typedef Callback<void, Ptr<Packet>, const Address&> ReceiveSatelliteCallback;
138 
145 
146  protected:
150  virtual void DoDispose();
151 
158  virtual void CreateEncap(Ptr<EncapKey> key);
159 
166  virtual void CreateDecap(Ptr<EncapKey> key);
167 
172 };
173 
174 } // namespace ns3
175 
176 #endif /* SATELLITE_GEO_LLC_H_ */
RegenerationMode_t
The regeneration mode used in satellites.
SatGeoLlc holds the GEO implementation of LLC layer.
SatGeoLlc()
Construct a SatGeoLlc, should not be used.
virtual void CreateDecap(Ptr< EncapKey > key)
Virtual method to create a new decapsulator 'on-a-need-basis' dynamically.
virtual void GetSchedulingContexts(std::vector< Ptr< SatSchedulingObject >> &output) const
Create and fill the scheduling objects based on LLC layer information.
virtual bool Enque(Ptr< Packet > packet, Address dest, uint8_t flowId)
Called from higher layer (SatNetDevice) to enque packet to LLC.
virtual Ptr< Packet > NotifyTxOpportunity(uint32_t bytes, Mac48Address utAddr, uint8_t flowId, uint32_t &bytesLeft, uint32_t &nextMinTxO)
Called from lower layer (MAC) to inform a Tx opportunity of certain amount of bytes.
static TypeId GetTypeId(void)
Derived from Object.
virtual void DoDispose()
Dispose of this class instance.
void SetReceiveSatelliteCallback(SatGeoLlc::ReceiveSatelliteCallback cb)
Set Receive callback to forward packet to upper layer on satellite.
Callback< void, Ptr< Packet >, const Address & > ReceiveSatelliteCallback
Receive callback used for sending packet to netdevice layer.
virtual ~SatGeoLlc()
Destroy a SatGeoLlc.
ReceiveSatelliteCallback m_rxSatelliteCallback
The upper layer package receive callback.
virtual void CreateEncap(Ptr< EncapKey > key)
Virtual method to create a new encapsulator 'on-a-need-basis' dynamically.
virtual void ReceiveHigherLayerPdu(Ptr< Packet > packet, Mac48Address source, Mac48Address dest)
Receive HL PDU from encapsulator/decapsulator entity.
SatLlc base class holds the UT specific SatBaseEncapsulator instances, which are responsible of fragm...
virtual uint32_t GetNBytesInQueue() const
Get the total number of (new) bytes in all encapsulators.
virtual uint32_t GetNPacketsInQueue() const
Get the total number of (new) packets in all encapsulators.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.