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 #include <stdint.h>
33 
34 namespace ns3
35 {
36 
48 class SatSuperframeAllocator : public Object
49 {
50  public:
55  SatSuperframeAllocator(Ptr<SatSuperframeConf> superFrameConf);
56 
60  virtual ~SatSuperframeAllocator();
61 
65  static TypeId GetTypeId(void);
66 
71  virtual TypeId GetInstanceTypeId(void) const;
72 
78  inline Time GetSuperframeDuration() const
79  {
80  return m_superframeConf->GetDuration();
81  }
82 
90  virtual void ReserveMinimumRate(uint32_t minimumRateBytes, bool controlSlotsEnabled) = 0;
91 
99  virtual void ReleaseMinimumRate(uint32_t minimumRateBytes, bool controlSlotsEnabled) = 0;
100 
106 
117  uint32_t maxSizeInBytes,
119  TracedCallback<uint32_t> waveformTrace,
120  TracedCallback<uint32_t, uint32_t> utLoadTrace,
121  TracedCallback<uint32_t, double> loadTrace) = 0;
122 
123  protected:
124  // super frame configuration
125  Ptr<SatSuperframeConf> m_superframeConf;
126 };
127 
128 } // namespace ns3
129 
130 #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.