33 NS_LOG_COMPONENT_DEFINE(
"SatIslArbiterUnicast");
38 NS_OBJECT_ENSURE_REGISTERED(SatIslArbiterUnicast);
43 static TypeId tid = TypeId(
"ns3::SatIslArbiterUnicast")
45 .AddConstructor<SatIslArbiterUnicast>();
52 NS_LOG_FUNCTION(
this);
54 NS_FATAL_ERROR(
"Default constructor not in use");
60 NS_LOG_FUNCTION(
this << node);
66 NS_LOG_FUNCTION(
this << node);
73 NS_LOG_FUNCTION(
this << sourceSatId << targetSatId << pkt);
85 NS_LOG_FUNCTION(
this);
87 std::ostringstream res;
88 res <<
"Unicast state of node " <<
m_nodeId << std::endl;
90 std::map<uint32_t, uint32_t>::iterator nextHopMapIterator;
92 std::map<uint32_t, std::vector<uint32_t>> mapReversed;
93 std::map<uint32_t, std::vector<uint32_t>>::iterator mapReversedIterator;
98 if (mapReversed.count(nextHopMapIterator->second) == 0)
100 mapReversed[nextHopMapIterator->second] = std::vector<uint32_t>();
102 mapReversed[nextHopMapIterator->second].push_back(nextHopMapIterator->first);
105 for (mapReversedIterator = mapReversed.begin(); mapReversedIterator != mapReversed.end();
106 mapReversedIterator++)
108 res << mapReversedIterator->first <<
" -> : {";
110 for (uint32_t targetId : mapReversedIterator->second)
116 res <<
" " << targetId;
119 res <<
"}" << std::endl;
128 NS_LOG_FUNCTION(
this << destinationId << netDeviceIndex);
130 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.