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 <stdint.h>
33 #include <vector>
34 
35 namespace ns3
36 {
37 
44 class SatSuperframeSeq : public Object
45 {
46  public:
50  typedef std::vector<Ptr<SatSuperframeConf>> SatSuperframeConfList;
51 
56  static TypeId GetTypeId(void);
57 
62  virtual TypeId GetInstanceTypeId(void) const;
63 
68 
73 
78  void AddWaveformConf(Ptr<SatWaveformConf> wfConf);
79 
84  Ptr<SatWaveformConf> GetWaveformConf() const;
85 
91  void AddSuperframe(Ptr<SatSuperframeConf> conf);
92 
99  Ptr<SatSuperframeConf> GetSuperframeConf(uint8_t seqId) const;
100 
110  uint32_t GetCarrierId(uint8_t superframeId, uint8_t frameId, uint16_t frameCarrierId) const;
111 
117  uint32_t GetCarrierCount() const;
118 
126  uint32_t GetCarrierCount(uint8_t seqId) const;
127 
135  Time GetDuration(uint8_t seqId) const;
136 
144  double GetCarrierFrequencyHz(uint32_t carrierId) const;
145 
154  double GetCarrierBandwidthHz(uint32_t carrierId,
155  SatEnums::CarrierBandwidthType_t bandwidthType) const;
156 
161  inline Time GetTargetDuration() const
162  {
163  return m_targetDuration;
164  }
165 
166  private:
167  typedef std::map<uint32_t, Ptr<SatControlMsgContainer>> TbtpMap_t;
168 
176 
180  Ptr<SatWaveformConf> m_wfConf;
181 
186 };
187 
188 } // namespace ns3
189 
190 #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.