24 #include <ns3/satellite-isl-arbiter-unicast.h>
26 NS_LOG_COMPONENT_DEFINE(
"SatIslArbiterUnicast");
31 NS_OBJECT_ENSURE_REGISTERED(SatIslArbiterUnicast);
36 static TypeId tid = TypeId(
"ns3::SatIslArbiterUnicast")
38 .AddConstructor<SatIslArbiterUnicast>();
45 NS_LOG_FUNCTION(
this);
47 NS_FATAL_ERROR(
"Default constructor not in use");
53 NS_LOG_FUNCTION(
this << node);
59 NS_LOG_FUNCTION(
this << node);
66 NS_LOG_FUNCTION(
this << sourceSatId << targetSatId << pkt);
78 NS_LOG_FUNCTION(
this);
80 std::ostringstream res;
81 res <<
"Unicast state of node " <<
m_nodeId << std::endl;
83 std::map<uint32_t, uint32_t>::iterator nextHopMapIterator;
85 std::map<uint32_t, std::vector<uint32_t>> mapReversed;
86 std::map<uint32_t, std::vector<uint32_t>>::iterator mapReversedIterator;
91 if (mapReversed.count(nextHopMapIterator->second) == 0)
93 mapReversed[nextHopMapIterator->second] = std::vector<uint32_t>();
95 mapReversed[nextHopMapIterator->second].push_back(nextHopMapIterator->first);
98 for (mapReversedIterator = mapReversed.begin(); mapReversedIterator != mapReversed.end();
99 mapReversedIterator++)
101 res << mapReversedIterator->first <<
" -> : {";
103 for (uint32_t targetId : mapReversedIterator->second)
109 res <<
" " << targetId;
112 res <<
"}" << std::endl;
121 NS_LOG_FUNCTION(
this << destinationId << netDeviceIndex);
123 m_nextHopMap.insert(std::make_pair(destinationId, netDeviceIndex));
int32_t Decide(int32_t sourceSatId, int32_t targetSatId, Ptr< Packet > pkt)
Decide how to forward.
std::string StringReprOfForwardingState()
Unicast routing table.
void AddNextHopEntry(uint32_t destinationId, uint32_t netDeviceIndex)
Add an entry on arbiter.
SatIslArbiterUnicast()
Default constructor.
static TypeId GetTypeId(void)
std::map< uint32_t, uint32_t > m_nextHopMap
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.