A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
bridge-channel.h
Go to the documentation of this file.
1
/*
2
* SPDX-License-Identifier: GPL-2.0-only
3
*
4
* Author: Gustavo Carneiro <gjc@inescporto.pt>
5
*/
6
#ifndef BRIDGE_CHANNEL_H
7
#define BRIDGE_CHANNEL_H
8
9
#include "ns3/channel.h"
10
#include "ns3/net-device.h"
11
12
#include <vector>
13
14
/**
15
* \file
16
* \ingroup bridge
17
* ns3::BridgeChannel declaration.
18
*/
19
20
namespace
ns3
21
{
22
23
/**
24
* \ingroup bridge
25
*
26
* \brief Virtual channel implementation for bridges (BridgeNetDevice).
27
*
28
* Just like BridgeNetDevice aggregates multiple NetDevices,
29
* BridgeChannel aggregates multiple channels and make them appear as
30
* a single channel to upper layers.
31
*/
32
class
BridgeChannel
:
public
Channel
33
{
34
public
:
35
/**
36
* \brief Get the type ID.
37
* \return the object TypeId
38
*/
39
static
TypeId
GetTypeId
();
40
BridgeChannel
();
41
~BridgeChannel
()
override
;
42
43
// Delete copy constructor and assignment operator to avoid misuse
44
BridgeChannel
(
const
BridgeChannel
&) =
delete
;
45
BridgeChannel
&
operator=
(
const
BridgeChannel
&) =
delete
;
46
47
/**
48
* Adds a channel to the bridged pool
49
* \param bridgedChannel the channel to add to the pool
50
*/
51
void
AddChannel
(
Ptr<Channel>
bridgedChannel);
52
53
// virtual methods implementation, from Channel
54
std::size_t
GetNDevices
()
const override
;
55
Ptr<NetDevice>
GetDevice
(std::size_t i)
const override
;
56
57
private
:
58
std::vector<Ptr<Channel>>
m_bridgedChannels
;
//!< pool of bridged channels
59
};
60
61
}
// namespace ns3
62
63
#endif
/* BRIDGE_CHANNEL_H */
ns3::BridgeChannel
Virtual channel implementation for bridges (BridgeNetDevice).
Definition
bridge-channel.h:33
ns3::BridgeChannel::BridgeChannel
BridgeChannel()
Definition
bridge-channel.cc:34
ns3::BridgeChannel::~BridgeChannel
~BridgeChannel() override
Definition
bridge-channel.cc:40
ns3::BridgeChannel::AddChannel
void AddChannel(Ptr< Channel > bridgedChannel)
Adds a channel to the bridged pool.
Definition
bridge-channel.cc:52
ns3::BridgeChannel::BridgeChannel
BridgeChannel(const BridgeChannel &)=delete
ns3::BridgeChannel::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
bridge-channel.cc:25
ns3::BridgeChannel::m_bridgedChannels
std::vector< Ptr< Channel > > m_bridgedChannels
pool of bridged channels
Definition
bridge-channel.h:58
ns3::BridgeChannel::GetNDevices
std::size_t GetNDevices() const override
Definition
bridge-channel.cc:58
ns3::BridgeChannel::operator=
BridgeChannel & operator=(const BridgeChannel &)=delete
ns3::BridgeChannel::GetDevice
Ptr< NetDevice > GetDevice(std::size_t i) const override
Definition
bridge-channel.cc:69
ns3::Channel
Abstract Channel Base Class.
Definition
channel.h:34
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
bridge
model
bridge-channel.h
Generated on Fri Nov 8 2024 13:58:59 for ns-3 by
1.11.0