Loading...
Searching...
No Matches
satellite-id-mapper.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: Frans Laakso <frans.laakso@magister.fi>
19 */
20
21#include "satellite-id-mapper.h"
22
25
26#include "ns3/address.h"
27#include "ns3/log.h"
28#include "ns3/node.h"
29
30#include <iostream>
31#include <map>
32#include <sstream>
33#include <string>
34#include <utility>
35
36NS_LOG_COMPONENT_DEFINE("SatIdMapper");
37
38namespace ns3
39{
40
41NS_OBJECT_ENSURE_REGISTERED(SatIdMapper);
42
43TypeId
45{
46 static TypeId tid =
47 TypeId("ns3::SatIdMapper").SetParent<Object>().AddConstructor<SatIdMapper>();
48 return tid;
49}
50
52 : m_traceIdIndex(1),
53 m_utIdIndex(1),
56 m_enableMapPrint(false)
57{
58 NS_LOG_FUNCTION(this);
59}
60
62{
63 NS_LOG_FUNCTION(this);
64
65 Reset();
66}
67
68void
70{
71 NS_LOG_FUNCTION(this);
72
73 Reset();
74
75 Object::DoDispose();
76}
77
78void
80{
81 NS_LOG_FUNCTION(this);
82
84 {
86 }
87
88 // Trace ID maps
89
90 if (!m_macToTraceIdMap.empty())
91 {
92 m_macToTraceIdMap.clear();
93 }
95
96 // UT ID maps
97
98 if (!m_macToUtIdMap.empty())
99 {
100 m_macToUtIdMap.clear();
101 }
102 m_utIdIndex = 1;
103
104 // UT user ID maps
105
106 if (!m_macToUtUserIdMap.empty())
107 {
108 m_macToUtUserIdMap.clear();
109 }
110 m_utUserIdIndex = 1;
111
112 // SAT ID maps
113
114 if (!m_macToSatIdMap.empty())
115 {
116 m_macToSatIdMap.clear();
117 }
118
119 // Beam ID maps
120
121 if (!m_macToBeamIdMap.empty())
122 {
123 m_macToBeamIdMap.clear();
124 }
125
126 // Group ID maps
127
128 if (!m_macToGroupIdMap.empty())
129 {
130 m_macToGroupIdMap.clear();
131 }
132
133 // GW ID maps
134
135 if (!m_macToGwIdMap.empty())
136 {
137 m_macToGwIdMap.clear();
138 }
139
140 // GW user ID maps
141
142 if (!m_macToGwUserIdMap.empty())
143 {
144 m_macToGwUserIdMap.clear();
145 }
146 m_gwUserIdIndex = 1;
147
148 // SAT ID maps
149
150 if (!m_macToSatIdIslMap.empty())
151 {
152 m_macToSatIdIslMap.clear();
153 }
154
155 m_enableMapPrint = false;
156}
157
158void
160{
161 std::cout << "SatIdMapper GW/UT MAC to satellite ID map" << std::endl;
162 std::map<Mac48Address, uint32_t>::iterator it;
163 for (it = m_macToSatIdIslMap.begin(); it != m_macToSatIdIslMap.end(); it++)
164 {
165 std::cout << it->first << " " << it->second << std::endl;
166 }
167 std::cout << std::endl;
168}
169
170// ATTACH TO MAPS
171
172uint32_t
174{
175 NS_LOG_FUNCTION(this << mac);
176
177 const uint32_t ret = m_traceIdIndex;
178
179 std::pair<std::map<Address, uint32_t>::iterator, bool> resultMacToTraceId =
180 m_macToTraceIdMap.insert(std::make_pair(mac, m_traceIdIndex));
181
182 if (resultMacToTraceId.second == false)
183 {
184 NS_FATAL_ERROR("SatIdMapper::AttachMacToTraceId - MAC to Trace ID failed. MAC "
185 << mac << ". Trace ID " << m_traceIdIndex);
186 }
187
188 NS_LOG_INFO("Added MAC " << mac << " with Trace ID " << m_traceIdIndex);
189
191 return ret;
192}
193
194uint32_t
196{
197 NS_LOG_FUNCTION(this << mac);
198
199 const uint32_t ret = m_utIdIndex;
200 std::pair<std::map<Address, uint32_t>::iterator, bool> resultMacToUtId =
201 m_macToUtIdMap.insert(std::make_pair(mac, m_utIdIndex));
202
203 if (resultMacToUtId.second == false)
204 {
205 NS_FATAL_ERROR("SatIdMapper::AttachMacToUtId - MAC to UT ID failed");
206 }
207
208 NS_LOG_INFO("Added MAC " << mac << " with UT ID " << m_utIdIndex);
209
210 m_utIdIndex++;
211 return ret;
212}
213
214uint32_t
216{
217 NS_LOG_FUNCTION(this << mac);
218
219 const uint32_t ret = m_utUserIdIndex;
220 std::pair<std::map<Address, uint32_t>::iterator, bool> resultMacToUtUserId =
221 m_macToUtUserIdMap.insert(std::make_pair(mac, m_utUserIdIndex));
222
223 if (resultMacToUtUserId.second == false)
224 {
225 NS_FATAL_ERROR("SatIdMapper::AttachMacToUtUserId - MAC to UT user ID failed");
226 }
227
228 NS_LOG_INFO("Added MAC " << mac << " with UT user ID " << m_utUserIdIndex);
229
231 return ret;
232}
233
234void
235SatIdMapper::AttachMacToSatId(Address mac, uint32_t satId)
236{
237 NS_LOG_FUNCTION(this << mac << satId);
238
239 std::pair<std::map<Address, uint32_t>::iterator, bool> resultMacToSatId =
240 m_macToSatIdMap.insert(std::make_pair(mac, satId));
241
242 if (resultMacToSatId.second == false)
243 {
244 NS_FATAL_ERROR("SatIdMapper::AttachMacToSatId - MAC to sat ID failed");
245 }
246
247 NS_LOG_INFO("Added MAC " << mac << " with sat ID " << satId);
248}
249
250void
251SatIdMapper::AttachMacToBeamId(Address mac, uint32_t beamId)
252{
253 NS_LOG_FUNCTION(this << mac << beamId);
254
255 std::pair<std::map<Address, uint32_t>::iterator, bool> resultMacToBeamId =
256 m_macToBeamIdMap.insert(std::make_pair(mac, beamId));
257
258 if (resultMacToBeamId.second == false)
259 {
260 NS_FATAL_ERROR("SatIdMapper::AttachMacToBeamId - MAC to beam ID failed");
261 }
262
263 NS_LOG_INFO("Added MAC " << mac << " with beam ID " << beamId);
264}
265
266void
267SatIdMapper::AttachMacToGroupId(Address mac, uint32_t groupId)
268{
269 NS_LOG_FUNCTION(this << mac << groupId);
270
271 std::pair<std::map<Address, uint32_t>::iterator, bool> resultMacToGroupId =
272 m_macToGroupIdMap.insert(std::make_pair(mac, groupId));
273
274 if (resultMacToGroupId.second == false)
275 {
276 NS_FATAL_ERROR("SatIdMapper::AttachMacToGroupId - MAC to group ID failed");
277 }
278
279 NS_LOG_INFO("Added MAC " << mac << " with group ID " << groupId);
280}
281
282void
283SatIdMapper::AttachMacToGwId(Address mac, uint32_t gwId)
284{
285 NS_LOG_FUNCTION(this << mac << gwId);
286
287 std::pair<std::map<Address, uint32_t>::iterator, bool> resultMacToGwId =
288 m_macToGwIdMap.insert(std::make_pair(mac, gwId));
289
290 if (resultMacToGwId.second == false)
291 {
292 NS_FATAL_ERROR("SatIdMapper::AttachMacToGwId - MAC to GW ID failed");
293 }
294
295 NS_LOG_INFO("Added MAC " << mac << " with GW ID " << gwId);
296}
297
298uint32_t
300{
301 NS_LOG_FUNCTION(this << mac);
302
303 const uint32_t ret = m_gwUserIdIndex;
304 std::pair<std::map<Address, uint32_t>::iterator, bool> resultMacToGwUserId =
305 m_macToGwUserIdMap.insert(std::make_pair(mac, m_gwUserIdIndex));
306
307 if (resultMacToGwUserId.second == false)
308 {
309 NS_FATAL_ERROR("SatIdMapper::AttachMacToGwUserId - MAC to GW user ID failed");
310 }
311
312 NS_LOG_INFO("Added MAC " << mac << " with GW user ID " << m_gwUserIdIndex);
313
315 return ret;
316}
317
318void
319SatIdMapper::AttachMacToSatIdIsl(Mac48Address mac, uint32_t satId)
320{
321 NS_LOG_FUNCTION(this << mac << satId);
322
323 std::pair<std::map<Mac48Address, uint32_t>::iterator, bool> resultMacToSatId =
324 m_macToSatIdIslMap.insert(std::make_pair(mac, satId));
325
326 if (resultMacToSatId.second == false)
327 {
328 NS_FATAL_ERROR("SatIdMapper::AttachMacToSatIdIsl - MAC to sat ID failed");
329 }
330
331 NS_LOG_INFO("Added MAC " << mac << " with sat ISL ID " << satId);
332}
333
334void
336{
337 NS_LOG_FUNCTION(this << mac);
338
339 if (m_macToSatIdIslMap.erase(mac) == 0)
340 {
341 NS_FATAL_ERROR("SatIdMapper::RemoveMacToSatIdIsl - MAC " << mac << " not in map");
342 }
343
344 NS_LOG_INFO("Removed MAC " << mac << " from ISL IDs");
345}
346
347void
348SatIdMapper::UpdateMacToSatId(Address mac, uint32_t satId)
349{
350 NS_LOG_FUNCTION(this << mac << satId);
351
352 std::map<Address, uint32_t>::iterator iter = m_macToSatIdMap.find(mac);
353
354 if (iter == m_macToSatIdMap.end())
355 {
356 NS_FATAL_ERROR("Mac address " << mac << " not in map");
357 }
358
359 iter->second = satId + 1;
360
361 NS_LOG_INFO("Updated MAC " << mac << " with sat ID " << satId);
362}
363
364void
365SatIdMapper::UpdateMacToBeamId(Address mac, uint32_t beamId)
366{
367 NS_LOG_FUNCTION(this << mac << beamId);
368
369 std::map<Address, uint32_t>::iterator iter = m_macToBeamIdMap.find(mac);
370
371 if (iter == m_macToBeamIdMap.end())
372 {
373 NS_FATAL_ERROR("Mac address " << mac << " not in map");
374 }
375
376 iter->second = beamId;
377
378 NS_LOG_INFO("Updated MAC " << mac << " with beam ID " << beamId);
379}
380
381// ID GETTERS
382
383int32_t
385{
386 NS_LOG_FUNCTION(this << mac);
387
388 std::map<Address, uint32_t>::const_iterator iter = m_macToTraceIdMap.find(mac);
389
390 if (iter == m_macToTraceIdMap.end())
391 {
392 return -1;
393 }
394
395 return iter->second;
396}
397
398int32_t
400{
401 NS_LOG_FUNCTION(this << mac);
402
403 std::map<Address, uint32_t>::const_iterator iter = m_macToUtIdMap.find(mac);
404
405 if (iter == m_macToUtIdMap.end())
406 {
407 return -1;
408 }
409
410 return iter->second;
411}
412
413int32_t
415{
416 NS_LOG_FUNCTION(this << mac);
417
418 std::map<Address, uint32_t>::const_iterator iter = m_macToUtUserIdMap.find(mac);
419
420 if (iter == m_macToUtUserIdMap.end())
421 {
422 return -1;
423 }
424
425 return iter->second;
426}
427
428int32_t
430{
431 NS_LOG_FUNCTION(this << mac);
432
433 std::map<Address, uint32_t>::const_iterator iter = m_macToSatIdMap.find(mac);
434
435 if (iter == m_macToSatIdMap.end())
436 {
437 return -1;
438 }
439
440 return iter->second;
441}
442
443int32_t
445{
446 NS_LOG_FUNCTION(this << mac);
447
448 std::map<Address, uint32_t>::const_iterator iter = m_macToBeamIdMap.find(mac);
449
450 if (iter == m_macToBeamIdMap.end())
451 {
452 return -1;
453 }
454
455 return iter->second;
456}
457
458int32_t
460{
461 NS_LOG_FUNCTION(this << mac);
462
463 std::map<Address, uint32_t>::const_iterator iter = m_macToGroupIdMap.find(mac);
464
465 if (iter == m_macToGroupIdMap.end())
466 {
467 return 0;
468 }
469
470 return iter->second;
471}
472
473int32_t
475{
476 NS_LOG_FUNCTION(this << mac);
477
478 std::map<Address, uint32_t>::const_iterator iter = m_macToGwIdMap.find(mac);
479
480 if (iter == m_macToGwIdMap.end())
481 {
482 return -1;
483 }
484
485 return iter->second;
486}
487
488int32_t
490{
491 NS_LOG_FUNCTION(this << mac);
492
493 std::map<Address, uint32_t>::const_iterator iter = m_macToGwUserIdMap.find(mac);
494
495 if (iter == m_macToGwUserIdMap.end())
496 {
497 return -1;
498 }
499
500 return iter->second;
501}
502
503int32_t
504SatIdMapper::GetSatIdWithMacIsl(Mac48Address mac) const
505{
506 NS_LOG_FUNCTION(this << mac);
507
508 std::map<Mac48Address, uint32_t>::const_iterator iter = m_macToSatIdIslMap.find(mac);
509
510 if (iter == m_macToSatIdIslMap.end())
511 {
512 return -1;
513 }
514
515 return iter->second;
516}
517
518// NODE GETTERS
519
520Address
521SatIdMapper::GetGwMacWithNode(Ptr<Node> gwNode) const
522{
523 NS_LOG_FUNCTION(this << gwNode->GetId());
524
525 if (gwNode->GetNDevices() >= 3)
526 {
527 /*
528 * Assuming that device #0 is for loopback device, device #(N-1) is for
529 * backbone network device, and devices #1 until #(N-2) are for satellite
530 * beam device.
531 */
532 Ptr<NetDevice> dev = gwNode->GetDevice(1);
533
534 if (dev->GetObject<SatNetDevice>() != nullptr)
535 {
536 if (Mac48Address::IsMatchingType(dev->GetAddress()))
537 {
538 return dev->GetAddress();
539 }
540 else
541 {
542 NS_LOG_WARN(this << " Device 1 of Node " << gwNode->GetId()
543 << " is not have a valid Mac48Address");
544 return Address(); // returns an invalid address
545 }
546 }
547 else
548 {
549 NS_LOG_WARN(this << " Node " << gwNode->GetId() << " is not a valid GW");
550 return Address(); // returns an invalid address
551 }
552 }
553 else
554 {
555 NS_LOG_WARN(this << " Node " << gwNode->GetId() << " is not a valid GW");
556 return Address(); // returns an invalid address
557 }
558}
559
560Address
561SatIdMapper::GetSatMacWithNode(Ptr<Node> satNode) const
562{
563 NS_LOG_FUNCTION(this << satNode->GetId());
564
565 if (satNode->GetNDevices() >= 1)
566 {
567 Ptr<NetDevice> dev = satNode->GetDevice(0);
568
569 if (dev->GetObject<SatOrbiterNetDevice>() != nullptr)
570 {
571 if (Mac48Address::IsMatchingType(dev->GetAddress()))
572 {
573 return dev->GetAddress();
574 }
575 else
576 {
577 NS_LOG_WARN(this << " Device 0 of Node " << satNode->GetId()
578 << " does not have a valid Mac48Address");
579 return Address(); // returns an invalid address
580 }
581 }
582 else
583 {
584 NS_LOG_WARN(this << " Node " << satNode->GetId() << " is not a valid SAT");
585 return Address(); // returns an invalid address
586 }
587 }
588 else
589 {
590 NS_LOG_WARN(this << " Node " << satNode->GetId() << " is not a valid SAT");
591 return Address(); // returns an invalid address
592 }
593}
594
595Address
596SatIdMapper::GetUtMacWithNode(Ptr<Node> utNode) const
597{
598 NS_LOG_FUNCTION(this << utNode->GetId());
599
600 if (utNode->GetNDevices() >= 3)
601 {
602 /*
603 * Assuming that device #0 is for loopback device, device #1 is for
604 * subscriber network device, and device #2 is for satellite beam device.
605 */
606 Ptr<NetDevice> dev = utNode->GetDevice(2);
607
608 if (dev->GetObject<SatNetDevice>() != nullptr)
609 {
610 if (Mac48Address::IsMatchingType(dev->GetAddress()))
611 {
612 return dev->GetAddress();
613 }
614 else
615 {
616 NS_LOG_WARN(this << " Device 2 of Node " << utNode->GetId()
617 << " is not have a valid Mac48Address");
618 return Address(); // returns an invalid address
619 }
620 }
621 else
622 {
623 NS_LOG_WARN(this << " Node " << utNode->GetId() << " is not a valid UT");
624 return Address(); // returns an invalid address
625 }
626 }
627 else
628 {
629 NS_LOG_WARN(this << " Node " << utNode->GetId() << " is not a valid UT");
630 return Address(); // returns an invalid address
631 }
632}
633
634Address
635SatIdMapper::GetUtUserMacWithNode(Ptr<Node> utUserNode) const
636{
637 NS_LOG_FUNCTION(this << utUserNode->GetId());
638
639 if (utUserNode->GetNDevices() >= 2)
640 {
641 /*
642 * Assuming that #0 is for loopback device and #1 is for subscriber
643 * network device.
644 */
645 Ptr<NetDevice> dev = utUserNode->GetDevice(1);
646 NS_ASSERT(dev != nullptr);
647
648 if (Mac48Address::IsMatchingType(dev->GetAddress()))
649 {
650 return dev->GetAddress();
651 }
652 else
653 {
654 NS_LOG_WARN(this << " Device 1 of Node " << utUserNode->GetId()
655 << " is not have a valid Mac48Address");
656 return Address(); // returns an invalid address
657 }
658 }
659 else
660 {
661 NS_LOG_WARN(this << " Node " << utUserNode->GetId() << " is not a valid UT user");
662 return Address(); // returns an invalid address
663 }
664}
665
666std::string
667SatIdMapper::GetMacInfo(Address mac) const
668{
669 NS_LOG_FUNCTION(this);
670
671 std::stringstream out;
672 bool isInMap = false;
673
674 out << mac << " ";
675
676 std::map<Address, uint32_t>::const_iterator iterTrace = m_macToTraceIdMap.find(mac);
677
678 if (!(iterTrace == m_macToTraceIdMap.end()))
679 {
680 out << "trace ID: " << iterTrace->second << " ";
681 isInMap = true;
682 }
683
684 std::map<Address, uint32_t>::const_iterator iterSat = m_macToSatIdMap.find(mac);
685
686 if (!(iterSat == m_macToSatIdMap.end()))
687 {
688 out << "sat ID: " << iterSat->second << " ";
689 isInMap = true;
690 }
691
692 std::map<Address, uint32_t>::const_iterator iterBeam = m_macToBeamIdMap.find(mac);
693
694 if (!(iterBeam == m_macToBeamIdMap.end()))
695 {
696 out << "beam ID: " << iterBeam->second << " ";
697 isInMap = true;
698 }
699
700 std::map<Address, uint32_t>::const_iterator iterGroup = m_macToGroupIdMap.find(mac);
701
702 if (!(iterGroup == m_macToGroupIdMap.end()))
703 {
704 out << "beam ID: " << iterGroup->second << " ";
705 isInMap = true;
706 }
707
708 std::map<Address, uint32_t>::const_iterator iterUt = m_macToUtIdMap.find(mac);
709
710 if (!(iterUt == m_macToUtIdMap.end()))
711 {
712 out << "UT ID: " << iterUt->second << " ";
713 isInMap = true;
714 }
715
716 std::map<Address, uint32_t>::const_iterator iterGw = m_macToGwIdMap.find(mac);
717
718 if (!(iterGw == m_macToGwIdMap.end()))
719 {
720 out << "GW ID: " << iterGw->second << " ";
721 isInMap = true;
722 }
723
724 std::string infoString = out.str();
725
726 // if the string is empty, the MAC was not found in any of the maps
727 if (!isInMap)
728 {
729 out << "not found in the mapper";
730 infoString = out.str();
731 }
732
733 return infoString;
734}
735
736void
738{
739 NS_LOG_FUNCTION(this);
740
741 std::map<Address, uint32_t>::const_iterator iter;
742
743 for (iter = m_macToTraceIdMap.begin(); iter != m_macToTraceIdMap.end(); ++iter)
744 {
745 std::cout << GetMacInfo(iter->first) << std::endl;
746 }
747}
748
749} // namespace ns3
Class for ID-mapper.
void Reset()
Function for resetting the variables.
int32_t GetTraceIdWithMac(Address mac) const
Function for getting the trace ID with MAC.
std::map< Mac48Address, uint32_t > m_macToSatIdIslMap
Map for GW/UT MAC to associated SAT ID conversion.
int32_t GetBeamIdWithMac(Address mac) const
Function for getting the beam ID with MAC.
void UpdateMacToSatId(Address mac, uint32_t satId)
Update MAC address to the SAT ID maps.
std::map< Address, uint32_t > m_macToGroupIdMap
Map for MAC to group ID conversion.
uint32_t m_utUserIdIndex
Running UT user index number.
SatIdMapper()
Constructor.
int32_t GetUtUserIdWithMac(Address mac) const
Function for getting the UT user ID with MAC.
bool m_enableMapPrint
Is map printing enabled or not.
int32_t GetSatIdWithMac(Address mac) const
Function for getting the SAT ID with MAC.
uint32_t AttachMacToTraceId(Address mac)
Attach MAC address to the Trace ID maps and give it a running trace ID (starting from 1).
uint32_t AttachMacToGwUserId(Address mac)
Attach MAC address to the GW user ID maps and give it a running GW user ID (starting from 1).
std::map< Address, uint32_t > m_macToSatIdMap
Map for MAC to SAT ID conversion.
void PrintTraceMap() const
Function for printing out the trace map.
void ShowIslMap()
Print the map GW/UT address to satellite ID.
std::string GetMacInfo(Address mac) const
Function for getting the IDs related to a MAC address in an info string.
Address GetSatMacWithNode(Ptr< Node > satNode) const
uint32_t AttachMacToUtUserId(Address mac)
Attach MAC address to the UT user ID maps and give it a running UT user ID (starting from 1).
std::map< Address, uint32_t > m_macToBeamIdMap
Map for MAC to beam ID conversion.
std::map< Address, uint32_t > m_macToUtUserIdMap
Map for MAC to UT user ID conversion.
uint32_t m_utIdIndex
Running UT index number.
uint32_t m_traceIdIndex
Running trace index number.
void AttachMacToGwId(Address mac, uint32_t gwId)
Attach MAC address to the GW ID maps.
void RemoveMacToSatIdIsl(Mac48Address mac)
Remove GW/UT MAC address to the satellite this node is connected.
uint32_t m_gwUserIdIndex
Running GW user index number.
std::map< Address, uint32_t > m_macToTraceIdMap
Map for MAC to trace ID conversion.
int32_t GetGwIdWithMac(Address mac) const
Function for getting the GW ID with MAC.
std::map< Address, uint32_t > m_macToGwUserIdMap
Map for MAC to GW user ID conversion.
void AttachMacToBeamId(Address mac, uint32_t beamId)
Attach MAC address to the beam ID maps.
void AttachMacToSatId(Address mac, uint32_t satId)
Attach MAC address to the SAT ID maps and give it a running SAT ID (starting from 1).
static TypeId GetTypeId(void)
NS-3 type id function.
void DoDispose()
Do needed dispose actions.
std::map< Address, uint32_t > m_macToUtIdMap
Map for MAC to UT ID conversion.
int32_t GetSatIdWithMacIsl(Mac48Address mac) const
Function for getting the satellite ID connected to a GW/UT MAC address.
int32_t GetUtIdWithMac(Address mac) const
Function for getting the UT ID with MAC.
void UpdateMacToBeamId(Address mac, uint32_t beamId)
Update MAC address to the beam ID maps.
Address GetGwMacWithNode(Ptr< Node > gwNode) const
void AttachMacToSatIdIsl(Mac48Address mac, uint32_t satId)
Attach GW/UT MAC address to the satellite this node is connected.
std::map< Address, uint32_t > m_macToGwIdMap
Map for MAC to GW ID conversion.
uint32_t AttachMacToUtId(Address mac)
Attach MAC address to the UT ID maps and give it a running UT ID (starting from 1).
void AttachMacToGroupId(Address mac, uint32_t groupId)
Attach MAC address to the group ID maps.
int32_t GetGwUserIdWithMac(Address mac) const
Function for getting the GW user ID with MAC.
Address GetUtMacWithNode(Ptr< Node > utNode) const
Address GetUtUserMacWithNode(Ptr< Node > utUserNode) const
int32_t GetGroupIdWithMac(Address mac) const
Function for getting the group ID with MAC.
SatNetDevice to be utilized in the UT and GW nodes.
SatOrbiterNetDevice to be utilized in geostationary satellite.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.