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 
28 
29 #include <ns3/mac48-address.h>
30 #include <ns3/node.h>
31 #include <ns3/packet.h>
32 
33 #include <stdint.h>
34 #include <string>
35 
36 namespace ns3
37 {
38 
39 class SatIslArbiter : public Object
40 {
41  public:
42  static TypeId GetTypeId(void);
43 
47  SatIslArbiter();
48 
53  SatIslArbiter(Ptr<Node> node);
54 
63  int32_t BaseDecide(Ptr<Packet> pkt, Mac48Address destination);
64 
74  virtual int32_t Decide(int32_t sourceSatId, int32_t targetSatId, Ptr<Packet> pkt) = 0;
75 
81  virtual std::string StringReprOfForwardingState() = 0;
82 
83  protected:
84  uint32_t m_nodeId; // ID of node where this arbiter is installed.
85 };
86 
87 } // namespace ns3
88 
89 #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.