satellite-superframe-allocator.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2019 CNES
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: Joaquin Muguerza <jmuguerza@viveris.fr>
19  */
20 
21 #ifndef SAT_SUPERFRAME_ALLOCATOR_H
22 #define SAT_SUPERFRAME_ALLOCATOR_H
23 
26 #include "satellite-frame-conf.h"
27 
28 #include <ns3/address.h>
29 #include <ns3/simple-ref-count.h>
30 #include <ns3/traced-callback.h>
31 
32 namespace ns3
33 {
34 
46 class SatSuperframeAllocator : public Object
47 {
48  public:
53  SatSuperframeAllocator(Ptr<SatSuperframeConf> superFrameConf);
54 
58  virtual ~SatSuperframeAllocator();
59 
63  static TypeId GetTypeId(void);
64 
69  virtual TypeId GetInstanceTypeId(void) const;
70 
76  inline Time GetSuperframeDuration() const
77  {
78  return m_superframeConf->GetDuration();
79  }
80 
88  virtual void ReserveMinimumRate(uint32_t minimumRateBytes, bool controlSlotsEnabled) = 0;
89 
97  virtual void ReleaseMinimumRate(uint32_t minimumRateBytes, bool controlSlotsEnabled) = 0;
98 
104 
115  uint32_t maxSizeInBytes,
117  TracedCallback<uint32_t> waveformTrace,
118  TracedCallback<uint32_t, uint32_t> utLoadTrace,
119  TracedCallback<uint32_t, double> loadTrace) = 0;
120 
121  protected:
122  // super frame configuration
123  Ptr<SatSuperframeConf> m_superframeConf;
124 };
125 
126 } // namespace ns3
127 
128 #endif /* SAT_SUPERFRAME_ALLOCATOR_H */
std::vector< SatFrameAllocReq * > SatFrameAllocContainer_t
Container to store SatFrameAllocReq item pointers.
std::vector< Ptr< SatTbtpMessage > > TbtpMsgContainer_t
Container to store generated TBTP messages.
std::map< Address, UtAllocInfoItem_t > UtAllocInfoContainer_t
Map container to store UT allocation information.
helper class for Satellite Beam Scheduler.
virtual ~SatSuperframeAllocator()
Destruct SatSuperframeAllocator.
Time GetSuperframeDuration() const
Get super frame duration.
virtual void ReserveMinimumRate(uint32_t minimumRateBytes, bool controlSlotsEnabled)=0
Reserve minimum rate from the allocator.
virtual void PreAllocateSymbols(SatFrameAllocator::SatFrameAllocContainer_t &allocReqs)=0
Preallocate symbols for given to UTs in superframe.
static TypeId GetTypeId(void)
derived from object
virtual void GenerateTimeSlots(SatFrameAllocator::TbtpMsgContainer_t &tbtpContainer, uint32_t maxSizeInBytes, SatFrameAllocator::UtAllocInfoContainer_t &utAllocContainer, TracedCallback< uint32_t > waveformTrace, TracedCallback< uint32_t, uint32_t > utLoadTrace, TracedCallback< uint32_t, double > loadTrace)=0
Generate time slots in TBTP(s) for the UT/RC.
virtual void ReleaseMinimumRate(uint32_t minimumRateBytes, bool controlSlotsEnabled)=0
Release minimum rate from the allocator.
SatSuperframeAllocator(Ptr< SatSuperframeConf > superFrameConf)
Construct SatSuperframeAllocator.
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.