Loading...
Searching...
No Matches
satellite-orbiter-net-device.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: Sami Rantanen <sami.rantanen@magister.fi>
19 */
20
22
24#include "satellite-channel.h"
26#include "satellite-id-mapper.h"
27#include "satellite-mac.h"
32#include "satellite-phy-rx.h"
33#include "satellite-phy-tx.h"
34#include "satellite-phy.h"
35#include "satellite-time-tag.h"
37
38#include "ns3/channel.h"
39#include "ns3/error-model.h"
40#include "ns3/ipv4-header.h"
41#include "ns3/ipv4-l3-protocol.h"
42#include "ns3/log.h"
43#include "ns3/node.h"
44#include "ns3/object-map.h"
45#include "ns3/packet.h"
46#include "ns3/pointer.h"
47#include "ns3/singleton.h"
48#include "ns3/trace-source-accessor.h"
49#include "ns3/uinteger.h"
50
51#include <limits>
52#include <map>
53#include <set>
54#include <utility>
55#include <vector>
56
57NS_LOG_COMPONENT_DEFINE("SatOrbiterNetDevice");
58
59namespace ns3
60{
61
62NS_OBJECT_ENSURE_REGISTERED(SatOrbiterNetDevice);
63
64TypeId
66{
67 static TypeId tid =
68 TypeId("ns3::SatOrbiterNetDevice")
69 .SetParent<NetDevice>()
70 .AddAttribute("ReceiveErrorModel",
71 "The receiver error model used to simulate packet loss",
72 PointerValue(),
73 MakePointerAccessor(&SatOrbiterNetDevice::m_receiveErrorModel),
74 MakePointerChecker<ErrorModel>())
75 .AddAttribute("UserPhy",
76 "The User Phy objects attached to this device.",
77 ObjectMapValue(),
78 MakeObjectMapAccessor(&SatOrbiterNetDevice::m_userPhy),
79 MakeObjectMapChecker<SatPhy>())
80 .AddAttribute("FeederPhy",
81 "The Feeder Phy objects attached to this device.",
82 ObjectMapValue(),
83 MakeObjectMapAccessor(&SatOrbiterNetDevice::m_feederPhy),
84 MakeObjectMapChecker<SatPhy>())
85 .AddAttribute("UserMac",
86 "The User MAC objects attached to this device.",
87 ObjectMapValue(),
88 MakeObjectMapAccessor(&SatOrbiterNetDevice::m_userMac),
89 MakeObjectMapChecker<SatMac>())
90 .AddAttribute("FeederMac",
91 "The Feeder MAC objects attached to this device.",
92 ObjectMapValue(),
93 MakeObjectMapAccessor(&SatOrbiterNetDevice::m_feederMac),
94 MakeObjectMapChecker<SatMac>())
95 .AddAttribute("EnableStatisticsTags",
96 "If true, some tags will be added to each transmitted packet to assist "
97 "with statistics computation",
98 BooleanValue(false),
100 MakeBooleanChecker())
101 .AddTraceSource("PacketTrace",
102 "Packet event trace",
103 MakeTraceSourceAccessor(&SatOrbiterNetDevice::m_packetTrace),
104 "ns3::SatTypedefs::PacketTraceCallback")
105 .AddTraceSource("Tx",
106 "A packet to be sent",
107 MakeTraceSourceAccessor(&SatOrbiterNetDevice::m_txTrace),
108 "ns3::Packet::TracedCallback")
109 .AddTraceSource("SignallingTx",
110 "A signalling packet to be sent",
111 MakeTraceSourceAccessor(&SatOrbiterNetDevice::m_signallingTxTrace),
112 "ns3::SatTypedefs::PacketDestinationAddressCallback")
113 .AddTraceSource("RxFeeder",
114 "A packet received on feeder",
115 MakeTraceSourceAccessor(&SatOrbiterNetDevice::m_rxFeederTrace),
116 "ns3::SatTypedefs::PacketSourceAddressCallback")
117 .AddTraceSource("RxUser",
118 "A packet received on user",
119 MakeTraceSourceAccessor(&SatOrbiterNetDevice::m_rxUserTrace),
120 "ns3::SatTypedefs::PacketSourceAddressCallback")
121 .AddTraceSource("RxFeederLinkDelay",
122 "A packet is received with feeder link delay information",
123 MakeTraceSourceAccessor(&SatOrbiterNetDevice::m_rxFeederLinkDelayTrace),
124 "ns3::SatTypedefs::PacketDelayAddressCallback")
125 .AddTraceSource(
126 "RxFeederLinkJitter",
127 "A packet is received with feeder link jitter information",
128 MakeTraceSourceAccessor(&SatOrbiterNetDevice::m_rxFeederLinkJitterTrace),
129 "ns3::SatTypedefs::PacketJitterAddressCallback")
130 .AddTraceSource("RxUserLinkDelay",
131 "A packet is received with feeder link delay information",
132 MakeTraceSourceAccessor(&SatOrbiterNetDevice::m_rxUserLinkDelayTrace),
133 "ns3::SatTypedefs::PacketDelayAddressCallback")
134 .AddTraceSource("RxUserLinkJitter",
135 "A packet is received with feeder link jitter information",
136 MakeTraceSourceAccessor(&SatOrbiterNetDevice::m_rxUserLinkJitterTrace),
137 "ns3::SatTypedefs::PacketJitterAddressCallback");
138 return tid;
139}
140
142 : m_node(0),
143 m_mtu(0xffff),
144 m_ifIndex(0)
145{
146 NS_LOG_FUNCTION(this);
147}
148
149void
151 Ptr<SatSignalParameters> rxParams)
152{
153 NS_LOG_FUNCTION(this << rxParams->m_packetsInBurst.size() << rxParams);
154 NS_LOG_INFO("Receiving a packet at the satellite from user link");
155
157 {
160 DynamicCast<SatOrbiterFeederPhy>(m_feederPhy[rxParams->m_beamId])
161 ->SendPduWithParams(rxParams);
162 break;
163 }
165 for (SatPhy::PacketContainer_t::const_iterator it = rxParams->m_packetsInBurst.begin();
166 it != rxParams->m_packetsInBurst.end();
167 ++it)
168 {
169 DynamicCast<SatOrbiterFeederMac>(m_feederMac[rxParams->m_beamId])->EnquePacket(*it);
170 }
171
172 break;
173 }
175 NS_FATAL_ERROR(
176 "SatOrbiterNetDevice::ReceiveUser should not be used in case of network regeneration");
177 }
178 default: {
179 NS_FATAL_ERROR("Not implemented yet");
180 }
181 }
182}
183
184void
186 Ptr<SatSignalParameters> rxParams)
187{
188 NS_LOG_FUNCTION(this << rxParams->m_packetsInBurst.size() << rxParams);
189 NS_LOG_INFO("Receiving a packet at the satellite from feeder link");
190
192 {
195 DynamicCast<SatOrbiterUserPhy>(m_userPhy[rxParams->m_beamId])->SendPduWithParams(rxParams);
196 break;
197 }
199 NS_FATAL_ERROR("SatOrbiterNetDevice::ReceiveFeeder should not be used in case of network "
200 "regeneration");
201 }
202 default: {
203 NS_FATAL_ERROR("Not implemented yet");
204 }
205 }
206}
207
208void
210{
211 NS_LOG_FUNCTION(this << em);
213}
214
215void
217 SatEnums::RegenerationMode_t forwardLinkRegenerationMode)
218{
219 m_forwardLinkRegenerationMode = forwardLinkRegenerationMode;
220}
221
222void
224 SatEnums::RegenerationMode_t returnLinkRegenerationMode)
225{
226 m_returnLinkRegenerationMode = returnLinkRegenerationMode;
227}
228
229void
231{
232 m_nodeId = nodeId;
233}
234
235void
237{
238 NS_LOG_FUNCTION(this << index);
239 m_ifIndex = index;
240}
241
242uint32_t
244{
245 NS_LOG_FUNCTION(this);
246 return m_ifIndex;
247}
248
249void
251{
252 NS_LOG_FUNCTION(this << address);
253 m_address = Mac48Address::ConvertFrom(address);
254}
255
256Address
258{
259 //
260 // Implicit conversion from Mac48Address to Address
261 //
262 NS_LOG_FUNCTION(this);
263 return m_address;
264}
265
266bool
268{
269 NS_LOG_FUNCTION(this << mtu);
270 m_mtu = mtu;
271 return true;
272}
273
274uint16_t
276{
277 NS_LOG_FUNCTION(this);
278 return m_mtu;
279}
280
281bool
283{
284 NS_LOG_FUNCTION(this);
285 return true;
286}
287
288void
290{
291 NS_LOG_FUNCTION(this << &callback);
292}
293
294bool
296{
297 NS_LOG_FUNCTION(this);
298 return true;
299}
300
301Address
303{
304 NS_LOG_FUNCTION(this);
305 return Mac48Address("ff:ff:ff:ff:ff:ff");
306}
307
308bool
310{
311 NS_LOG_FUNCTION(this);
312 return false;
313}
314
315Address
316SatOrbiterNetDevice::GetMulticast(Ipv4Address multicastGroup) const
317{
318 NS_LOG_FUNCTION(this << multicastGroup);
319 return Mac48Address::GetMulticast(multicastGroup);
320}
321
322Address
324{
325 NS_LOG_FUNCTION(this << addr);
326 return Mac48Address::GetMulticast(addr);
327}
328
329bool
331{
332 NS_LOG_FUNCTION(this);
333 return false;
334}
335
336bool
338{
339 NS_LOG_FUNCTION(this);
340 return false;
341}
342
343bool
344SatOrbiterNetDevice::Send(Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber)
345{
346 NS_LOG_FUNCTION(this << packet << dest << protocolNumber);
347
352 NS_ASSERT(false);
353 return false;
354}
355
356bool
358 const Address& source,
359 const Address& dest,
360 uint16_t protocolNumber)
361{
362 NS_LOG_FUNCTION(this << packet << source << dest << protocolNumber);
363
368 NS_ASSERT(false);
369 return false;
370}
371
372Ptr<Node>
374{
375 NS_LOG_FUNCTION(this);
376 return m_node;
377}
378
379void
381{
382 NS_LOG_FUNCTION(this << node);
383 m_node = node;
384}
385
386bool
388{
389 NS_LOG_FUNCTION(this);
390 return false;
391}
392
393void
394SatOrbiterNetDevice::SetReceiveCallback(NetDevice::ReceiveCallback cb)
395{
396 NS_LOG_FUNCTION(this << &cb);
397}
398
399void
401{
402 NS_LOG_FUNCTION(this);
403 m_node = 0;
405 m_userPhy.clear();
406 m_feederPhy.clear();
407 m_userMac.clear();
408 m_feederMac.clear();
409 m_addressMapFeeder.clear();
410 m_addressMapUser.clear();
411 NetDevice::DoDispose();
412}
413
414void
416{
417 NS_LOG_FUNCTION(this << &cb);
419}
420
421bool
423{
424 NS_LOG_FUNCTION(this);
425 return false;
426}
427
428Ptr<Channel>
430{
431 NS_LOG_FUNCTION(this);
432 return nullptr;
433}
434
435void
436SatOrbiterNetDevice::AddUserPhy(Ptr<SatPhy> phy, uint32_t beamId)
437{
438 NS_LOG_FUNCTION(this << phy << beamId);
439 m_userPhy.insert(std::pair<uint32_t, Ptr<SatPhy>>(beamId, phy));
440}
441
442void
443SatOrbiterNetDevice::AddFeederPhy(Ptr<SatPhy> phy, uint32_t beamId)
444{
445 NS_LOG_FUNCTION(this << phy << beamId);
446 m_feederPhy.insert(std::pair<uint32_t, Ptr<SatPhy>>(beamId, phy));
447}
448
449Ptr<SatPhy>
451{
452 if (m_userPhy.count(beamId))
453 {
454 return m_userPhy[beamId];
455 }
456 NS_FATAL_ERROR("User Phy does not exist for beam " << beamId);
457}
458
459Ptr<SatPhy>
461{
462 if (m_userPhy.count(beamId))
463 {
464 return m_feederPhy[beamId];
465 }
466 NS_FATAL_ERROR("User Phy does not exist for beam " << beamId);
467}
468
469std::map<uint32_t, Ptr<SatPhy>>
474
475std::map<uint32_t, Ptr<SatPhy>>
480
481void
482SatOrbiterNetDevice::AddUserMac(Ptr<SatMac> mac, uint32_t beamId)
483{
484 NS_LOG_FUNCTION(this << mac << beamId);
485 m_userMac.insert(std::pair<uint32_t, Ptr<SatMac>>(beamId, mac));
486}
487
488void
489SatOrbiterNetDevice::AddFeederMac(Ptr<SatMac> mac, Ptr<SatMac> macUsed, uint32_t beamId)
490{
491 NS_LOG_FUNCTION(this << mac << macUsed << beamId);
492 m_feederMac.insert(std::pair<uint32_t, Ptr<SatMac>>(beamId, macUsed));
493 m_allFeederMac.insert(std::pair<uint32_t, Ptr<SatMac>>(beamId, mac));
494}
495
496Ptr<SatMac>
498{
499 if (m_userMac.count(beamId))
500 {
501 return m_userMac[beamId];
502 }
503 NS_FATAL_ERROR("User MAC does not exist for beam " << beamId);
504}
505
506Ptr<SatMac>
508{
509 if (m_feederMac.count(beamId))
510 {
511 return m_feederMac[beamId];
512 }
513 NS_FATAL_ERROR("User MAC does not exist for beam " << beamId);
514}
515
516std::map<uint32_t, Ptr<SatMac>>
521
522std::map<uint32_t, Ptr<SatMac>>
527
528std::map<uint32_t, Ptr<SatMac>>
533
534void
535SatOrbiterNetDevice::AddFeederPair(uint32_t beamId, Mac48Address satelliteFeederAddress)
536{
537 NS_LOG_FUNCTION(this << beamId << satelliteFeederAddress);
538
539 m_addressMapFeeder.insert(std::pair<uint32_t, Mac48Address>(beamId, satelliteFeederAddress));
540}
541
542void
543SatOrbiterNetDevice::AddUserPair(uint32_t beamId, Mac48Address satelliteUserAddress)
544{
545 NS_LOG_FUNCTION(this << beamId << satelliteUserAddress);
546
547 m_addressMapUser.insert(std::pair<uint32_t, Mac48Address>(beamId, satelliteUserAddress));
548}
549
550Mac48Address
552{
553 NS_LOG_FUNCTION(this << beamId);
554
555 if (m_addressMapFeeder.count(beamId))
556 {
557 return m_addressMapFeeder[beamId];
558 }
559 NS_FATAL_ERROR("Satellite MAC does not exist for beam " << beamId);
560}
561
562Mac48Address
564{
565 NS_LOG_FUNCTION(this << beamId);
566
567 if (m_addressMapUser.count(beamId))
568 {
569 return m_addressMapUser[beamId];
570 }
571 NS_FATAL_ERROR("Satellite MAC does not exist for beam " << beamId);
572}
573
574Address
576{
577 NS_LOG_FUNCTION(this << packet);
578
579 Address utAddr; // invalid address.
580
581 SatAddressE2ETag addressE2ETag;
582 if (packet->PeekPacketTag(addressE2ETag))
583 {
584 NS_LOG_DEBUG(this << " contains a SatE2E tag");
585 if (ld == SatEnums::LD_FORWARD)
586 {
587 utAddr = addressE2ETag.GetE2EDestAddress();
588 }
589 else if (ld == SatEnums::LD_RETURN)
590 {
591 utAddr = addressE2ETag.GetE2ESourceAddress();
592 }
593 }
594
595 return utAddr;
596}
597
598void
599SatOrbiterNetDevice::ConnectGw(Mac48Address gwAddress, uint32_t beamId)
600{
601 NS_LOG_FUNCTION(this << gwAddress << beamId);
602
603 NS_ASSERT_MSG(m_gwConnected.find(gwAddress) == m_gwConnected.end(),
604 "Cannot add same GW twice to map");
605
606 m_gwConnected.insert({gwAddress, beamId});
607 Singleton<SatIdMapper>::Get()->AttachMacToSatIdIsl(gwAddress, m_nodeId);
608
609 if (m_feederMac.find(beamId) != m_feederMac.end())
610 {
611 Ptr<SatOrbiterFeederMac> orbiterFeederMac =
612 DynamicCast<SatOrbiterFeederMac>(GetFeederMac(beamId));
613 NS_ASSERT(orbiterFeederMac != nullptr);
614 {
615 orbiterFeederMac->AddPeer(gwAddress);
616 }
617 }
618}
619
620void
621SatOrbiterNetDevice::DisconnectGw(Mac48Address gwAddress, uint32_t beamId)
622{
623 NS_LOG_FUNCTION(this << gwAddress << beamId);
624
625 NS_ASSERT_MSG(m_gwConnected.find(gwAddress) != m_gwConnected.end(), "GW not in map");
626
627 m_gwConnected.erase(gwAddress);
628 Singleton<SatIdMapper>::Get()->RemoveMacToSatIdIsl(gwAddress);
629
630 if (m_feederMac.find(beamId) != m_feederMac.end())
631 {
632 Ptr<SatOrbiterFeederMac> orbiterFeederMac =
633 DynamicCast<SatOrbiterFeederMac>(GetFeederMac(beamId));
634 NS_ASSERT(orbiterFeederMac != nullptr);
635 {
636 orbiterFeederMac->RemovePeer(gwAddress);
637 }
638 }
639}
640
641std::set<Mac48Address>
643{
644 NS_LOG_FUNCTION(this);
645
646 std::set<Mac48Address> gws;
647 std::map<Mac48Address, uint32_t>::iterator it;
648 for (it = m_gwConnected.begin(); it != m_gwConnected.end(); it++)
649 {
650 gws.insert(it->first);
651 }
652
653 return gws;
654}
655
656std::set<Mac48Address>
658{
659 NS_LOG_FUNCTION(this);
660
661 std::set<Mac48Address> uts;
662 std::map<Mac48Address, uint32_t>::iterator it;
663 for (it = m_utConnected.begin(); it != m_utConnected.end(); it++)
664 {
665 uts.insert(it->first);
666 }
667
668 return uts;
669}
670
671void
672SatOrbiterNetDevice::AddIslsNetDevice(Ptr<PointToPointIslNetDevice> islNetDevices)
673{
674 NS_LOG_FUNCTION(this);
675
676 m_islNetDevices.push_back(islNetDevices);
677}
678
679std::vector<Ptr<PointToPointIslNetDevice>>
681{
682 NS_LOG_FUNCTION(this);
683
684 return m_islNetDevices;
685}
686
687void
688SatOrbiterNetDevice::SetArbiter(Ptr<SatIslArbiter> arbiter)
689{
690 NS_LOG_FUNCTION(this << arbiter);
691
692 m_arbiter = arbiter;
693}
694
695Ptr<SatIslArbiter>
697{
698 NS_LOG_FUNCTION(this);
699
700 return m_arbiter;
701}
702
703void
704SatOrbiterNetDevice::SendToIsl(Ptr<Packet> packet, Mac48Address destination)
705{
706 NS_LOG_FUNCTION(this << packet << destination);
707
708 // If ISLs, arbiter must be set
709 NS_ASSERT_MSG(m_arbiter != nullptr, "Arbiter not set");
710
711 if (destination.IsBroadcast())
712 {
713 // Send to all interfaces
714 for (uint32_t i = 0; i < m_islNetDevices.size(); i++)
715 {
716 m_islNetDevices[i]->Send(packet->Copy(), Address(), 0x0800);
717 }
718 return;
719 }
720
721 int32_t islInterfaceIndex = m_arbiter->BaseDecide(packet, destination);
722
723 if (islInterfaceIndex < 0)
724 {
725 NS_LOG_INFO("Cannot route packet form node " << m_nodeId << " to " << destination);
726 }
727 else if (uint32_t(islInterfaceIndex) >= m_islNetDevices.size())
728 {
729 NS_FATAL_ERROR("Incorrect interface index from arbiter: "
730 << islInterfaceIndex << ". Max is " << m_islNetDevices.size() - 1);
731 }
732 else
733 {
734 m_islNetDevices[islInterfaceIndex]->Send(packet, Address(), 0x0800);
735 }
736}
737
738} // 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.
SatLinkDir_t
Link direction used for packet tracing.
RegenerationMode_t
The regeneration mode used in satellites.
SatOrbiterNetDevice to be utilized in geostationary satellite.
Ptr< SatIslArbiter > m_arbiter
Arbiter used to route on ISLs.
void ReceiveFeeder(SatPhy::PacketContainer_t packets, Ptr< SatSignalParameters > rxParams)
Receive the packet from the lower layers.
std::map< uint32_t, Mac48Address > m_addressMapFeeder
std::map< uint32_t, Mac48Address > m_addressMapUser
void SetReceiveErrorModel(Ptr< ErrorModel > em)
Attach a receive ErrorModel to the SatOrbiterNetDevice.
virtual bool IsPointToPoint(void) const
std::set< Mac48Address > GetGwConnected()
The the list of MAC GW connected to this satellite.
virtual bool SendFrom(Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber)
void ConnectGw(Mac48Address gwAddress, uint32_t beamId)
Connect a GW to this satellite.
void DisconnectGw(Mac48Address gwAddress, uint32_t beamId)
Disconnect a GW to this satellite.
std::map< Mac48Address, uint32_t > m_gwConnected
Set containing all connected GWs.
SatEnums::RegenerationMode_t m_forwardLinkRegenerationMode
virtual uint32_t GetIfIndex(void) const
std::vector< Ptr< PointToPointIslNetDevice > > GetIslsNetDevices()
Get all the ISL Net devices.
std::map< uint32_t, Ptr< SatMac > > GetFeederMac()
Get all Feeder MAC objects attached to this satellite that are in use.
TracedCallback< Ptr< const Packet > > m_txTrace
Traced callback for all packets received to be transmitted.
virtual void AddLinkChangeCallback(Callback< void > callback)
void AddUserPair(uint32_t beamId, Mac48Address satelliteUserAddress)
Add an entry in the database to get satellite user address from beam ID.
Mac48Address GetSatelliteUserAddress(uint32_t beamId)
Get satellite user entry from associated beam ID.
virtual Address GetMulticast(Ipv4Address multicastGroup) const
std::set< Mac48Address > GetUtConnected()
The the list of UT MAC connected to this satellite.
void SetArbiter(Ptr< SatIslArbiter > arbiter)
Set the arbiter for ISL routing.
Address GetRxUtAddress(Ptr< Packet > packet, SatEnums::SatLinkDir_t ld)
Get UT MAC address associated to this packet.
std::map< uint32_t, Ptr< SatPhy > > GetUserPhy()
Get all User Phy objects attached to this satellite.
std::vector< Ptr< PointToPointIslNetDevice > > m_islNetDevices
List of ISLs starting from this node.
void ReceiveUser(SatPhy::PacketContainer_t packets, Ptr< SatSignalParameters > rxParams)
Receive the packet from the lower layers.
virtual Ptr< Node > GetNode(void) const
void SetForwardLinkRegenerationMode(SatEnums::RegenerationMode_t forwardLinkRegenerationMode)
Set the forward link regeneration mode.
TracedCallback< const Time &, const Address & > m_rxUserLinkJitterTrace
Traced callback for all received packets, including user link jitter information and the address of t...
TracedCallback< Ptr< const Packet >, const Address & > m_rxUserTrace
Traced callback for all received packets on user, including the address of the senders.
TracedCallback< Ptr< const Packet >, const Address & > m_signallingTxTrace
Traced callback for all signalling (control message) packets sent, including the destination address.
TracedCallback< Ptr< const Packet >, const Address & > m_rxFeederTrace
Traced callback for all received packets on feeder, including the address of the senders.
virtual void SetPromiscReceiveCallback(PromiscReceiveCallback cb)
TracedCallback< const Time &, const Address & > m_rxFeederLinkDelayTrace
Traced callback for all received packets, including feeder link delay information and the address of ...
std::map< uint32_t, Ptr< SatMac > > m_feederMac
virtual Address GetAddress(void) const
virtual void SetAddress(Address address)
void AddFeederPair(uint32_t beamId, Mac48Address satelliteFeederAddress)
Add an entry in the database to get satellite feeder address from beam ID.
std::map< uint32_t, Ptr< SatMac > > m_userMac
virtual bool SupportsSendFrom(void) const
std::map< uint32_t, Ptr< SatPhy > > m_userPhy
void AddUserMac(Ptr< SatMac > mac, uint32_t beamId)
Add the User MAC object for the beam.
SatEnums::RegenerationMode_t m_returnLinkRegenerationMode
void AddFeederPhy(Ptr< SatPhy > phy, uint32_t beamId)
Add the Feeder Phy object for the beam.
void SetReturnLinkRegenerationMode(SatEnums::RegenerationMode_t returnLinkRegenerationMode)
Set the return link regeneration mode.
void AddFeederMac(Ptr< SatMac > mac, Ptr< SatMac > macUsed, uint32_t beamId)
Add the Feeder MAC object for the beam.
Ptr< SatIslArbiter > GetArbiter()
Get the arbiter for ISL routing.
std::map< uint32_t, Ptr< SatPhy > > GetFeederPhy()
Get all Feeder Phy objects attached to this satellite.
std::map< uint32_t, Ptr< SatMac > > GetUserMac()
Get all User MAC objects attached to this satellite.
void SendToIsl(Ptr< Packet > packet, Mac48Address destination)
Send a packet to ISL.
NetDevice::PromiscReceiveCallback m_promiscCallback
TracedCallback< Time, SatEnums::SatPacketEvent_t, SatEnums::SatNodeType_t, uint32_t, Mac48Address, SatEnums::SatLogLevel_t, SatEnums::SatLinkDir_t, std::string > m_packetTrace
virtual bool SetMtu(const uint16_t mtu)
std::map< uint32_t, Ptr< SatMac > > GetAllFeederMac()
Get all Feeder MAC objects attached to this satellite.
std::map< uint32_t, Ptr< SatMac > > m_allFeederMac
TracedCallback< const Time &, const Address & > m_rxUserLinkDelayTrace
Traced callback for all received packets, including user link delay information and the address of th...
void AddUserPhy(Ptr< SatPhy > phy, uint32_t beamId)
Add the User Phy object for the beam.
virtual void SetReceiveCallback(NetDevice::ReceiveCallback cb)
TracedCallback< const Time &, const Address & > m_rxFeederLinkJitterTrace
Traced callback for all received packets, including feeder link jitter information and the address of...
virtual Ptr< Channel > GetChannel(void) const
static TypeId GetTypeId(void)
Get the type ID.
Mac48Address GetSatelliteFeederAddress(uint32_t beamId)
Get satellite feeder entry from associated beam ID.
virtual Address GetBroadcast(void) const
virtual void SetIfIndex(const uint32_t index)
std::map< uint32_t, Ptr< SatPhy > > m_feederPhy
void AddIslsNetDevice(Ptr< PointToPointIslNetDevice > islNetDevices)
Add a ISL Net Device to this satellite.
virtual uint16_t GetMtu(void) const
std::map< Mac48Address, uint32_t > m_utConnected
Set containing all connected UTs.
virtual void DoDispose(void)
Dispose of this class instance.
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
virtual void SetNode(Ptr< Node > node)
SatSignalParameters::PacketsInBurst_t PacketContainer_t
Define PacketContainer in SatPhy.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.