25#include "ns3/boolean.h"
26#include "ns3/callback.h"
27#include "ns3/config.h"
28#include "ns3/double.h"
31#include "ns3/pointer.h"
32#include "ns3/satellite-channel-estimation-error-container.h"
33#include "ns3/satellite-channel.h"
34#include "ns3/satellite-enums.h"
35#include "ns3/satellite-net-device.h"
36#include "ns3/satellite-phy-rx-carrier-conf.h"
37#include "ns3/satellite-typedefs.h"
41NS_LOG_COMPONENT_DEFINE(
"SatUtHelper");
52 TypeId(
"ns3::SatUtHelper")
54 .AddAttribute(
"DaFwdLinkInterferenceModel",
55 "Forward link interference model for dedicated access",
57 MakeEnumAccessor<SatPhyRxCarrierConf::InterferenceModel>(
69 "Forward link error model",
78 .AddAttribute(
"FwdLinkConstantErrorRate",
79 "Constant error rate",
82 MakeDoubleChecker<double>())
83 .AddAttribute(
"LowerLayerServiceConf",
84 "Pointer to lower layer service configuration.",
87 MakePointerChecker<SatLowerLayerServiceConf>())
88 .AddAttribute(
"EnableChannelEstimationError",
89 "Enable channel estimation error in forward link receiver at UT.",
93 .AddAttribute(
"UseCrdsaOnlyForControlPackets",
94 "CRDSA utilized only for control packets or also for user data.",
98 .AddAttribute(
"AsynchronousReturnAccess",
99 "Use asynchronous access methods on the return channel.",
102 MakeBooleanChecker())
103 .AddTraceSource(
"Creation",
106 "ns3::SatTypedefs::CreationCallback");
124 NS_LOG_FUNCTION(
this);
127 NS_FATAL_ERROR(
"SatUtHelper::SatUtHelper - Constructor not in use");
131 uint32_t fwdLinkCarrierCount,
132 Ptr<SatSuperframeSeq> seq,
152 NS_LOG_FUNCTION(
this << fwdLinkCarrierCount << seq);
156 m_llsConf = CreateObject<SatLowerLayerServiceConf>();
162 NS_LOG_FUNCTION(
this);
175 NS_LOG_FUNCTION(
this << n1);
183 NS_LOG_FUNCTION(
this << n1);
191 NS_LOG_FUNCTION(
this << n1);
193 Config::SetDefault(
"ns3::SatUtPhy::" + n1, v1);
202 Ptr<SatNetDevice> gwNd,
204 Address satUserAddress,
208 NS_LOG_FUNCTION(
this << satId << beamId << fCh << rCh << gwNd << ncc << satUserAddress);
210 NetDeviceContainer devs;
212 for (NodeContainer::Iterator i = c.Begin(); i != c.End(); i++)
215 Install(*i, satId, beamId, fCh, rCh, gwNd, ncc, satUserAddress, cbChannel, cbRouting));
224 NS_LOG_FUNCTION(
this);
226 TraceConnect(
"Creation",
"SatUtHelper", cb);
Callback< uint32_t, Ptr< SatControlMessage > > ReserveCtrlMsgCallback
Callback to reserve an id and initially store the control message.
Callback< void, Address, Address > RoutingUpdateCallback
Callback to update routing and ARP tables after handover.
Callback< uint32_t, uint32_t > SendCtrlMsgCallback
Callback to send a control message and allocate a recv ID for it.
Callback< Ptr< SatControlMessage >, uint32_t > ReadCtrlMsgCallback
Callback to read control messages from container storing control messages.
Callback< SatChannelPair::ChannelPair_t, uint32_t, uint32_t > ChannelPairGetterCallback
Callback for retrieving a pair of SatChannel associated to a beam.
Information of beam users liken UTs and their users.
Callback< double, SatEnums::ChannelType_t, uint32_t, SatEnums::CarrierBandwidthType_t > CarrierBandwidthConverter_t
Callback for carrier bandwidths.
Creates needed objects for UT nodes like SatOrbiterNetDevice objects.
void EnableCreationTraces(Ptr< OutputStreamWrapper > stream, CallbackBase &cb)
Enables creation traces to be written in given file.
SatPhy::ErrorModel m_errorModel
void SetChannelAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each Channel created by the helper.
SatPhy::InterferenceModel m_daInterferenceModel
uint32_t m_fwdLinkCarrierCount
RandomAccessSettings_s m_raSettings
The used random access model settings.
bool m_enableChannelEstimationError
Enable channel estimation error modeling at forward link receiver (= UT).
SatMac::ReadCtrlMsgCallback m_readCtrlCb
TracedCallback< std::string > m_creationTrace
Trace callback for creation traces.
void SetPhyAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each Phy created by the helper.
void Initialize(Ptr< SatLinkResultsFwd > lrFwd)
ObjectFactory m_channelFactory
NetDeviceContainer Install(NodeContainer c, uint32_t satId, uint32_t beamId, Ptr< SatChannel > fCh, Ptr< SatChannel > rCh, Ptr< SatNetDevice > gwNd, Ptr< SatNcc > ncc, Address satUserAddress, SatPhy::ChannelPairGetterCallback cbChannel, SatMac::RoutingUpdateCallback cbRouting)
double m_daConstantErrorRate
Ptr< SatLinkResults > m_linkResults
Ptr< SatLowerLayerServiceConf > m_llsConf
Configured lower layer service configuration.
SatUtHelper()
Default constructor.
SatTypedefs::CarrierBandwidthConverter_t m_carrierBandwidthConverter
ObjectFactory m_deviceFactory
bool m_crdsaOnlyForControl
Planned CRDSA usage:
SatMac::SendCtrlMsgCallback m_sendCtrlCb
Ptr< SatSuperframeSeq > m_superframeSeq
SatMac::ReserveCtrlMsgCallback m_reserveCtrlCb
static TypeId GetTypeId(void)
Derived from Object.
void SetDeviceAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each NetDevice created by the helper.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.
Define RandomAccessSettings as a struct.