Loading...
Searching...
No Matches
satellite-bbframe-conf.cc
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
22
23#include "satellite-utils.h"
24
25#include "ns3/boolean.h"
26#include "ns3/double.h"
27#include "ns3/enum.h"
28#include "ns3/log.h"
29#include "ns3/string.h"
30#include "ns3/uinteger.h"
31
32#include <algorithm>
33#include <iostream>
34#include <limits>
35#include <sstream>
36#include <string>
37#include <utility>
38#include <vector>
39
40NS_LOG_COMPONENT_DEFINE("SatBbFrameConf");
41
42namespace ns3
43{
44
50const uint32_t payloadConf[7][3] = {
51 {2, 360, 90},
52 {3, 240, 60},
53 {4, 180, 45},
54 {5, 144, 36},
55 {6, 120, 30},
56 {7, 102, 25},
57 {8, 90, 22},
58};
59
61 : m_modcod(SatEnums::SAT_MODCOD_QPSK_1_TO_2),
62 m_frameType(SatEnums::NORMAL_FRAME),
63 m_frameDuration(Seconds(0.0)),
66{
67 NS_LOG_FUNCTION(this);
68 NS_ASSERT(false);
69
73}
74
77 Time frameDur,
78 uint32_t payloadBits)
79 : m_modcod(modcod),
80 m_frameType(fType),
81 m_frameDuration(frameDur),
82 m_payloadBits(payloadBits),
84{
85}
86
89{
90 NS_LOG_FUNCTION(this);
91 return m_modcod;
92}
93
96{
97 NS_LOG_FUNCTION(this);
98 return m_frameType;
99}
100
101uint32_t
103{
104 NS_LOG_FUNCTION(this);
105 return m_payloadBits;
106}
107
108Time
110{
111 NS_LOG_FUNCTION(this);
112 return m_frameDuration;
113}
114
115double
117{
118 NS_LOG_FUNCTION(this);
119 return m_cnoRequirement;
120}
121
122void
124{
125 NS_LOG_FUNCTION(this << cnoRequirement);
126 m_cnoRequirement = cnoRequirement;
127}
128
129void
131{
132 NS_LOG_FUNCTION(this);
133
134 std::cout << "Modcod, " << SatEnums::GetModcodTypeName(m_modcod) << ", frameType, "
135 << m_frameType << ", payloadBits, " << m_payloadBits << ", frameDuration, "
136 << m_frameDuration << ", cnoRequirement, " << m_cnoRequirement << std::endl;
137}
138
139NS_OBJECT_ENSURE_REGISTERED(SatBbFrameConf);
140
142 : m_symbolRate(100000000.0),
151 m_targetBler(0.00001),
152 m_acmEnabled(false),
153 m_defaultModCodDummyFramesS2X(SatEnums::SAT_NONVALID_MODCOD),
155 m_defaultModCod(SatEnums::SAT_NONVALID_MODCOD),
156 m_defaultModCodStr("QPSK_1_TO_2"),
159 m_waveforms(),
160 m_bbFrameUsageMode(SatEnums::NORMAL_FRAMES),
161 m_mostRobustShortFrameModcod(SatEnums::SAT_NONVALID_MODCOD),
162 m_mostRobustNormalFrameModcod(SatEnums::SAT_NONVALID_MODCOD),
163 m_dvbVersion(SatEnums::DVB_S2),
164 m_bbFrameS2XPilots(true),
166{
167 NS_LOG_FUNCTION(this);
168 NS_FATAL_ERROR("Default constructor not supported!!!");
169}
170
172 : m_symbolRate(symbolRate),
181 m_targetBler(0.00001),
182 m_acmEnabled(false),
183 m_defaultModCodDummyFramesS2X(SatEnums::SAT_NONVALID_MODCOD),
185 m_defaultModCod(SatEnums::SAT_NONVALID_MODCOD),
186 m_defaultModCodStr("QPSK_1_TO_2"),
189 m_waveforms(),
190 m_bbFrameUsageMode(SatEnums::NORMAL_FRAMES),
191 m_mostRobustShortFrameModcod(SatEnums::SAT_NONVALID_MODCOD),
192 m_mostRobustNormalFrameModcod(SatEnums::SAT_NONVALID_MODCOD),
193 m_dvbVersion(dvbVersion),
194 m_bbFrameS2XPilots(true),
196{
197 NS_LOG_FUNCTION(this << symbolRate << dvbVersion);
198}
199
200void
202{
203 NS_LOG_FUNCTION(this);
204
205 Object::NotifyConstructionCompleted();
206
207 // Initialize the payloads
208 for (uint32_t i = 0; i < 7; ++i)
209 {
210 m_normalFramePayloadInSlots.insert(std::make_pair(payloadConf[i][0], payloadConf[i][1]));
211 m_shortFramePayloadInSlots.insert(std::make_pair(payloadConf[i][0], payloadConf[i][2]));
212 }
213
214 // Load custom MC list if specified or all MC if nothing in m_modCodsUsedStr is empty
215 m_modCodsUsed.clear();
217
218 switch (m_dvbVersion)
219 {
220 case SatEnums::DVB_S2:
222 break;
225 {
226 NS_FATAL_ERROR("Cannot use NORMAL_AND_SHORT_FRAMES with DVB-S2X ModCods");
227 }
228
230 "SAT_MODCOD_S2X_" + m_defaultModCodStr + "_" +
231 (m_bbFrameUsageMode == SatEnums::NORMAL_FRAMES ? "NORMAL" : "SHORT") + "_" +
232 (m_bbFrameS2XPilots ? "PILOTS" : "NOPILOTS"));
233
236 "_SHORT_" + (m_bbFrameS2XPilots ? "PILOTS" : "NOPILOTS"));
237
238 break;
239 default:
240 NS_FATAL_ERROR("Unknown DVB version used");
241 }
242
243 if (std::find(m_modCodsUsed.begin(), m_modCodsUsed.end(), m_defaultModCod) ==
244 m_modCodsUsed.end())
245 {
246 NS_FATAL_ERROR("Default ModCod (" + SatEnums::GetModcodTypeName(m_defaultModCod) +
247 ") is not in the list of used ModCods.");
248 }
249
250 // Available frame types
251 std::vector<SatEnums::SatBbFrameType_t> frameTypes;
253
254 uint32_t wfCount(1);
255 for (std::vector<SatEnums::SatModcod_t>::const_iterator mit = m_modCodsUsed.begin();
256 mit != m_modCodsUsed.end();
257 ++mit)
258 {
259 switch (m_dvbVersion)
260 {
261 case SatEnums::DVB_S2:
262 for (std::vector<SatEnums::SatBbFrameType_t>::const_iterator fit = frameTypes.begin();
263 fit != frameTypes.end();
264 ++fit)
265 {
266 // Calculate the payload
267 uint32_t pl = CalculateBbFramePayloadBits(*mit, *fit);
268
269 // Calculate the frame length
270 Time len = CalculateBbFrameDuration(*mit, *fit);
271
272 Ptr<SatDvbS2Waveform> wf = Create<SatDvbS2Waveform>(*mit, *fit, len, pl);
273 m_waveforms.insert(std::make_pair(std::make_pair(*mit, *fit), wf));
274 wfCount++;
275 }
276 break;
279 uint32_t pl = CalculateBbFramePayloadBits(*mit, fit);
280
281 // Calculate the frame length
282 Time len = CalculateBbFrameDuration(*mit, fit);
283
284 Ptr<SatDvbS2Waveform> wf = Create<SatDvbS2Waveform>(*mit, fit, len, pl);
285 m_waveforms.insert(std::make_pair(std::make_pair(*mit, fit), wf));
286 wfCount++;
287 break;
288 }
289 }
290
291 /* Add waveform with Default Dummy Frames ModCod when using DVB-S2X.
292 * Added if not already in ModCods list.
293 */
295 std::find(m_modCodsUsed.begin(), m_modCodsUsed.end(), m_defaultModCodDummyFramesS2X) ==
296 m_modCodsUsed.end())
297 {
300 uint32_t pl = CalculateBbFramePayloadBits(mit, fit);
301
302 // Calculate the frame length
303 Time len = CalculateBbFrameDuration(mit, fit);
304
305 Ptr<SatDvbS2Waveform> wf = Create<SatDvbS2Waveform>(mit, fit, len, pl);
306 m_waveforms.insert(std::make_pair(std::make_pair(mit, fit), wf));
307 wfCount++;
308 }
309
310 uint32_t payloadBitsForShortFrame = std::numeric_limits<uint32_t>::max();
311 uint32_t payloadBitsForNormalFrame = std::numeric_limits<uint32_t>::max();
312
313 // find the waveform with the more robust MODCOD than previous one
314 for (waveformMap_t::const_reverse_iterator rit = m_waveforms.rbegin();
315 rit != m_waveforms.rend();
316 ++rit)
317 {
318 if (rit->second->GetBbFrameType() == SatEnums::SHORT_FRAME)
319 {
320 // The first waveform over the threshold
321 if (rit->second->GetPayloadInBits() < payloadBitsForShortFrame)
322 {
323 payloadBitsForShortFrame = rit->second->GetPayloadInBits();
324 m_mostRobustShortFrameModcod = rit->second->GetModcod();
325 }
326 }
327
328 if (rit->second->GetBbFrameType() == SatEnums::NORMAL_FRAME)
329 {
330 // The first waveform over the threshold
331 if (rit->second->GetPayloadInBits() < payloadBitsForNormalFrame)
332 {
333 payloadBitsForNormalFrame = rit->second->GetPayloadInBits();
334 m_mostRobustNormalFrameModcod = rit->second->GetModcod();
335 }
336 }
337 }
338
342 {
343 NS_FATAL_ERROR(
344 "The most robust MODCOD not found for short frames, BB frame configuration error???");
345 }
349 {
350 NS_FATAL_ERROR(
351 "The most robust MODCOD not found for normal frames, BB frame configuration error???");
352 }
353
356 {
357 // currently is assumed that the most robust MODCODs are same for both short and normal
358 // frames
359 NS_FATAL_ERROR("The most robust MODCODs are different for short and normal frames!!!");
360 }
361}
362
363TypeId
365{
366 static TypeId tid =
367 TypeId("ns3::SatBbFrameConf")
368 .SetParent<Object>()
369 .AddAttribute("SymbolsPerSlot",
370 "Number of symbols per slot",
371 UintegerValue(90),
372 MakeUintegerAccessor(&SatBbFrameConf::m_symbolsPerSlot),
373 MakeUintegerChecker<uint32_t>())
374 .AddAttribute("PilotBlockInSymbols",
375 "Pilot block size in symbols",
376 UintegerValue(36),
377 MakeUintegerAccessor(&SatBbFrameConf::m_pilotBlockInSymbols),
378 MakeUintegerChecker<uint32_t>())
379 .AddAttribute("PilotBlockIntervalInSlots",
380 "Pilot block interval in slots",
381 UintegerValue(16),
382 MakeUintegerAccessor(&SatBbFrameConf::m_pilotBlockIntervalInSlots),
383 MakeUintegerChecker<uint32_t>())
384 .AddAttribute("PlHeaderInSlots",
385 "PL header size in slots",
386 UintegerValue(1),
387 MakeUintegerAccessor(&SatBbFrameConf::m_plHeaderInSlots),
388 MakeUintegerChecker<uint32_t>())
389 .AddAttribute("DummyFrameInSlots",
390 "Dummy frame size in slots",
391 UintegerValue(36),
392 MakeUintegerAccessor(&SatBbFrameConf::m_dummyFrameInSlots),
393 MakeUintegerChecker<uint32_t>())
394 .AddAttribute("TargetBLER",
395 "Block error rate target",
396 DoubleValue(0.00001),
397 MakeDoubleAccessor(&SatBbFrameConf::m_targetBler),
398 MakeDoubleChecker<double>())
399 .AddAttribute("AcmEnabled",
400 "Enable ACM",
401 BooleanValue(false),
402 MakeBooleanAccessor(&SatBbFrameConf::m_acmEnabled),
403 MakeBooleanChecker())
404 .AddAttribute("DefaultModCod",
405 "Default MODCOD",
406 StringValue("QPSK_1_TO_2"),
407 MakeStringAccessor(&SatBbFrameConf::m_defaultModCodStr),
408 MakeStringChecker())
409 .AddAttribute("DefaultModCodDummyFramesS2X",
410 "Default MODCOD for DVB-S2X Dummy Frames. In DVB-S2, Dummy Frames use "
411 "m_defaultModCod.",
412 StringValue("QPSK_1_TO_4"),
414 MakeStringChecker())
415 .AddAttribute("BbFrameHeaderInBytes",
416 "BB Frame header size in bytes",
417 UintegerValue(10), // ETSI EN 302 307 V1.3.1 specified 80 bits
418 MakeUintegerAccessor(&SatBbFrameConf::m_bbFrameHeaderSizeInBytes),
419 MakeUintegerChecker<uint32_t>())
420 .AddAttribute("BbFrameHighOccupancyThreshold",
421 "BB Frame high occupancy threshold [0-1]",
422 DoubleValue(0.9),
424 MakeDoubleChecker<double>(0.0, 1.0))
425 .AddAttribute("BbFrameLowOccupancyThreshold",
426 "BB Frame low occupancy threshold [0-1]",
427 DoubleValue(0.5),
429 MakeDoubleChecker<double>(0.0, 1.0))
430 .AddAttribute(
431 "BBFrameUsageMode",
432 "Mode for selecting used BB Frames.",
433 EnumValue(SatEnums::NORMAL_FRAMES),
434 MakeEnumAccessor<SatEnums::BbFrameUsageMode_t>(&SatBbFrameConf::m_bbFrameUsageMode),
435 MakeEnumChecker(SatEnums::SHORT_FRAMES,
436 "ShortFrames",
438 "NormalFrames",
440 "ShortAndNormalFrames"))
441 .AddAttribute("BBFramePilotsS2X",
442 "Use Pilots in DVB-S2X BB Frames.",
443 BooleanValue(true),
444 MakeBooleanAccessor(&SatBbFrameConf::m_bbFrameS2XPilots),
445 MakeBooleanChecker())
446 .AddAttribute("ModCodsUsed",
447 "List of DVB-S2X ModCods used. If nothing specified, all available "
448 "ModCods are used",
449 StringValue(""),
450 MakeStringAccessor(&SatBbFrameConf::m_modCodsUsedStr),
451 MakeStringChecker())
452 .AddConstructor<SatBbFrameConf>();
453 return tid;
454}
455
457{
458 NS_LOG_FUNCTION(this);
459}
460
461void
462SatBbFrameConf::InitializeCNoRequirements(Ptr<SatLinkResultsFwd> linkResults)
463{
464 NS_LOG_FUNCTION(this);
465
466 for (waveformMap_t::iterator it = m_waveforms.begin(); it != m_waveforms.end(); ++it)
467 {
473 double esnoRequirementDb =
474 linkResults->GetEsNoDb(it->second->GetModcod(), it->first.second, m_targetBler);
475
481 it->second->SetCNoRequirement(SatUtils::DbToLinear(esnoRequirementDb) * m_symbolRate);
482 }
483}
484
485void
487{
488 NS_LOG_FUNCTION(this);
489
490 for (waveformMap_t::const_iterator it = m_waveforms.begin(); it != m_waveforms.end(); ++it)
491 {
492 it->second->Dump();
493 }
494}
495
498{
499 NS_LOG_FUNCTION(this);
500 return m_dvbVersion;
501}
502
503std::vector<SatEnums::SatModcod_t>
505{
506 NS_LOG_FUNCTION(this);
507 return m_modCodsUsed;
508}
509
510uint32_t
512 SatEnums::SatBbFrameType_t frameType) const
513{
514 NS_LOG_FUNCTION(this << modcod << frameType);
515
516 uint32_t dataSlots(0);
517 uint32_t modulatedBits = SatUtils::GetModulatedBits(modcod);
518
519 switch (frameType)
520 {
522 dataSlots = m_shortFramePayloadInSlots.at(modulatedBits);
523 break;
524 }
526 dataSlots = m_normalFramePayloadInSlots.at(modulatedBits);
527 break;
528 }
529 default: {
530 NS_FATAL_ERROR("Unsupported enum SatBbFrameType_t!");
531 break;
532 }
533 }
534
535 return (uint32_t)(dataSlots * m_symbolsPerSlot * modulatedBits *
537}
538
539Time
541 SatEnums::SatBbFrameType_t frameType) const
542{
543 NS_LOG_FUNCTION(this << modcod << frameType);
544
545 uint32_t dataSlots(0);
546 uint32_t modulatedBits = SatUtils::GetModulatedBits(modcod);
547
548 switch (frameType)
549 {
551 dataSlots = m_shortFramePayloadInSlots.at(modulatedBits);
552 break;
553 }
555 dataSlots = m_normalFramePayloadInSlots.at(modulatedBits);
556 break;
557 }
558 default: {
559 NS_FATAL_ERROR("Unsupported enum SatBbFrameType_t!");
560 break;
561 }
562 }
563
564 uint32_t slots = dataSlots + m_plHeaderInSlots;
565 uint32_t dataSymbols = slots * m_symbolsPerSlot;
566 uint32_t pilotSlots = (uint32_t)(floor((double)slots / m_pilotBlockIntervalInSlots));
567 uint32_t pilotSymbols = pilotSlots * m_pilotBlockInSymbols;
568
569 uint32_t totalSymbols = dataSymbols + pilotSymbols;
570 double frameLength = totalSymbols / m_symbolRate;
571
572 return Seconds(frameLength);
573}
574
575void
577{
578 NS_LOG_FUNCTION(this);
579 m_modCodsUsed.clear();
580
581 if (m_modCodsUsedStr.size() == 0)
582 {
583 switch (m_dvbVersion)
584 {
585 case SatEnums::DVB_S2:
587 return;
592 return;
593 default:
594 NS_FATAL_ERROR("Incorrect DVB version");
595 }
596 }
597
598 std::stringstream strm(m_modCodsUsedStr);
599 std::string name;
600 std::string prefix;
601 std::string suffix;
602
603 switch (m_dvbVersion)
604 {
605 case SatEnums::DVB_S2:
606 prefix = "SAT_MODCOD_";
607 suffix = "";
608 break;
610 prefix = "SAT_MODCOD_S2X_";
611 suffix = std::string("_") +
612 (m_bbFrameUsageMode == SatEnums::NORMAL_FRAMES ? "NORMAL" : "SHORT") + "_" +
613 (m_bbFrameS2XPilots ? "PILOTS" : "NOPILOTS");
614 break;
615 default:
616 NS_FATAL_ERROR("Incorrect DVB version");
617 }
618
619 while (getline(strm, name, ' '))
620 {
621 SatEnums::SatModcod_t mc = SatEnums::GetModcodFromName(prefix + name + suffix);
622 m_modCodsUsed.push_back(mc);
623 }
624 std::sort(m_modCodsUsed.begin(), m_modCodsUsed.end());
625}
626
627uint32_t
629 SatEnums::SatBbFrameType_t frameType) const
630{
631 NS_LOG_FUNCTION(this << modcod << frameType);
632 return m_waveforms.at(std::make_pair(modcod, frameType))->GetPayloadInBits();
633}
634
635double
637{
638 NS_LOG_FUNCTION(this);
639 return m_symbolRate;
640}
641
642Time
644 SatEnums::SatBbFrameType_t frameType) const
645{
646 NS_LOG_FUNCTION(this << modcod << frameType);
647 return m_waveforms.at(std::make_pair(modcod, frameType))->GetFrameDuration();
648}
649
650Time
652{
653 NS_LOG_FUNCTION(this);
655}
656
659{
660 NS_LOG_FUNCTION(this << frameType);
661
662 // If ACM is disabled, return the default MODCOD
663 if (!m_acmEnabled)
664 {
665 return m_defaultModCod;
666 }
667
668 // Return the waveform with best spectral efficiency
669 for (waveformMap_t::const_reverse_iterator rit = m_waveforms.rbegin();
670 rit != m_waveforms.rend();
671 ++rit)
672 {
673 if (rit->second->GetBbFrameType() == frameType)
674 {
675 double cnoReq = rit->second->GetCNoRequirement();
676 // The first waveform over the threshold
677 if (cnoReq <= cNo)
678 {
679 return rit->second->GetModcod();
680 }
681 }
682 }
683 return m_defaultModCod;
684}
685
688{
689 NS_LOG_FUNCTION(this << frameType);
690
692
693 if (frameType == SatEnums::SHORT_FRAME)
694 {
695 mostRobustModcod = m_mostRobustShortFrameModcod;
696 }
697 else if (frameType == SatEnums::NORMAL_FRAME)
698 {
699 mostRobustModcod = m_mostRobustNormalFrameModcod;
700 }
701 else
702 {
703 NS_FATAL_ERROR("Not supported frame type!!!");
704 }
705
706 return mostRobustModcod;
707}
708
711{
712 NS_LOG_FUNCTION(this);
713 return m_defaultModCod;
714}
715
718{
719 NS_LOG_FUNCTION(this);
721}
722
723} // namespace ns3
This class implements the BB Frame configurations for DVB-S2.
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.
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.
std::map< uint32_t, uint32_t > m_shortFramePayloadInSlots
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::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.
SatEnums class is for simplifying the use of enumerators in the satellite module.
static SatModcod_t GetModcodFromName(const std::string name)
static void GetAvailableBbFrameTypes(std::vector< SatBbFrameType_t > &frameTypes)
SatBbFrameType_t
BB frame type used in DVB-S2 FWD link.
SatModcod_t
Modulation scheme and coding rate for DVB-S2.
static void GetAvailableModcodsFwdLinkS2X(std::vector< SatModcod_t > &modcods, SatEnums::BbFrameUsageMode_t type, bool pilots)
static std::string GetModcodTypeName(SatModcod_t modcod)
@ SHORT_AND_NORMAL_FRAMES
SHORT_AND_NORMAL_FRAMES.
@ SHORT_FRAMES
SHORT_FRAMES.
@ NORMAL_FRAMES
NORMAL_FRAMES.
DvbVersion_t
The scheduling algorithm used to fill the BBFrames.
static void GetAvailableModcodsFwdLink(std::vector< SatModcod_t > &modcods)
static SatEnums::SatBbFrameType_t GetFrameTypeS2X(SatEnums::SatModcod_t modcod)
static T DbToLinear(T db)
Converts decibels to linear.
static uint32_t GetModulatedBits(SatEnums::SatModcod_t modcod)
Get the modulated bits of a certain MODCOD.
static double GetCodingRate(SatEnums::SatModcod_t modcod)
Gets the coding rate of a certain MODCOD.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.
const uint32_t payloadConf[7][3]
1st col = modulated bits 2nd col = payload slots per normal frame 3rnd col = payload slots per short ...