25 #include <ns3/boolean.h>
26 #include <ns3/config.h>
27 #include <ns3/double.h>
30 #include <ns3/pointer.h>
31 #include <ns3/satellite-channel-estimation-error-container.h>
32 #include <ns3/satellite-channel.h>
33 #include <ns3/satellite-enums.h>
34 #include <ns3/satellite-link-results.h>
35 #include <ns3/satellite-lower-layer-service.h>
36 #include <ns3/satellite-net-device.h>
37 #include <ns3/satellite-orbiter-net-device.h>
38 #include <ns3/satellite-typedefs.h>
42 NS_LOG_COMPONENT_DEFINE(
"SatGwHelper");
47 NS_OBJECT_ENSURE_REGISTERED(SatGwHelper);
53 TypeId(
"ns3::SatGwHelper")
55 .AddAttribute(
"DaRtnLinkInterferenceModel",
56 "Return link interference model for dedicated access",
58 MakeEnumAccessor<SatPhyRxCarrierConf::InterferenceModel>(
70 "Return link error model for",
79 .AddAttribute(
"FwdSchedulingAlgorithm",
80 "The scheduling algorithm used to fill the BBFrames",
82 MakeEnumAccessor<SatEnums::FwdSchedulingAlgorithm_t>(
88 .AddAttribute(
"RtnLinkConstantErrorRate",
89 "Constant error rate",
92 MakeDoubleChecker<double>())
93 .AddAttribute(
"EnableChannelEstimationError",
94 "Enable channel estimation error in return link receiver at GW.",
98 .AddTraceSource(
"Creation",
101 "ns3::SatTypedefs::CreationCallback");
112 : m_rtnLinkCarrierCount(0),
115 m_daConstantErrorRate(0.0),
117 m_enableChannelEstimationError(false),
121 NS_FATAL_ERROR(
"Default constructor not supported!!!");
125 uint32_t rtnLinkCarrierCount,
126 Ptr<SatSuperframeSeq> seq,
131 : m_carrierBandwidthConverter(carrierBandwidthConverter),
132 m_rtnLinkCarrierCount(rtnLinkCarrierCount),
133 m_superframeSeq(seq),
134 m_readCtrlCb(readCb),
135 m_reserveCtrlCb(reserveCb),
136 m_sendCtrlCb(sendCb),
139 m_daConstantErrorRate(0.0),
141 m_enableChannelEstimationError(false),
142 m_raSettings(randomAccessSettings)
144 NS_LOG_FUNCTION(
this << rtnLinkCarrierCount << seq);
152 Ptr<SatLinkResultsFwd> lrFwd,
156 NS_LOG_FUNCTION(
this);
161 Config::SetDefault(
"ns3::SatBbFrameConf::PlHeaderInSlots", UintegerValue(1));
164 Config::SetDefault(
"ns3::SatBbFrameConf::PlHeaderInSlots", UintegerValue(2));
167 NS_FATAL_ERROR(
"Forward scheduling algorithm is not implemented");
197 NS_LOG_FUNCTION(
this);
205 NS_LOG_FUNCTION(
this << n1);
213 NS_LOG_FUNCTION(
this << n1);
221 NS_LOG_FUNCTION(
this << n1);
223 Config::SetDefault(
"ns3::SatGwPhy::" + n1, v1);
231 uint32_t feederSatId,
232 uint32_t feederBeamId,
237 Ptr<SatLowerLayerServiceConf> llsConf)
239 NS_LOG_FUNCTION(
this << gwId << satId << beamId << fCh << rCh << ncc << llsConf);
241 NetDeviceContainer devs;
243 for (NodeContainer::Iterator i = c.Begin(); i != c.End(); i++)
264 NS_LOG_FUNCTION(
this);
266 TraceConnect(
"Creation",
"SatGwHelper", cb);
DvbVersion_t
The scheduling algorithm used to fill the BBFrames.
SatPhy::ErrorModel m_errorModel
ObjectFactory m_channelFactory
void SetChannelAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each Channel created by the helper.
void Initialize(Ptr< SatLinkResultsRtn > lrRcs2, Ptr< SatLinkResultsFwd > lrFwd, SatEnums::DvbVersion_t dvbVersion, bool useScpc)
void SetDeviceAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each NetDevice created by the helper.
void SetPhyAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each Phy created by the helper.
static TypeId GetTypeId(void)
Get the type ID.
TracedCallback< std::string > m_creationTrace
Trace callback for creation traces.
void EnableCreationTraces(Ptr< OutputStreamWrapper > stream, CallbackBase &cb)
Enables creation traces to be written in given file.
SatEnums::FwdSchedulingAlgorithm_t m_fwdSchedulingAlgorithm
The forward link algorithm used.
bool m_enableChannelEstimationError
Enable channel estimation error modeling at forward link receiver (= UT).
double m_daConstantErrorRate
Ptr< SatBbFrameConf > GetBbFrameConf() const
Get BB frame configuration.
ObjectFactory m_deviceFactory
Ptr< SatBbFrameConf > m_bbFrameConf
Ptr< SatLinkResults > m_linkResults
TypeId GetInstanceTypeId(void) const
SatGwHelper()
Default constructor.
SatPhy::InterferenceModel m_daInterferenceModel
SatTypedefs::CarrierBandwidthConverter_t m_carrierBandwidthConverter
NetDeviceContainer Install(NodeContainer c, uint32_t gwId, uint32_t satId, uint32_t beamId, uint32_t feederSatId, uint32_t feederBeamId, Ptr< SatChannel > fCh, Ptr< SatChannel > rCh, SatPhy::ChannelPairGetterCallback cbChannel, Ptr< SatNcc > ncc, Ptr< SatLowerLayerServiceConf > llsConf)
Callback< uint32_t, Ptr< SatControlMessage > > ReserveCtrlMsgCallback
Callback to reserve an id and initially store the control message.
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.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.
Random access setting options.