A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
bridge-channel.h
Go to the documentation of this file.
1
/*
2
* This program is free software; you can redistribute it and/or modify
3
* it under the terms of the GNU General Public License version 2 as
4
* published by the Free Software Foundation;
5
*
6
* This program is distributed in the hope that it will be useful,
7
* but WITHOUT ANY WARRANTY; without even the implied warranty of
8
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9
* GNU General Public License for more details.
10
*
11
* You should have received a copy of the GNU General Public License
12
* along with this program; if not, write to the Free Software
13
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
14
*
15
* Author: Gustavo Carneiro <gjc@inescporto.pt>
16
*/
17
#ifndef BRIDGE_CHANNEL_H
18
#define BRIDGE_CHANNEL_H
19
20
#include "ns3/channel.h"
21
#include "ns3/net-device.h"
22
23
#include <vector>
24
31
namespace
ns3
32
{
33
43
class
BridgeChannel
:
public
Channel
44
{
45
public
:
50
static
TypeId
GetTypeId
();
51
BridgeChannel
();
52
~BridgeChannel
()
override
;
53
54
// Delete copy constructor and assignment operator to avoid misuse
55
BridgeChannel
(
const
BridgeChannel
&) =
delete
;
56
BridgeChannel
&
operator=
(
const
BridgeChannel
&) =
delete
;
57
62
void
AddChannel
(
Ptr<Channel>
bridgedChannel);
63
64
// virtual methods implementation, from Channel
65
std::size_t
GetNDevices
()
const override
;
66
Ptr<NetDevice>
GetDevice
(std::size_t i)
const override
;
67
68
private
:
69
std::vector<Ptr<Channel>>
m_bridgedChannels
;
70
};
71
72
}
// namespace ns3
73
74
#endif
/* BRIDGE_CHANNEL_H */
ns3::BridgeChannel
Virtual channel implementation for bridges (BridgeNetDevice).
Definition:
bridge-channel.h:44
ns3::BridgeChannel::BridgeChannel
BridgeChannel()
Definition:
bridge-channel.cc:45
ns3::BridgeChannel::~BridgeChannel
~BridgeChannel() override
Definition:
bridge-channel.cc:51
ns3::BridgeChannel::AddChannel
void AddChannel(Ptr< Channel > bridgedChannel)
Adds a channel to the bridged pool.
Definition:
bridge-channel.cc:63
ns3::BridgeChannel::BridgeChannel
BridgeChannel(const BridgeChannel &)=delete
ns3::BridgeChannel::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
bridge-channel.cc:36
ns3::BridgeChannel::m_bridgedChannels
std::vector< Ptr< Channel > > m_bridgedChannels
pool of bridged channels
Definition:
bridge-channel.h:69
ns3::BridgeChannel::GetNDevices
std::size_t GetNDevices() const override
Definition:
bridge-channel.cc:69
ns3::BridgeChannel::operator=
BridgeChannel & operator=(const BridgeChannel &)=delete
ns3::BridgeChannel::GetDevice
Ptr< NetDevice > GetDevice(std::size_t i) const override
Definition:
bridge-channel.cc:80
ns3::Channel
Abstract Channel Base Class.
Definition:
channel.h:45
ns3::Ptr< Channel >
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
bridge
model
bridge-channel.h
Generated on Sun Mar 3 2024 17:10:54 for ns-3 by
1.9.1