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
channel-list.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009 University of Washington
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*/
6
7
#ifndef CHANNEL_LIST_H
8
#define CHANNEL_LIST_H
9
10
#include "ns3/ptr.h"
11
12
#include <vector>
13
14
namespace
ns3
15
{
16
17
class
Channel;
18
class
CallbackBase;
19
20
/**
21
* \ingroup network
22
*
23
* \brief the list of simulation channels.
24
*
25
* Every Channel created is automatically added to this list.
26
*/
27
class
ChannelList
28
{
29
public
:
30
/// Channel container iterator
31
typedef
std::vector<Ptr<Channel>>::const_iterator
Iterator
;
32
33
/**
34
* \param channel channel to add
35
* \returns index of channel in list.
36
*
37
* This method is called automatically from Channel::Channel so
38
* the user has little reason to call it himself.
39
*/
40
static
uint32_t
Add
(
Ptr<Channel>
channel);
41
/**
42
* \returns a C++ iterator located at the beginning of this
43
* list.
44
*/
45
static
Iterator
Begin
();
46
/**
47
* \returns a C++ iterator located at the end of this
48
* list.
49
*/
50
static
Iterator
End
();
51
/**
52
* \param n index of requested channel.
53
* \returns the Channel associated to index n.
54
*/
55
static
Ptr<Channel>
GetChannel
(
uint32_t
n);
56
/**
57
* \returns the number of channels currently in the list.
58
*/
59
static
uint32_t
GetNChannels
();
60
};
61
62
}
// namespace ns3
63
64
#endif
/* CHANNEL_LIST_H */
ns3::ChannelList
the list of simulation channels.
Definition
channel-list.h:28
ns3::ChannelList::GetChannel
static Ptr< Channel > GetChannel(uint32_t n)
Definition
channel-list.cc:227
ns3::ChannelList::Add
static uint32_t Add(Ptr< Channel > channel)
Definition
channel-list.cc:206
ns3::ChannelList::GetNChannels
static uint32_t GetNChannels()
Definition
channel-list.cc:234
ns3::ChannelList::Begin
static Iterator Begin()
Definition
channel-list.cc:213
ns3::ChannelList::Iterator
std::vector< Ptr< Channel > >::const_iterator Iterator
Channel container iterator.
Definition
channel-list.h:31
ns3::ChannelList::End
static Iterator End()
Definition
channel-list.cc:220
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
network
model
channel-list.h
Generated on Fri Nov 8 2024 13:59:04 for ns-3 by
1.11.0