Loading...
Searching...
No Matches
satellite-phy.cc
Go to the documentation of this file.
1/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2013 Magister Solutions Ltd.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Author: Jani Puttonen <jani.puttonen@magister.fi>
19 */
20
21#include "satellite-phy.h"
22
24#include "satellite-channel.h"
25#include "satellite-enums.h"
27#include "satellite-mac-tag.h"
28#include "satellite-mac.h"
29#include "satellite-node-info.h"
30#include "satellite-phy-rx.h"
31#include "satellite-phy-tx.h"
33#include "satellite-time-tag.h"
34#include "satellite-typedefs.h"
35#include "satellite-utils.h"
36
37#include "ns3/boolean.h"
38#include "ns3/double.h"
39#include "ns3/log.h"
40#include "ns3/node.h"
41#include "ns3/pointer.h"
42#include "ns3/simulator.h"
43#include "ns3/uinteger.h"
44
45NS_LOG_COMPONENT_DEFINE("SatPhy");
46
47namespace ns3
48{
49
50NS_OBJECT_ENSURE_REGISTERED(SatPhy);
51
53 : m_satId(0),
54 m_beamId(0),
57 m_lastDelay(0),
69{
70 NS_LOG_FUNCTION(this);
71 NS_FATAL_ERROR("SatPhy default constructor is not allowed to use");
72}
73
75 : m_params(params),
76 m_satId(0),
77 m_beamId(0),
80 m_lastDelay(0),
92{
93 NS_LOG_FUNCTION(this << m_params.m_satId << m_params.m_beamId);
94
95 switch (m_params.m_standard)
96 {
99 case SatEnums::DVB_GW: {
100 m_phyTx = CreateObject<SatPhyTx>();
101 m_phyRx = CreateObject<SatPhyRx>();
102 break;
103 }
105 m_phyTx = CreateObject<SatLoraPhyTx>();
106 m_phyRx = CreateObject<SatPhyRx>();
107 break;
108 }
109 case SatEnums::LORA_UT: {
110 m_phyTx = CreateObject<SatLoraPhyTx>();
111 m_phyRx = CreateObject<SatLoraPhyRx>();
112 break;
113 }
114 case SatEnums::LORA_GW: {
115 m_phyTx = CreateObject<SatLoraPhyTx>();
116 m_phyRx = CreateObject<SatPhyRx>();
117 break;
118 }
119 default:
120 NS_FATAL_ERROR("Standard not implemented yet: " << m_params.m_standard);
121 }
122}
123
124void
126{
127 NS_LOG_FUNCTION(this);
128
129 Object::NotifyConstructionCompleted();
130
131 Ptr<MobilityModel> mobility = m_params.m_device->GetNode()->GetObject<MobilityModel>();
132
133 m_phyTx->SetChannel(m_params.m_txCh);
134 m_satId = m_params.m_satId;
135 m_beamId = m_params.m_beamId;
136
137 m_params.m_rxCh->AddRx(m_phyRx);
138 m_phyRx->SetDevice(m_params.m_device);
139 m_phyTx->SetMobility(mobility);
140 m_phyRx->SetMobility(mobility);
141}
142
143TypeId
145{
146 static TypeId tid =
147 TypeId("ns3::SatPhy")
148 .SetParent<Object>()
149 .AddAttribute("ReceiveCb",
150 "The receive callback for this phy.",
151 CallbackValue(),
152 MakeCallbackAccessor(&SatPhy::m_rxCallback),
153 MakeCallbackChecker())
154 .AddAttribute("CnoCb",
155 "The C/N0 info callback for this phy.",
156 CallbackValue(),
157 MakeCallbackAccessor(&SatPhy::m_cnoCallback),
158 MakeCallbackChecker())
159 .AddAttribute("AverageNormalizedOfferedLoadCallback",
160 "The average offered random access load callback for this phy.",
161 CallbackValue(),
162 MakeCallbackAccessor(&SatPhy::m_avgNormalizedOfferedLoadCallback),
163 MakeCallbackChecker())
164 .AddAttribute("EnableStatisticsTags",
165 "If true, some tags will be added to each transmitted packet to assist "
166 "with statistics computation",
167 BooleanValue(false),
168 MakeBooleanAccessor(&SatPhy::m_isStatisticsTagsEnabled),
169 MakeBooleanChecker())
170 .AddTraceSource("PacketTrace",
171 "Packet event trace",
172 MakeTraceSourceAccessor(&SatPhy::m_packetTrace),
173 "ns3::SatTypedefs::PacketTraceCallback")
174 .AddTraceSource("Rx",
175 "A packet received",
176 MakeTraceSourceAccessor(&SatPhy::m_rxTrace),
177 "ns3::SatTypedefs::PacketSourceAddressCallback")
178 .AddTraceSource("RxDelay",
179 "A packet is received with delay information",
180 MakeTraceSourceAccessor(&SatPhy::m_rxDelayTrace),
181 "ns3::SatTypedefs::PacketDelayAddressCallback")
182 .AddTraceSource("RxLinkDelay",
183 "A packet is received with link delay information",
184 MakeTraceSourceAccessor(&SatPhy::m_rxLinkDelayTrace),
185 "ns3::SatTypedefs::PacketDelayAddressCallback")
186 .AddTraceSource("RxJitter",
187 "A packet is received with jitter information",
188 MakeTraceSourceAccessor(&SatPhy::m_rxJitterTrace),
189 "ns3::SatTypedefs::PacketJitterAddressCallback")
190 .AddTraceSource("RxLinkJitter",
191 "A packet is received with link jitter information",
192 MakeTraceSourceAccessor(&SatPhy::m_rxLinkJitterTrace),
193 "ns3::SatTypedefs::PacketJitterAddressCallback")
194 .AddTraceSource("RxLinkModcod",
195 "A packet is received with link MODCOD information",
196 MakeTraceSourceAccessor(&SatPhy::m_rxLinkModcodTrace),
197 "ns3::SatTypedefs::PacketModcodAddressCallback");
198 return tid;
199}
200
201void
203{
204 NS_LOG_FUNCTION(this);
205 Object::DoInitialize();
206}
207
208void
210{
211 NS_LOG_FUNCTION(this);
212
213 // calculate EIRP without Gain (maximum)
214 double eirpWoGainDbw =
216
217 m_eirpWoGainW = SatUtils::DbWToW(eirpWoGainDbw);
218
219 m_phyTx->SetSatId(m_satId);
220 m_phyRx->SetSatId(m_satId);
221
222 m_phyTx->SetBeamId(m_beamId);
223 m_phyRx->SetBeamId(m_beamId);
224
225 m_phyRx->SetReceiveCallback(MakeCallback(&SatPhy::Receive, this));
226
227 if (m_cnoCallback.IsNull() == false)
228 {
229 m_phyRx->SetCnoCallback(MakeCallback(&SatPhy::CnoInfo, this));
230 }
231
232 if (m_avgNormalizedOfferedLoadCallback.IsNull() == false)
233 {
234 m_phyRx->SetAverageNormalizedOfferedLoadCallback(
236 }
237
238 m_phyTx->SetMaxAntennaGain_Db(m_txMaxAntennaGainDb);
239 m_phyRx->SetMaxAntennaGain_Db(m_rxMaxAntennaGainDb);
240
241 m_phyTx->SetDefaultFadingValue(m_defaultFadingValue);
242 m_phyRx->SetDefaultFadingValue(m_defaultFadingValue);
243
244 m_phyRx->SetAntennaLoss_Db(m_rxAntennaLossDb);
245}
246
248{
249 NS_LOG_FUNCTION(this);
250}
251
252void
254{
255 NS_LOG_FUNCTION(this);
256 m_phyTx->DoDispose();
257 m_phyTx = 0;
258 m_phyRx->DoDispose();
259 m_phyRx = 0;
260
261 Object::DoDispose();
262}
263
264double
265SatPhy::CalculateSinr(double sinr, double otherInterference)
266{
267 NS_LOG_FUNCTION(this << sinr << otherInterference);
268
269 if (sinr <= 0)
270 {
271 NS_FATAL_ERROR("Calculated own SINR is expected to be greater than zero!!!");
272 }
273
274 if (otherInterference <= 0)
275 {
276 NS_FATAL_ERROR("Interference is expected to be greater than zero!!!");
277 }
278
279 double finalSinr = 1 / ((1 / sinr) + (1 / otherInterference));
280
281 return finalSinr;
282}
283
284void
285SatPhy::SetTxAntennaGainPattern(Ptr<SatAntennaGainPattern> agp,
286 Ptr<SatMobilityModel> satelliteMobility)
287{
288 NS_LOG_FUNCTION(this);
289 m_phyTx->SetAntennaGainPattern(agp, satelliteMobility);
290}
291
292void
293SatPhy::SetRxAntennaGainPattern(Ptr<SatAntennaGainPattern> agp,
294 Ptr<SatMobilityModel> satelliteMobility)
295{
296 NS_LOG_FUNCTION(this);
297 m_phyRx->SetAntennaGainPattern(agp, satelliteMobility);
298}
299
300void
301SatPhy::ConfigureRxCarriers(Ptr<SatPhyRxCarrierConf> carrierConf,
302 Ptr<SatSuperframeConf> superFrameConf)
303{
304 NS_LOG_FUNCTION(this);
305 m_phyRx->ConfigurePhyRxCarriers(carrierConf, superFrameConf);
306}
307
308void
309SatPhy::SetRxFadingContainer(Ptr<SatBaseFading> fadingContainer)
310{
311 NS_LOG_FUNCTION(this);
312
313 m_phyRx->SetFadingContainer(fadingContainer);
314}
315
316void
317SatPhy::SetTxFadingContainer(Ptr<SatBaseFading> fadingContainer)
318{
319 NS_LOG_FUNCTION(this);
320
321 m_phyTx->SetFadingContainer(fadingContainer);
322}
323
324void
325SatPhy::SetNodeInfo(const Ptr<SatNodeInfo> nodeInfo)
326{
327 NS_LOG_FUNCTION(this << nodeInfo);
328 m_nodeInfo = nodeInfo;
329 m_phyRx->SetNodeInfo(nodeInfo);
330}
331
332void
334{
335 NS_LOG_FUNCTION(this);
336 m_phyRx->BeginEndScheduling();
337}
338
339Ptr<SatPhyTx>
341{
342 NS_LOG_FUNCTION(this);
343 return m_phyTx;
344}
345
346Ptr<SatPhyRx>
348{
349 NS_LOG_FUNCTION(this);
350 return m_phyRx;
351}
352
353void
354SatPhy::SetPhyTx(Ptr<SatPhyTx> phyTx)
355{
356 NS_LOG_FUNCTION(this << phyTx);
357 m_phyTx = phyTx;
358}
359
360void
361SatPhy::SetPhyRx(Ptr<SatPhyRx> phyRx)
362{
363 NS_LOG_FUNCTION(this << phyRx);
364 m_phyRx = phyRx;
365}
366
367Ptr<SatChannel>
369{
370 NS_LOG_FUNCTION(this);
371 NS_ASSERT(m_phyTx);
372
373 return m_phyTx->GetChannel();
374}
375
376void
378 uint32_t carrierId,
379 Time duration,
381{
382 NS_LOG_FUNCTION(this << carrierId << duration);
383 NS_LOG_INFO("Sending a packet with carrierId: " << carrierId << " duration: " << duration);
384
385 // Add a SatPhyTimeTag tag for packet delay computation at the receiver end.
386 SetTimeTag(p);
387
388 // Add packet trace entry:
390
391 m_packetTrace(Simulator::Now(),
393 m_nodeInfo->GetNodeType(),
394 m_nodeInfo->GetNodeId(),
395 m_nodeInfo->GetMacAddress(),
397 ld,
399
400 // Create a new SatSignalParameters related to this packet transmission
401 Ptr<SatSignalParameters> txParams = CreateObject<SatSignalParameters>();
402 txParams->m_duration = duration;
403 txParams->m_phyTx = m_phyTx;
404 txParams->m_packetsInBurst = p;
405 txParams->m_satId = m_satId;
406 txParams->m_beamId = m_beamId;
407 txParams->m_carrierId = carrierId;
408 txParams->m_txPower_W = m_eirpWoGainW;
409 txParams->m_txInfo.modCod = txInfo.modCod;
410 txParams->m_txInfo.sliceId = txInfo.sliceId;
411 txParams->m_txInfo.fecBlockSizeInBytes = txInfo.fecBlockSizeInBytes;
412 txParams->m_txInfo.frameType = txInfo.frameType;
413 txParams->m_txInfo.waveformId = txInfo.waveformId;
414 txParams->m_txInfo.packetType = txInfo.packetType;
415 txParams->m_txInfo.crdsaUniquePacketId = txInfo.crdsaUniquePacketId;
416
417 m_phyTx->StartTx(txParams);
418}
419
420void
421SatPhy::SendPduWithParams(Ptr<SatSignalParameters> txParams)
422{
423 NS_LOG_FUNCTION(this << txParams);
424 NS_ASSERT(false);
425
430}
431
432void
433SatPhy::SetSatId(uint32_t satId)
434{
435 NS_LOG_FUNCTION(this << satId);
436 m_satId = satId;
437 m_phyTx->SetSatId(satId);
438 m_phyRx->SetSatId(satId);
439}
440
441bool
442SatPhy::SetBeamId(uint32_t beamId)
443{
444 NS_LOG_FUNCTION(this << beamId);
445
446 bool connect = m_beamId == 0 && beamId != 0;
447 bool disconnect = m_beamId != 0 && beamId == 0;
448
449 m_beamId = beamId;
450 m_phyTx->SetBeamId(beamId);
451 m_phyRx->SetBeamId(beamId);
452
453 return connect || disconnect;
454}
455
456void
458{
460 {
461 for (PacketContainer_t::const_iterator it = packets.begin(); it != packets.end(); ++it)
462 {
463 SatPhyTimeTag timeTag;
464 if (!(*it)->PeekPacketTag(timeTag))
465 {
466 (*it)->AddPacketTag(SatPhyTimeTag(Simulator::Now()));
467 }
468
469 (*it)->AddPacketTag(SatPhyLinkTimeTag(Simulator::Now()));
470 }
471 }
472}
473
479
485
486void
488{
489 NS_LOG_FUNCTION(this);
490
492 {
493 SatSignalParameters::PacketsInBurst_t::iterator it1;
494 for (it1 = packets.begin(); it1 != packets.end(); ++it1)
495 {
496 Address addr; // invalid address.
497 bool isTaggedWithAddress = false;
498 ByteTagIterator it2 = (*it1)->GetByteTagIterator();
499
500 while (!isTaggedWithAddress && it2.HasNext())
501 {
502 ByteTagIterator::Item item = it2.Next();
503
504 if (item.GetTypeId() == SatAddressTag::GetTypeId())
505 {
506 NS_LOG_DEBUG(this << " contains a SatAddressTag tag:" << " start="
507 << item.GetStart() << " end=" << item.GetEnd());
508 SatAddressTag addrTag;
509 item.GetTag(addrTag);
510 addr = addrTag.GetSourceAddress();
511 isTaggedWithAddress = true; // this will exit the while loop.
512 }
513 }
514
515 m_rxTrace(*it1, addr);
516
517 SatPhyLinkTimeTag linkTimeTag;
518 if ((*it1)->RemovePacketTag(linkTimeTag))
519 {
520 NS_LOG_DEBUG(this << " contains a SatPhyLinkTimeTag tag");
521 Time delay = Simulator::Now() - linkTimeTag.GetSenderLinkTimestamp();
522 m_rxLinkDelayTrace(delay, addr);
523 if (m_lastLinkDelay.IsZero() == false)
524 {
525 Time jitter = Abs(delay - m_lastLinkDelay);
526 m_rxLinkJitterTrace(jitter, addr);
527 }
528 m_lastLinkDelay = delay;
529 }
530
531 SatPhyTimeTag timeTag;
532 if ((*it1)->RemovePacketTag(timeTag))
533 {
534 NS_LOG_DEBUG(this << " contains a SatPhyTimeTag tag");
535 Time delay = Simulator::Now() - timeTag.GetSenderTimestamp();
536 m_rxDelayTrace(delay, addr);
537 if (m_lastDelay.IsZero() == false)
538 {
539 Time jitter = Abs(delay - m_lastDelay);
540 m_rxJitterTrace(jitter, addr);
541 }
542 m_lastDelay = delay;
543 }
544
545 } // end of `for (it1 = rxParams->m_packetsInBurst)`
546
547 } // end of `if (m_isStatisticsTagsEnabled)`
548}
549
550void
551SatPhy::ModcodTrace(Ptr<SatSignalParameters> rxParams)
552{
553 NS_LOG_FUNCTION(this);
554
555 Address addr;
556 SatAddressE2ETag satAddressE2ETag;
558 {
559 switch (GetSatLinkRxDir())
560 {
561 case SatEnums::LD_RETURN: {
562 SatSignalParameters::PacketsInBurst_t::iterator it1;
563 for (it1 = rxParams->m_packetsInBurst.begin(); it1 != rxParams->m_packetsInBurst.end();
564 ++it1)
565 {
566 if (!(*it1)->PeekPacketTag(satAddressE2ETag))
567 {
568 NS_FATAL_ERROR("SatUplinkInfoTag not found");
569 }
570 addr = satAddressE2ETag.GetE2ESourceAddress();
571 m_rxLinkModcodTrace(rxParams->m_txInfo.modCod, addr);
572 }
573 break;
574 }
576 SatSignalParameters::PacketsInBurst_t::iterator it1;
577 for (it1 = rxParams->m_packetsInBurst.begin(); it1 != rxParams->m_packetsInBurst.end();
578 ++it1)
579 {
580 if (!(*it1)->PeekPacketTag(satAddressE2ETag))
581 {
582 NS_FATAL_ERROR("SatUplinkInfoTag not found");
583 }
584 addr = satAddressE2ETag.GetE2EDestAddress();
585 m_rxLinkModcodTrace(rxParams->m_txInfo.modCod, addr);
586 }
587 break;
588 }
589 default:
590 NS_FATAL_ERROR("Incorrect satellite RX link direction");
591 }
592 }
593}
594
595void
596SatPhy::Receive(Ptr<SatSignalParameters> rxParams, bool phyError)
597{
598 NS_LOG_FUNCTION(this << rxParams << phyError);
599
600 // Add packet trace entry:
602
604
605 m_packetTrace(Simulator::Now(),
606 event,
607 m_nodeInfo->GetNodeType(),
608 m_nodeInfo->GetNodeId(),
609 m_nodeInfo->GetMacAddress(),
611 ld,
612 SatUtils::GetPacketInfo(rxParams->m_packetsInBurst));
613
614 if (phyError)
615 {
616 // If there was a PHY error, the packet is dropped here.
617 NS_LOG_INFO(this << " dropped " << rxParams->m_packetsInBurst.size()
618 << " packets because of PHY error.");
619 }
620 else
621 {
622 // Invoke the `Rx` and `RxDelay` trace sources.
623 RxTraces(rxParams->m_packetsInBurst);
624
625 ModcodTrace(rxParams);
626
627 // Pass the packet to the upper layer.
628 m_rxCallback(rxParams->m_packetsInBurst, rxParams);
629
630 } // end of else of `if (phyError)`
631}
632
633void
634SatPhy::CnoInfo(uint32_t satId,
635 uint32_t beamId,
636 Address source,
637 Address dest,
638 double cno,
639 bool isSatelliteMac)
640{
641 NS_LOG_FUNCTION(this << beamId << source << cno << isSatelliteMac);
642 m_cnoCallback(satId, beamId, source, dest, cno, isSatelliteMac);
643}
644
645void
647 uint32_t beamId,
648 uint32_t carrierId,
649 uint8_t allocationChannelId,
650 double averageNormalizedOfferedLoad)
651{
652 NS_LOG_FUNCTION(this << satId << beamId << carrierId << allocationChannelId
653 << averageNormalizedOfferedLoad);
655 beamId,
656 carrierId,
657 allocationChannelId,
658 averageNormalizedOfferedLoad);
659}
660
661void
663{
664 NS_LOG_FUNCTION(this << &cb);
665
667}
668
669} // namespace ns3
This class implements a tag that carries the satellite MAC of GW and UT.
Mac48Address GetE2ESourceAddress(void) const
Get E2E source MAC address.
Mac48Address GetE2EDestAddress(void) const
Get E2E destination MAC address.
This class implements a tag that carries the MAC address of the sender of the packet.
static TypeId GetTypeId()
Inherited from ObjectBase base class.
Address GetSourceAddress() const
Get the source address.
SatLinkDir_t
Link direction used for packet tracing.
SatPacketEvent_t
Packet event used for packet tracing.
The SatPhy models the basic physical layer of the satellite system.
virtual void SetTxAntennaGainPattern(Ptr< SatAntennaGainPattern > agp, Ptr< SatMobilityModel > satelliteMobility)
Set the transmit antenna gain pattern.
double m_txMaxAntennaGainDb
Configured maximum transmitter antenna gain in dBi.
TracedCallback< Time, SatEnums::SatPacketEvent_t, SatEnums::SatNodeType_t, uint32_t, Mac48Address, SatEnums::SatLogLevel_t, SatEnums::SatLinkDir_t, std::string > m_packetTrace
Trace callback used for packet tracing:
void SetNodeInfo(const Ptr< SatNodeInfo > nodeInfo)
Set the node info class.
void SetTimeTag(SatPhy::PacketContainer_t packets)
Set SatPhyTimeTag of packets.
void ConfigureRxCarriers(Ptr< SatPhyRxCarrierConf > carrierConf, Ptr< SatSuperframeConf > superFrameConf)
Configure Rx carriers.
void Initialize()
Initialize phy.
virtual Ptr< SatPhyTx > GetPhyTx() const
Get the SatPhyTx pointer.
CreateParam_t m_params
Satellite physical layer construction parameters.
virtual void SetRxAntennaGainPattern(Ptr< SatAntennaGainPattern > agp, Ptr< SatMobilityModel > satelliteMobility)
Set the receive antenna gain pattern.
TracedCallback< const Time &, const Address & > m_rxDelayTrace
Traced callback for all received packets, including delay information and the address of the senders.
TracedCallback< const Time &, const Address & > m_rxJitterTrace
Traced callback for all received packets, including jitter information and the address of the senders...
void CnoInfo(uint32_t satId, uint32_t beamId, Address source, Address destination, double cno, bool isSatelliteMac)
Function for getting the C/NO information.
void SetSatId(uint32_t satId)
Set the satId this PHY is connected with.
TracedCallback< const Time &, const Address & > m_rxLinkDelayTrace
Traced callback for all received packets, including link delay information and the address of the sen...
Ptr< SatPhyRx > m_phyRx
Pointer to internal SatPhyRx instance.
virtual SatEnums::SatLinkDir_t GetSatLinkTxDir()
Get the link TX direction.
virtual SatEnums::SatLinkDir_t GetSatLinkRxDir()
Get the link RX direction.
uint32_t m_satId
Satellite ID.
void BeginEndScheduling()
Begin frame/window end scheduling for processes utilizing frame length as interval.
virtual void SendPduWithParams(Ptr< SatSignalParameters > rxParams)
Send Pdu to the PHY tx module (for satellite switch packet forwarding).
uint32_t m_beamId
Beam ID.
double m_rxAntennaLossDb
Configured receiver antenna loss in Dbs.
double m_defaultFadingValue
Default fading value.
virtual Ptr< SatPhyRx > GetPhyRx() const
Get the SatPhyRx pointer.
static TypeId GetTypeId(void)
Derived from Object.
double m_txMaxPowerDbw
Configured maximum transmitter power in DbWs.
void SetRxFadingContainer(Ptr< SatBaseFading > fadingContainer)
Set fading container.
void AverageNormalizedOfferedRandomAccessLoadInfo(uint32_t satId, uint32_t beamId, uint32_t carrierId, uint8_t allocationChannelId, double averageNormalizedOfferedLoad)
Function for getting the normalized offered load of the specific random access allocation channel.
Ptr< SatChannel > GetTxChannel()
Get the Tx satellite channel.
Ptr< SatNodeInfo > m_nodeInfo
Node info containing node related information, such as node type, node id and MAC address (of the Sat...
TracedCallback< uint32_t, const Address & > m_rxLinkModcodTrace
Traced callback for all received packets, including link MODCOD information and the address of the se...
double m_rxNoiseTemperatureDbk
Configured receiver noise temperature in dBK.
double m_rxMaxAntennaGainDb
Configured maximum receiver antenna gain in dBi.
virtual void SendPdu(PacketContainer_t, uint32_t carrierId, Time duration, SatSignalParameters::txInfo_s txInfo)
Send Pdu to the PHY tx module (for initial transmissions from either UT or GW).
void SetChannelPairGetterCallback(SatPhy::ChannelPairGetterCallback cb)
Set the channel pair getter callback.
virtual void RxTraces(SatPhy::PacketContainer_t packets)
Invoke the Rx trace source for each received packet.
virtual void Receive(Ptr< SatSignalParameters > rxParams, bool phyError)
Receives packets from lower layer.
double m_txOutputLossDb
Configured transmitter output loss in Dbs.
virtual void NotifyConstructionCompleted() override
Notifier called once the ObjectBase is fully constructed.
SatPhy::ChannelPairGetterCallback m_retrieveChannelPair
Callback for retrieving SatChannel pairs by beam.
TracedCallback< Ptr< const Packet >, const Address & > m_rxTrace
Traced callback for all received packets, including the address of the senders.
SatPhy(void)
Default constructor.
SatPhy::AverageNormalizedOfferedLoadCallback m_avgNormalizedOfferedLoadCallback
Average normalized offered load callback.
double m_eirpWoGainW
Calculated EIRP without gain in W.
virtual void SetPhyTx(Ptr< SatPhyTx > phyTx)
Set the SatPhyTx module.
Time m_lastDelay
Last delay measurement.
double m_txPointingLossDb
Configured transmitter pointing loss in Dbs.
Ptr< SatPhyTx > m_phyTx
Pointer to internal SatPhyTx instance.
void ModcodTrace(Ptr< SatSignalParameters > rxParams)
Invoke the RxLinkModcod trace source for each received packet.
double m_txAntennaLossDb
Configured transmitter antenna loss in Dbs.
bool m_isStatisticsTagsEnabled
EnableStatisticsTags attribute.
virtual void DoDispose(void)
Dispose of SatPhy.
virtual ~SatPhy()
Destructor.
Time m_lastLinkDelay
Last delay measurement for link.
void SetTxFadingContainer(Ptr< SatBaseFading > fadingContainer)
Set fading container.
double CalculateSinr(double sinr, double otherInterference)
Calculate final SINR with PHY specific parameters and given calculated SINR.
SatSignalParameters::PacketsInBurst_t PacketContainer_t
Define PacketContainer in SatPhy.
double m_txOboLossDb
Configured transmitter OBO loss in Dbs.
virtual void SetPhyRx(Ptr< SatPhyRx > phyRx)
Set the SatPhyRx module.
SatPhy::CnoCallback m_cnoCallback
The C/N0 info callback.
Callback< SatChannelPair::ChannelPair_t, uint32_t, uint32_t > ChannelPairGetterCallback
Callback for retrieving a pair of SatChannel associated to a beam.
virtual void DoInitialize(void)
Initialization of SatPhy.
SatPhy::ReceiveCallback m_rxCallback
The upper layer package receive callback.
TracedCallback< const Time &, const Address & > m_rxLinkJitterTrace
Traced callback for all received packets, including link jitter information and the address of the se...
bool SetBeamId(uint32_t beamId)
Set the beamId this PHY is connected with.
Time tag used to identify the time when packet is enqueued at PHY on first link between GW and UT lev...
Time GetSenderTimestamp(void) const
Get sender time stamp of this tag.
static T DbWToW(T dbw)
Converts Decibel Watts to Watts.
static std::string GetPacketInfo(const Ptr< const Packet > p)
Get packet information in std::string for printing purposes.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.
Creation parameters for base PHY object.
Struct for storing the packet specific Tx information.