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