satellite-random-access-container-conf.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2014 Magister Solutions Ltd.
4  * Copyright (c) 2018 CNES
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation;
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Author: Frans Laakso <frans.laakso@magister.fi>
20  * Author: Mathias Ettinger <mettinger@toulouse.viveris.fr>
21  */
22 
23 #ifndef SATELLITE_RANDOM_ACCESS_CONF_H
24 #define SATELLITE_RANDOM_ACCESS_CONF_H
25 
29 
30 #include <ns3/object.h>
31 #include <ns3/simulator.h>
32 #include <ns3/uinteger.h>
33 
34 #include <map>
35 #include <stdint.h>
36 #include <vector>
37 
38 namespace ns3
39 {
40 
49 class SatRandomAccessConf : public Object
50 {
51  public:
56 
60  SatRandomAccessConf(Ptr<SatLowerLayerServiceConf> llsConf,
61  Ptr<SatSuperframeSeq> m_superframeSeq);
62 
66  virtual ~SatRandomAccessConf();
67 
72  static TypeId GetTypeId(void);
73 
79  Ptr<SatRandomAccessAllocationChannel> GetAllocationChannelConfiguration(
80  uint32_t allocationChannel);
81 
87  {
89  }
90 
97  uint32_t controlRandomizationIntervalInMilliSeconds)
98  {
100  controlRandomizationIntervalInMilliSeconds;
101  }
102 
108  {
110  }
111 
117  uint32_t GetAllocationChannelConfigurationId(uint32_t allocationChannel);
118 
124  {
126  }
127 
133  {
135  }
136 
141 
142  private:
146  std::map<uint32_t, Ptr<SatRandomAccessAllocationChannel>> m_allocationChannelConf;
147 
152 
158 
163 
168 
173 };
174 
175 } // namespace ns3
176 
177 #endif /* SATELLITE_RANDOM_ACCESS_CONF_H */
Class for random access configuration.
uint32_t m_allocationChannelCount
Number of available allocation channels.
void SetSlottedAlohaControlRandomizationIntervalInMilliSeconds(uint32_t controlRandomizationIntervalInMilliSeconds)
Function for setting the Slotted ALOHA control randomization interval.
uint32_t GetSlottedAlohaControlRandomizationIntervalInMilliSeconds()
Function for getting the Slotted ALOHA control randomization interval.
uint32_t GetAllocationChannelConfigurationId(uint32_t allocationChannel)
Function for retrieving the configuration ID of a given allocation channel.
uint32_t GetSlottedAlohaSignalingOverheadInBytes()
Function for getting the Slotted ALOHA signaling overhead in bytes.
uint32_t m_slottedAlohaControlRandomizationIntervalInMilliSeconds
Slotted ALOHA control randomization interval in milliseconds.
std::vector< uint32_t > m_configurationIdPerAllocationChannel
Mapping between an allocation channel and its associated configuration index.
void DoSlottedAlohaVariableSanityCheck()
Function for checking the Slotted ALOHA variable sanity.
uint32_t GetCrdsaSignalingOverheadInBytes()
Function for getting the CRDSA signaling overhead in bytes.
static TypeId GetTypeId(void)
NS-3 type id function.
Ptr< SatRandomAccessAllocationChannel > GetAllocationChannelConfiguration(uint32_t allocationChannel)
Function for returning the allocation channel specific RA configuration.
uint32_t m_crdsaSignalingOverheadInBytes
Defines the size of the CRDSA signaling overhead in bytes.
uint32_t GetNumOfAllocationChannelsConfigurations()
Function for getting the number of available allocation channels configurations.
uint32_t m_slottedAlohaSignalingOverheadInBytes
Defines the size of the Slotted ALOHA signaling overhead in bytes.
std::map< uint32_t, Ptr< SatRandomAccessAllocationChannel > > m_allocationChannelConf
Map containing the allocation channel configurations.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.