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