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>
52 class PropagationDelayModel;
76 typedef std::pair<uint32_t, uint32_t>
GwLink_t;
78 typedef std::set<Ptr<Node>>
80 typedef std::map<uint32_t, std::set<Ptr<Node>>>
114 std::vector<std::pair<uint32_t, uint32_t>> isls,
116 uint32_t fwdLinkCarrierCount,
117 uint32_t rtnLinkCarrierCount,
118 Ptr<SatSuperframeSeq> seq,
199 std::pair<Ptr<NetDevice>, NetDeviceContainer>
Install(
205 uint32_t rtnUlFreqId,
206 uint32_t rtnFlFreqId,
207 uint32_t fwdUlFreqId,
208 uint32_t fwdFlFreqId,
227 Ptr<NetDevice>
InstallFeeder(Ptr<SatGeoNetDevice> geoNetDevice,
233 uint32_t rtnFlFreqId,
234 uint32_t fwdFlFreqId,
253 NetDeviceContainer
InstallUser(Ptr<SatGeoNetDevice> geoNetDevice,
259 uint32_t rtnUlFreqId,
260 uint32_t fwdUlFreqId,
279 uint32_t
GetGwId(uint32_t satId, uint32_t beamId)
const;
296 NodeContainer
GetUtNodes(uint32_t satId, uint32_t beamId)
const;
302 std::list<std::pair<uint32_t, uint32_t>>
GetBeams()
const;
335 Ptr<Node>
GetGwNode(uint32_t gwId)
const;
362 Ptr<SatNcc>
GetNcc()
const;
391 Ptr<Node> sourceUtNode,
392 Ipv4Address sourceAddress,
393 Ipv4Address groupAddress,
395 Ptr<NetDevice>& gwOutputDev);
430 std::map<std::pair<uint32_t, uint32_t>, uint32_t>
433 std::multimap<std::pair<uint32_t, uint32_t>, Ptr<Node>>
554 uint32_t fwdFrequencyId,
555 uint32_t rtnFrequencyId,
585 Ipv4Address sourceAddress,
586 Ipv4Address groupAddress,
587 bool routeToSatellite);
617 std::vector<std::pair<uint32_t, uint32_t>>
m_isls;
GeoCoordinate class is used to store and operate with geodetic coordinates.
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 GEO 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
SatEnums::RegenerationMode_t m_forwardLinkRegenerationMode
The regeneration mode used in satellites for forward link.
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)
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.
SatBeamHelper()
Default constructor for SatBeamHelper (should not be used).
SatEnums::LinkResults_t m_rlLinkResultsType
Type of Return channel link results.
std::string GetBeamInfo() const
Ptr< SatGeoHelper > GetGeoHelper() const
uint32_t GetUtBeamId(Ptr< Node > utNode) const
Get beam Id of the given UT.
NodeContainer GetGeoSatNodes() const
Gets Geo Satellite nodes.
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.
std::pair< uint32_t, uint32_t > GwLink_t
static TypeId GetTypeId(void)
Get the type ID.
std::string GetUtInfo() const
std::string CreateBeamInfo() const
Creates info of the beam.
NodeContainer GetUtNodes() const
NodeContainer GetGwNodes() const
SatEnums::PropagationDelayModel_t m_propagationDelayModel
Propagation delay model.
SatEnums::RegenerationMode_t GetReturnLinkRegenerationMode() const
Get the regeneration mode used in satellites for return link.
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, SatUtMac::RoutingUpdateCallback routingCallback)
void SetStandard(SatEnums::Standard_t standard)
Set the standard to either DVB or Lora.
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.
NetDeviceContainer InstallUser(Ptr< SatGeoNetDevice > geoNetDevice, NodeContainer ut, Ptr< NetDevice > gwNd, uint32_t satId, uint32_t beamId, SatChannelPair::ChannelPair_t userLink, uint32_t rtnUlFreqId, uint32_t fwdUlFreqId, SatUtMac::RoutingUpdateCallback routingCallback)
Time m_ctrlMsgStoreTimeRtnLink
Control message store in container for return link.
uint32_t GetClosestSat(GeoCoordinate position)
Get closest satellite to a ground station.
Ptr< SatChannelPair > m_ulChannels
Ptr< NetDevice > InstallFeeder(Ptr< SatGeoNetDevice > geoNetDevice, Ptr< Node > gwNode, uint32_t gwId, uint32_t satId, uint32_t beamId, SatChannelPair::ChannelPair_t feederLink, uint32_t rtnFlFreqId, uint32_t fwdFlFreqId, SatUtMac::RoutingUpdateCallback routingCallback)
virtual ~SatBeamHelper()
Destructor for SatBeamHelper.
SatEnums::RegenerationMode_t m_returnLinkRegenerationMode
The regeneration mode used in satellites for return link.
Ptr< SatGwHelper > m_gwHelper
SatEnums::Standard_t m_standard
The global standard used.
Ptr< SatGeoHelper > m_geoHelper
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.
Standard_t
The global standard used.
RandomAccessModel_t
The defined random access models.
FadingModel_t
Fading models.
RegenerationMode_t
The regeneration mode used in satellites.
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.