Loading...
Searching...
No Matches
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
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
34namespace ns3
35{
36
48class SatSuperframeAllocator : public Object
49{
50 public:
55 SatSuperframeAllocator(Ptr<SatSuperframeConf> superFrameConf);
56
61
65 static TypeId GetTypeId(void);
66
72 inline Time GetSuperframeDuration() const
73 {
74 return m_superframeConf->GetDuration();
75 }
76
84 virtual void ReserveMinimumRate(uint32_t minimumRateBytes, bool controlSlotsEnabled) = 0;
85
93 virtual void ReleaseMinimumRate(uint32_t minimumRateBytes, bool controlSlotsEnabled) = 0;
94
100
111 uint32_t maxSizeInBytes,
113 TracedCallback<uint32_t> waveformTrace,
114 TracedCallback<uint32_t, uint32_t> utLoadTrace,
115 TracedCallback<uint32_t, double> loadTrace) = 0;
116
117 protected:
118 // super frame configuration
119 Ptr<SatSuperframeConf> m_superframeConf;
120};
121
122} // namespace ns3
123
124#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.
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.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.