satellite-simple-channel.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2014 Magister Solutions Ltd.
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Sami Rantanen <sami.rantanen@magister.fi>
19  */
20 #ifndef SATELLITE_SIMPLE_CHANNEL_H
21 #define SATELLITE_SIMPLE_CHANNEL_H
22 
23 #include <ns3/channel.h>
24 #include <ns3/mac48-address.h>
25 
26 #include <vector>
27 
28 namespace ns3
29 {
30 
31 class SatSimpleNetDevice;
32 class Packet;
33 
40 class SatSimpleChannel : public Channel
41 {
42  public:
47  static TypeId GetTypeId(void);
48 
53 
66  virtual void Send(Ptr<Packet> p,
67  uint16_t protocol,
68  Mac48Address to,
69  Mac48Address from,
70  Ptr<SatSimpleNetDevice> sender);
71 
77  virtual void Add(Ptr<SatSimpleNetDevice> device);
78 
79  // inherited from ns3::Channel
80  virtual std::size_t GetNDevices(void) const;
81  virtual Ptr<NetDevice> GetDevice(std::size_t i) const;
82 
83  private:
84  std::vector<Ptr<SatSimpleNetDevice>> m_devices;
85 };
86 
87 } // namespace ns3
88 
89 #endif /* SATELLITE_SIMPLE_CHANNEL_H */
The satellite simple channel, for satellite public and backbone networks.
SatSimpleChannel()
Default constructor.
virtual void Send(Ptr< Packet > p, uint16_t protocol, Mac48Address to, Mac48Address from, Ptr< SatSimpleNetDevice > sender)
A packet is sent by a net device.
virtual std::size_t GetNDevices(void) const
std::vector< Ptr< SatSimpleNetDevice > > m_devices
static TypeId GetTypeId(void)
Get the type ID.
virtual void Add(Ptr< SatSimpleNetDevice > device)
Attached a net device to the channel.
virtual Ptr< NetDevice > GetDevice(std::size_t i) const
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.