23 #ifndef SATELLITE_BEAM_HELPER_H
24 #define SATELLITE_BEAM_HELPER_H
30 #include <ns3/ipv4-address-helper.h>
31 #include <ns3/node-container.h>
32 #include <ns3/satellite-antenna-gain-pattern-container.h>
33 #include <ns3/satellite-beam-channel-pair.h>
34 #include <ns3/satellite-bstp-controller.h>
35 #include <ns3/satellite-markov-container.h>
36 #include <ns3/satellite-mobility-observer.h>
37 #include <ns3/satellite-ncc.h>
38 #include <ns3/satellite-packet-trace.h>
39 #include <ns3/satellite-phy-rx-carrier-conf.h>
40 #include <ns3/satellite-superframe-sequence.h>
41 #include <ns3/satellite-typedefs.h>
54 class PropagationDelayModel;
78 typedef std::pair<uint32_t, uint32_t>
GwLink_t;
80 typedef std::set<Ptr<Node>>
82 typedef std::map<uint32_t, std::set<Ptr<Node>>>
112 SatBeamHelper(std::vector<std::pair<uint32_t, uint32_t>> isls,
114 uint32_t fwdLinkCarrierCount,
115 uint32_t rtnLinkCarrierCount,
116 Ptr<SatSuperframeSeq> seq);
190 std::pair<Ptr<NetDevice>, NetDeviceContainer>
Install(
196 uint32_t rtnUlFreqId,
197 uint32_t rtnFlFreqId,
198 uint32_t fwdUlFreqId,
199 uint32_t fwdFlFreqId,
220 Ptr<NetDevice>
InstallFeeder(Ptr<SatOrbiterNetDevice> orbiterNetDevice,
225 uint32_t feederSatId,
226 uint32_t feederBeamId,
228 uint32_t rtnFlFreqId,
229 uint32_t fwdFlFreqId,
248 NetDeviceContainer
InstallUser(Ptr<SatOrbiterNetDevice> orbiterNetDevice,
254 uint32_t rtnUlFreqId,
255 uint32_t fwdUlFreqId,
274 uint32_t
GetGwId(uint32_t satId, uint32_t beamId)
const;
281 NodeContainer
GetUtNodes(uint32_t satId, uint32_t beamId)
const;
287 std::list<std::pair<uint32_t, uint32_t>>
GetBeams()
const;
313 Ptr<Node>
GetGwNode(uint32_t gwId)
const;
333 Ptr<SatNcc>
GetNcc()
const;
356 Ptr<Node> sourceUtNode,
357 Ipv4Address sourceAddress,
358 Ipv4Address groupAddress,
360 Ptr<NetDevice>& gwOutputDev);
394 std::map<std::pair<uint32_t, uint32_t>, uint32_t>
397 std::multimap<std::pair<uint32_t, uint32_t>, Ptr<Node>>
518 uint32_t fwdFrequencyId,
519 uint32_t rtnFrequencyId,
549 Ipv4Address sourceAddress,
550 Ipv4Address groupAddress,
551 bool routeToSatellite);
566 std::vector<std::pair<uint32_t, uint32_t>>
m_isls;
SatBeamHelper builds a set Satellite beams with needed objects and configuration.
void SetAntennaGainPatterns(Ptr< SatAntennaGainPatternContainer > antennaPatterns)
Set the antenna gain patterns to be used when configuring the beams to the satellite.
NetDeviceContainer AddMulticastGroupRoutes(MulticastBeamInfo_t beamInfo, Ptr< Node > sourceUtNode, Ipv4Address sourceAddress, Ipv4Address groupAddress, bool routeToGwUsers, Ptr< NetDevice > &gwOutputDev)
std::map< std::pair< uint32_t, uint32_t >, uint32_t > m_beam
SatEnums::DvbVersion_t m_dvbVersion
Indicates if using DVB-S2 or DVB-S2X.
Time m_constantPropagationDelay
Constant propagation delay.
bool m_printDetailedInformationToCreationTraces
Flag indicating whether to print detailed information to the creation traces.
void SetChannelAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each Channel created by the helper.
Ptr< SatChannelPair > m_flChannels
ObjectFactory m_channelFactory
void SetIslRoutes()
Set ISL routes.
SatChannel::CarrierFreqConverter CarrierFreqConverter
Define type CarrierFreqConverter.
Ptr< SatSuperframeSeq > m_superframeSeq
bool StoreGwNode(uint32_t id, Ptr< Node > node)
Creates GW node according to given id and stores GW to map.
Ptr< SatBstpController > m_bstpController
Beam Switching Time Plan controller, which is created if FWD link beam hopping is enabled (m_enableFw...
void SetDeviceAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each NetDevice created by the helper.
void InstallIsls()
Create all the ISLs.
Ptr< SatGwHelper > GetGwHelper() const
SatEnums::PropagationDelayModel_t GetPropagationDelayModelEnum()
Ptr< SatAntennaGainPatternContainer > m_antennaGainPatterns
SatTypedefs::CarrierBandwidthConverter_t m_carrierBandwidthConverter
CarrierFreqConverter m_carrierFreqConverter
std::set< Ptr< Node > > MulticastBeamInfoItem_t
bool m_enableFwdLinkBeamHopping
Flag indicating whether beam hopping is enabled in FWD link.
Ptr< SatUtHelper > GetUtHelper() const
void EnableCreationTraces(Ptr< OutputStreamWrapper > stream, CallbackBase &cb)
Enables creation traces to be written in given file.
uint32_t GetGwId(uint32_t satId, uint32_t beamId) const
std::map< uint32_t, Ptr< NetDevice > > m_gwNdMap
Map used in regenerative mode to store GW Net device (we need only one per GW)
NodeContainer GetUtNodes(uint32_t satId, uint32_t beamId) const
SatTypedefs::CarrierBandwidthConverter_t CarrierBandwidthConverter
Define type CarrierBandwidthConverter.
virtual void DoDispose()
Dispose of this class instance.
Ptr< PropagationDelayModel > GetPropagationDelayModel(uint32_t satId, uint32_t beamId, SatEnums::ChannelType_t channelType)
TracedCallback< std::string > m_creationTrace
Trace callback for creation traces.
std::pair< Ptr< NetDevice >, NetDeviceContainer > Install(NodeContainer ut, Ptr< Node > gwNode, uint32_t gwId, uint32_t satId, uint32_t beamId, uint32_t rtnUlFreqId, uint32_t rtnFlFreqId, uint32_t fwdUlFreqId, uint32_t fwdFlFreqId, SatMac::RoutingUpdateCallback routingCallback)
NetDeviceContainer InstallUser(Ptr< SatOrbiterNetDevice > orbiterNetDevice, NodeContainer ut, Ptr< NetDevice > gwNd, uint32_t satId, uint32_t beamId, SatChannelPair::ChannelPair_t userLink, uint32_t rtnUlFreqId, uint32_t fwdUlFreqId, SatMac::RoutingUpdateCallback routingCallback)
SatBeamHelper()
Default constructor for SatBeamHelper (should not be used).
SatEnums::LinkResults_t m_rlLinkResultsType
Type of Return channel link results.
std::string GetBeamInfo() const
uint32_t GetUtBeamId(Ptr< Node > utNode) const
Get beam Id of the given UT.
Ptr< SatNcc > GetNcc() const
Ptr< SatBaseFading > InstallFadingContainer(Ptr< Node > node) const
Install fading model to node, if fading model doesn't exist already in node.
Time m_ctrlMsgStoreTimeFwdLink
Control message store time in container for forward link.
SatPhyRxCarrierConf::RandomAccessCollisionModel m_raCollisionModel
The used collision model for random access.
std::pair< uint32_t, uint32_t > FrequencyPair_t
std::map< std::pair< uint32_t, uint32_t >, FrequencyPair_t > m_beamFreqs
std::map< uint32_t, Ptr< Node > > m_gwNode
std::list< std::pair< uint32_t, uint32_t > > GetBeams() const
Ptr< SatMarkovConf > m_markovConf
Common configuration for Markov model.
Ptr< SatUtHelper > m_utHelper
void AddMulticastRouteToUt(Ptr< Node > utNode, Ipv4Address sourceAddress, Ipv4Address groupAddress, bool routeToSatellite)
Add multicast route to UT node.
Ptr< SatOrbiterHelper > GetOrbiterHelper() const
Ptr< NetDevice > InstallFeeder(Ptr< SatOrbiterNetDevice > orbiterNetDevice, Ptr< Node > gwNode, uint32_t gwId, uint32_t satId, uint32_t beamId, uint32_t feederSatId, uint32_t feederBeamId, SatChannelPair::ChannelPair_t feederLink, uint32_t rtnFlFreqId, uint32_t fwdFlFreqId, SatMac::RoutingUpdateCallback routingCallback)
std::pair< uint32_t, uint32_t > GwLink_t
Ptr< SatOrbiterHelper > m_orbiterHelper
static TypeId GetTypeId(void)
Get the type ID.
std::string GetUtInfo() const
std::string CreateBeamInfo() const
Creates info of the beam.
SatEnums::PropagationDelayModel_t m_propagationDelayModel
Propagation delay model.
void EnablePacketTrace()
Enable packet traces.
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
void Init()
Init method is called after all the initial configurations have been done by the SatHelper and SatBea...
SatPhyRxCarrierConf::InterferenceEliminationModel m_raInterferenceEliminationModel
The used interference model for random access.
Ptr< SatPacketTrace > m_packetTrace
Packet trace.
SatEnums::FadingModel_t m_fadingModel
Configured fading model.
Ptr< Node > GetGwNode(uint32_t gwId) const
Gets GW node according to given id.
SatChannelPair::ChannelPair_t GetChannelPair(uint32_t satId, uint32_t beamId, uint32_t fwdFrequencyId, uint32_t rtnFrequencyId, bool isUserLink)
Gets satellite channel pair from requested map.
std::vector< std::pair< uint32_t, uint32_t > > m_isls
Vector constaining all the ISLs of the topology.
SatEnums::RandomAccessModel_t m_randomAccessModel
The used random access model.
Time m_ctrlMsgStoreTimeRtnLink
Control message store in container for return link.
Ptr< SatChannelPair > m_ulChannels
virtual ~SatBeamHelper()
Destructor for SatBeamHelper.
Ptr< SatGwHelper > m_gwHelper
std::map< uint32_t, std::set< Ptr< Node > > > MulticastBeamInfo_t
SatPhyRxCarrierConf::InterferenceModel m_raInterferenceModel
The used interference model for random access.
double m_raConstantErrorRate
Constant error rate for random access.
void SetNccRoutingCallback(SatNcc::UpdateRoutingCallback cb)
Attach an update routing callback to the NCC of this simulation.
std::multimap< std::pair< uint32_t, uint32_t >, Ptr< Node > > m_utNode
bool m_enableTracesOnReturnLink
Helper flag to activate packet traces on the return link only.
Callback< double, SatEnums::ChannelType_t, uint32_t, uint32_t > CarrierFreqConverter
std::pair< Ptr< SatChannel >, Ptr< SatChannel > > ChannelPair_t
LinkResults_t
Return link Link result types.
ChannelType_t
Types of channel.
PropagationDelayModel_t
Propagation delay model.
RandomAccessModel_t
The defined random access models.
FadingModel_t
Fading models.
DvbVersion_t
The scheduling algorithm used to fill the BBFrames.
Callback< void, Address, Address > RoutingUpdateCallback
Callback to update routing and ARP tables after handover.
Callback< void, Address, Address, Address > UpdateRoutingCallback
Update routes and ARP tables on gateways after a terminal handover.
InterferenceEliminationModel
Interference cancelation model enum.
RandomAccessCollisionModel
Random access collision model enum.
InterferenceModel
Interference model enum.
Callback< double, SatEnums::ChannelType_t, uint32_t, SatEnums::CarrierBandwidthType_t > CarrierBandwidthConverter_t
Callback for carrier bandwidths.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.