Loading...
Searching...
No Matches
satellite-bbframe-conf.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: Jani Puttonen <jani.puttonen@magister.fi>
19 */
20
21#ifndef SATELLITE_BBFRAME_CONF_H
22#define SATELLITE_BBFRAME_CONF_H
23
24#include "satellite-enums.h"
26
27#include "ns3/nstime.h"
28#include "ns3/object.h"
29#include "ns3/ptr.h"
30#include "ns3/simple-ref-count.h"
31
32#include <map>
33#include <stdint.h>
34#include <string>
35#include <utility>
36#include <vector>
37
38namespace ns3
39{
40
42
50
51class SatDvbS2Waveform : public SimpleRefCount<SatDvbS2Waveform>
52{
53 public:
58
68 Time frameLen,
69 uint32_t payloadBits);
70
76
82
87 uint32_t GetPayloadInBits() const;
88
93 Time GetFrameDuration() const;
94
100 void SetCNoRequirement(double cnoRequirement);
101
106 double GetCNoRequirement() const;
107
111 void Dump() const;
112
113 private:
118
123
128
133
139};
140
148class SatBbFrameConf : public Object
149{
150 public:
155
160 SatBbFrameConf(double symbolRate, SatEnums::DvbVersion_t dvbVersion);
161
170 virtual void NotifyConstructionCompleted() override;
171
175 virtual ~SatBbFrameConf();
176
181 static TypeId GetTypeId(void);
182
186 typedef std::map<std::pair<SatEnums::SatModcod_t, SatEnums::SatBbFrameType_t>,
187 Ptr<SatDvbS2Waveform>>
189
195 inline uint32_t GetBbFrameHeaderSizeInBytes() const
196 {
198 }
199
206 {
208 }
209
216 {
218 }
219
229
235 void InitializeCNoRequirements(Ptr<SatLinkResultsFwd> linkResults);
236
242 Time GetDummyBbFrameDuration() const;
243
251 SatEnums::SatBbFrameType_t frameType) const;
252
258 double GetSymbolRate();
259
266 SatEnums::SatBbFrameType_t frameType) const;
267
275
281
287
294
298 void DumpWaveforms() const;
299
306
312 std::vector<SatEnums::SatModcod_t> GetModCodsUsed();
313
314 private:
322 SatEnums::SatBbFrameType_t frameType) const;
323
332 SatEnums::SatBbFrameType_t frameType) const;
333
337 void GetModCodsList();
338
343
348
353
358
363
368
373
378
383
389
395
400
409
423
430
431 std::map<uint32_t, uint32_t> m_shortFramePayloadInSlots;
432 std::map<uint32_t, uint32_t> m_normalFramePayloadInSlots;
433
438
443
448
453
458
463
467 std::vector<SatEnums::SatModcod_t> m_modCodsUsed;
468
472 std::string m_modCodsUsedStr;
473};
474
475} // namespace ns3
476
477#endif // SATELLITE_BBFRAME_CONF_H
SatEnums::BbFrameUsageMode_t m_bbFrameUsageMode
BBFrame usage mode.
double GetSymbolRate()
Symbol rate in baud.
uint32_t m_pilotBlockInSymbols
The size of the pilot block in symbols.
double GetBbFrameHighOccupancyThreshold() const
Get configured BB frame high occupancy threshold.
uint32_t GetBbFrameHeaderSizeInBytes() const
Get BB frame header size in bytes.
void GetModCodsList()
Get the list of ModCods from their string representation.
void DumpWaveforms() const
Dump waveform details for debugging purposes.
SatBbFrameConf()
Default constructor.
uint32_t m_symbolsPerSlot
The size of the (data) slot in symbols.
virtual void NotifyConstructionCompleted() override
Notifier called once the ObjectBase is fully constructed.
Time CalculateBbFrameDuration(SatEnums::SatModcod_t modcod, SatEnums::SatBbFrameType_t frameType) const
Calculate the BBFrame duration in Time.
double m_targetBler
Block error rate target for the waveforms.
void InitializeCNoRequirements(Ptr< SatLinkResultsFwd > linkResults)
Initialize the C/No requirements for a given BLER target.
virtual ~SatBbFrameConf()
Destructor for SatBbFrameConf.
double m_bbFrameLowOccupancyThreshold
The BB frame low occupancy threshold in range 0 - 1.
double m_bbFrameHighOccupancyThreshold
The BB frame high occupancy threshold in range 0 - 1.
std::map< uint32_t, uint32_t > m_normalFramePayloadInSlots
SatEnums::SatModcod_t m_defaultModCodDummyFramesS2X
Default MODCOD for DVB-S2X dummy Frames.
bool m_acmEnabled
Flag to indicate whether ACM is enabled or disabled.
static TypeId GetTypeId(void)
Get the type ID.
std::string m_defaultModCodStr
The string representation of default ModCod.
Time GetBbFrameDuration(SatEnums::SatModcod_t modcod, SatEnums::SatBbFrameType_t frameType) const
Get the BB frame frame duration.
std::vector< SatEnums::SatModcod_t > m_modCodsUsed
List of ModCods used.
bool m_bbFrameS2XPilots
Indicates if using pilots in BBFrames when DVB-S2X is chosen.
double GetBbFrameLowOccupancyThreshold() const
Get configured BB frame low occupancy threshold.
std::map< uint32_t, uint32_t > m_shortFramePayloadInSlots
std::map< std::pair< SatEnums::SatModcod_t, SatEnums::SatBbFrameType_t >, Ptr< SatDvbS2Waveform > > waveformMap_t
Define type waveformMap_t.
uint32_t m_bbFrameHeaderSizeInBytes
The BB frame header size in bytes.
uint32_t m_plHeaderInSlots
The PL header size in slots.
SatEnums::SatModcod_t GetMostRobustModcod(SatEnums::SatBbFrameType_t frameType) const
Get the most robust MODCOD with a given BB frame type.
SatEnums::SatModcod_t m_mostRobustShortFrameModcod
The most robust MODCOD for short frame.
std::string m_defaultModCodDummyFramesS2XStr
String representation of default ModCod for DVB-S2X Dummy Frames.
SatEnums::DvbVersion_t GetDvbVersion()
Indicates if using DVB-S2 or DVB-S2X.
SatEnums::DvbVersion_t m_dvbVersion
Indicates if using DVB-S2 or DVB-S2X.
uint32_t m_pilotBlockIntervalInSlots
Interval of pilot block in slots.
uint32_t GetBbFramePayloadBits(SatEnums::SatModcod_t modcod, SatEnums::SatBbFrameType_t frameType) const
Get the BB frame payload in bits.
Time GetDummyBbFrameDuration() const
Get the dummy frame duration in Time.
std::vector< SatEnums::SatModcod_t > GetModCodsUsed()
Get the list of ModCods used.
SatEnums::SatModcod_t GetDefaultModCod() const
Get the default MODCOD.
uint32_t CalculateBbFramePayloadBits(SatEnums::SatModcod_t modcod, SatEnums::SatBbFrameType_t frameType) const
Calculate the BBrame higher layer payload in bits.
SatEnums::BbFrameUsageMode_t GetBbFrameUsageMode() const
Get configured BB frame usage mode.
SatEnums::SatModcod_t GetBestModcod(double cNo, SatEnums::SatBbFrameType_t frameType) const
Get the best MODCOD with a given BB frame type.
std::string m_modCodsUsedStr
String containing all DVB-S2X ModCods used.
waveformMap_t m_waveforms
Available "waveforms", i.e.
SatEnums::SatModcod_t m_defaultModCod
Default MODCOD is used.
SatEnums::SatModcod_t GetDefaultModCodDummyFramesS2X() const
Get the default MODCOD for short DVB-S2X frames.
SatEnums::SatModcod_t m_mostRobustNormalFrameModcod
The most robust MODCOD for long frame.
double m_symbolRate
Symbol rate in baud.
uint32_t m_dummyFrameInSlots
Dummy BBFrame length in slots.
SatDvbS2Waveform()
Default constructor for SatDvbS2Waveform.
uint32_t GetPayloadInBits() const
Get payload of this waveform in bits.
double m_cnoRequirement
C/No requirement calculated with a certain BLER target from the link results.
void SetCNoRequirement(double cnoRequirement)
Set the C/No requirement of the waveform in linear domain.
Time GetFrameDuration() const
Get the frame duration in Time.
SatEnums::SatModcod_t m_modcod
MODCOD.
uint32_t m_payloadBits
Payload in bits.
void Dump() const
Dump the contents of the waveform.
SatEnums::SatBbFrameType_t m_frameType
Frame type: short, normal.
double GetCNoRequirement() const
Get C/No requirement corresponding a given BLER target.
Time m_frameDuration
Frame duration in Time.
SatEnums::SatModcod_t GetModcod() const
Get MODCOD of this waveform.
SatEnums::SatBbFrameType_t GetBbFrameType() const
Get BB frame type.
SatBbFrameType_t
BB frame type used in DVB-S2 FWD link.
SatModcod_t
Modulation scheme and coding rate for DVB-S2.
BbFrameUsageMode_t
BBFrame usage modes.
DvbVersion_t
The scheduling algorithm used to fill the BBFrames.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.