satellite-isl-arbiter-unicast.h
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  * Copyright (c) 2018 CNES
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation;
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Inspired and adapted from Hypatia: https://github.com/snkas/hypatia
20  *
21  * Author: Bastien Tauran <bastien.tauran@viveris.fr>
22  */
23 
24 #ifndef SATELLITE_ISL_ARBITER_UNICAST_H
25 #define SATELLITE_ISL_ARBITER_UNICAST_H
26 
27 #include <ns3/satellite-isl-arbiter.h>
28 
29 #include <map>
30 
31 namespace ns3
32 {
33 
35 {
36  public:
37  static TypeId GetTypeId(void);
38 
43 
48  SatIslArbiterUnicast(Ptr<Node> node);
49 
55  SatIslArbiterUnicast(Ptr<Node> node, std::map<uint32_t, uint32_t> nextHopMap);
56 
66  int32_t Decide(int32_t sourceSatId, int32_t targetSatId, Ptr<Packet> pkt);
67 
73  std::string StringReprOfForwardingState();
74 
80  void AddNextHopEntry(uint32_t destinationId, uint32_t netDeviceIndex);
81 
82  private:
83  std::map<uint32_t, uint32_t>
84  m_nextHopMap; // Map indicating next hops. Key = satellite destination ID, value =
85  // IslNetDevice index to send packet
86 };
87 
88 } // namespace ns3
89 
90 #endif // SATELLITE_ISL_ARBITER_UNICAST_H
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.
std::map< uint32_t, uint32_t > m_nextHopMap
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.