Loading...
Searching...
No Matches
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 <cstddef>
27#include <stdint.h>
28#include <vector>
29
30namespace ns3
31{
32
34class Packet;
35
42class SatSimpleChannel : public Channel
43{
44 public:
49 static TypeId GetTypeId(void);
50
55
68 virtual void Send(Ptr<Packet> p,
69 uint16_t protocol,
70 Mac48Address to,
71 Mac48Address from,
72 Ptr<SatSimpleNetDevice> sender);
73
79 virtual void Add(Ptr<SatSimpleNetDevice> device);
80
81 // inherited from ns3::Channel
82 virtual std::size_t GetNDevices(void) const;
83 virtual Ptr<NetDevice> GetDevice(std::size_t i) const;
84
85 private:
86 std::vector<Ptr<SatSimpleNetDevice>> m_devices;
87};
88
89} // namespace ns3
90
91#endif /* SATELLITE_SIMPLE_CHANNEL_H */
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
Satellite simple net device for satellite public and backbone network use.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.