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 
25 #include "satellite-frame-conf.h"
27 
28 #include <ns3/object.h>
29 #include <ns3/ptr.h>
30 
31 #include <map>
32 #include <vector>
33 
34 namespace ns3
35 {
36 
43 class SatSuperframeSeq : public Object
44 {
45  public:
49  typedef std::vector<Ptr<SatSuperframeConf>> SatSuperframeConfList;
50 
55  static TypeId GetTypeId(void);
56 
61  virtual TypeId GetInstanceTypeId(void) const;
62 
67 
72 
77  void AddWaveformConf(Ptr<SatWaveformConf> wfConf);
78 
83  Ptr<SatWaveformConf> GetWaveformConf() const;
84 
90  void AddSuperframe(Ptr<SatSuperframeConf> conf);
91 
98  Ptr<SatSuperframeConf> GetSuperframeConf(uint8_t seqId) const;
99 
109  uint32_t GetCarrierId(uint8_t superframeId, uint8_t frameId, uint16_t frameCarrierId) const;
110 
116  uint32_t GetCarrierCount() const;
117 
125  uint32_t GetCarrierCount(uint8_t seqId) const;
126 
134  Time GetDuration(uint8_t seqId) const;
135 
143  double GetCarrierFrequencyHz(uint32_t carrierId) const;
144 
153  double GetCarrierBandwidthHz(uint32_t carrierId,
154  SatEnums::CarrierBandwidthType_t bandwidthType) const;
155 
160  inline Time GetTargetDuration() const
161  {
162  return m_targetDuration;
163  }
164 
165  private:
166  typedef std::map<uint32_t, Ptr<SatControlMsgContainer>> TbtpMap_t;
167 
175 
179  Ptr<SatWaveformConf> m_wfConf;
180 
185 };
186 
187 } // namespace ns3
188 
189 #endif // SATELLITE_SUPERFRAME_SEQUENCE_H
CarrierBandwidthType_t
Types of bandwidth.
This class implements super frame sequence.
~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.
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
std::map< uint32_t, Ptr< SatControlMsgContainer > > TbtpMap_t
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.