Loading...
Searching...
No Matches
satellite-superframe-sequence.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: Sami Rantanen <sami.rantanen@magister.fi>
19 */
20
21#ifndef SATELLITE_SUPERFRAME_SEQUENCE_H
22#define SATELLITE_SUPERFRAME_SEQUENCE_H
23
27
28#include "ns3/object.h"
29#include "ns3/ptr.h"
30
31#include <map>
32#include <stdint.h>
33#include <vector>
34
35namespace ns3
36{
37
44class SatSuperframeSeq : public Object
45{
46 public:
50 typedef std::vector<Ptr<SatSuperframeConf>> SatSuperframeConfList;
51
56 static TypeId GetTypeId(void);
57
62
67
72 void AddWaveformConf(Ptr<SatWaveformConf> wfConf);
73
78 Ptr<SatWaveformConf> GetWaveformConf() const;
79
85 void AddSuperframe(Ptr<SatSuperframeConf> conf);
86
93 Ptr<SatSuperframeConf> GetSuperframeConf(uint8_t seqId) const;
94
104 uint32_t GetCarrierId(uint8_t superframeId, uint8_t frameId, uint16_t frameCarrierId) const;
105
111 uint32_t GetCarrierCount() const;
112
120 uint32_t GetCarrierCount(uint8_t seqId) const;
121
129 Time GetDuration(uint8_t seqId) const;
130
138 double GetCarrierFrequencyHz(uint32_t carrierId) const;
139
148 double GetCarrierBandwidthHz(uint32_t carrierId,
149 SatEnums::CarrierBandwidthType_t bandwidthType) const;
150
155 inline Time GetTargetDuration() const
156 {
157 return m_targetDuration;
158 }
159
160 private:
161 typedef std::map<uint32_t, Ptr<SatControlMsgContainer>> TbtpMap_t;
162
170
174 Ptr<SatWaveformConf> m_wfConf;
175
180};
181
182} // namespace ns3
183
184#endif // SATELLITE_SUPERFRAME_SEQUENCE_H
CarrierBandwidthType_t
Types of bandwidth.
~SatSuperframeSeq()
Destructor for SatSuperframeSeq.
Ptr< SatSuperframeConf > GetSuperframeConf(uint8_t seqId) const
Get superframe conf of the sequence.
double GetCarrierFrequencyHz(uint32_t carrierId) const
Get the center frequency of the requested carrier.
SatSuperframeSeq()
Default constructor for SatSuperframeConf.
static TypeId GetTypeId(void)
Get the type ID.
Time GetTargetDuration() const
Get target duration for sequence.
void AddSuperframe(Ptr< SatSuperframeConf > conf)
Add super frame (configuration) to super frame sequence.
uint32_t GetCarrierId(uint8_t superframeId, uint8_t frameId, uint16_t frameCarrierId) const
Get global carrier id.
void AddWaveformConf(Ptr< SatWaveformConf > wfConf)
Add waveform configuration class instance to this superframe sequence.
Ptr< SatWaveformConf > GetWaveformConf() const
Get waveform configuration.
SatSuperframeConfList m_superframe
Super frame sequences.
Time GetDuration(uint8_t seqId) const
Get duration of the super frame.
Time m_targetDuration
Target duration time for sequence.
std::vector< Ptr< SatSuperframeConf > > SatSuperframeConfList
Define type SatSuperframeConfList.
double GetCarrierBandwidthHz(uint32_t carrierId, SatEnums::CarrierBandwidthType_t bandwidthType) const
Get the bandwidth of the requested carrier.
uint32_t GetCarrierCount() const
Get carrier count of the super frame sequence.
Ptr< SatWaveformConf > m_wfConf
Waveform configurations.
std::map< uint32_t, Ptr< SatControlMsgContainer > > TbtpMap_t
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.