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 "satellite-isl-arbiter.h"
28 
29 #include <map>
30 #include <stdint.h>
31 #include <string>
32 
33 namespace ns3
34 {
35 
37 {
38  public:
39  static TypeId GetTypeId(void);
40 
45 
50  SatIslArbiterUnicast(Ptr<Node> node);
51 
57  SatIslArbiterUnicast(Ptr<Node> node, std::map<uint32_t, uint32_t> nextHopMap);
58 
68  int32_t Decide(int32_t sourceSatId, int32_t targetSatId, Ptr<Packet> pkt);
69 
75  std::string StringReprOfForwardingState();
76 
82  void AddNextHopEntry(uint32_t destinationId, uint32_t netDeviceIndex);
83 
84  private:
85  std::map<uint32_t, uint32_t>
86  m_nextHopMap; // Map indicating next hops. Key = satellite destination ID, value =
87  // IslNetDevice index to send packet
88 };
89 
90 } // namespace ns3
91 
92 #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.