satellite-isl-arbiter.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_H
25 #define SATELLITE_ISL_ARBITER_H
26 
27 #include <ns3/mac48-address.h>
28 #include <ns3/node.h>
29 #include <ns3/packet.h>
30 #include <ns3/satellite-geo-net-device.h>
31 
32 #include <string>
33 
34 namespace ns3
35 {
36 
37 class SatIslArbiter : public Object
38 {
39  public:
40  static TypeId GetTypeId(void);
41 
45  SatIslArbiter();
46 
51  SatIslArbiter(Ptr<Node> node);
52 
61  int32_t BaseDecide(Ptr<Packet> pkt, Mac48Address destination);
62 
72  virtual int32_t Decide(int32_t sourceSatId, int32_t targetSatId, Ptr<Packet> pkt) = 0;
73 
79  virtual std::string StringReprOfForwardingState() = 0;
80 
81  protected:
82  uint32_t m_nodeId; // ID of node where this arbiter is installed.
83 };
84 
85 } // namespace ns3
86 
87 #endif // SATELLITE_ISL_ARBITER_H
virtual int32_t Decide(int32_t sourceSatId, int32_t targetSatId, Ptr< Packet > pkt)=0
Decide how to forward.
static TypeId GetTypeId(void)
virtual std::string StringReprOfForwardingState()=0
Convert the forwarding state (i.e., routing table) to a string representation.
int32_t BaseDecide(Ptr< Packet > pkt, Mac48Address destination)
Base decide how to forward.
SatIslArbiter()
Default constructor.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.