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
connection-manager.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2007,2008,2009 INRIA, UDcast
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Authors: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
7
* Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
8
* <amine.ismail@UDcast.com>
9
*/
10
11
#ifndef CONNECTION_MANAGER_H
12
#define CONNECTION_MANAGER_H
13
14
#include "
cid.h
"
15
#include "
wimax-connection.h
"
16
17
#include "ns3/mac48-address.h"
18
19
#include <stdint.h>
20
21
namespace
ns3
22
{
23
24
class
CidFactory;
25
class
SSRecord;
26
class
RngRsp;
27
class
WimaxNetDevice;
28
class
SubscriberStationNetDevice;
29
30
/**
31
* \ingroup wimax
32
* The same connection manager class serves both for BS and SS though some functions are exclusive
33
* to only one of them.
34
*/
35
36
class
ConnectionManager
:
public
Object
37
{
38
public
:
39
/**
40
* \brief Get the type ID.
41
* \return the object TypeId
42
*/
43
static
TypeId
GetTypeId
();
44
ConnectionManager
();
45
~ConnectionManager
()
override
;
46
void
DoDispose
()
override
;
47
/**
48
* Set CID factory
49
* \param cidFactory the CID factory
50
*/
51
void
SetCidFactory
(
CidFactory
* cidFactory);
52
/**
53
* \brief allocates the management connection for an ss record. This method is only used by BS
54
* \param ssRecord the ss record to which the management connection will be allocated
55
* \param rngrsp the ranging response message
56
*/
57
void
AllocateManagementConnections
(
SSRecord
* ssRecord,
RngRsp
* rngrsp);
58
/**
59
* \brief create a connection of type type
60
* \param type type of the connection to create
61
* \return a smart pointer to the created WimaxConnection
62
*/
63
Ptr<WimaxConnection>
CreateConnection
(
Cid::Type
type);
64
/**
65
* \brief add a connection to the list of managed connections
66
* \param connection the connection to add
67
* \param type the type of connection to add
68
*/
69
void
AddConnection
(
Ptr<WimaxConnection>
connection,
Cid::Type
type);
70
/**
71
* \param cid the connection identifier
72
* \return the connection corresponding to cid
73
*/
74
Ptr<WimaxConnection>
GetConnection
(
Cid
cid);
75
/**
76
* \param type the type of connection to add
77
* \return a vector of all connections matching the input type
78
*/
79
std::vector<Ptr<WimaxConnection>>
GetConnections
(
Cid::Type
type)
const
;
80
/**
81
* \brief get number of packets
82
* \param type the type of connection to add
83
* \param schedulingType the scheduling type
84
* \returns number of packets
85
*/
86
uint32_t
GetNPackets
(
Cid::Type
type,
ServiceFlow::SchedulingType
schedulingType)
const
;
87
/**
88
* \return true if one of the managed connection has at least one packet to send, false
89
* otherwise
90
*/
91
bool
HasPackets
()
const
;
92
93
private
:
94
std::vector<Ptr<WimaxConnection>>
m_basicConnections
;
///< basic connections
95
std::vector<Ptr<WimaxConnection>>
m_primaryConnections
;
///< primary connections
96
std::vector<Ptr<WimaxConnection>>
m_transportConnections
;
///< transport connections
97
std::vector<Ptr<WimaxConnection>>
m_multicastConnections
;
///< multicast connections
98
// only for BS
99
CidFactory
*
m_cidFactory
;
///< the factory
100
};
101
102
}
// namespace ns3
103
104
#endif
/* CONNECTION_MANAGER_H */
cid.h
ns3::CidFactory
This class is used exclusively by the BS to allocate CIDs to new connections.
Definition
cid-factory.h:35
ns3::Cid
Cid class.
Definition
cid.h:26
ns3::Cid::Type
Type
Type enumeration.
Definition
cid.h:30
ns3::ConnectionManager
The same connection manager class serves both for BS and SS though some functions are exclusive to on...
Definition
connection-manager.h:37
ns3::ConnectionManager::m_primaryConnections
std::vector< Ptr< WimaxConnection > > m_primaryConnections
primary connections
Definition
connection-manager.h:95
ns3::ConnectionManager::m_basicConnections
std::vector< Ptr< WimaxConnection > > m_basicConnections
basic connections
Definition
connection-manager.h:94
ns3::ConnectionManager::~ConnectionManager
~ConnectionManager() override
Definition
connection-manager.cc:48
ns3::ConnectionManager::DoDispose
void DoDispose() override
Destructor implementation.
Definition
connection-manager.cc:44
ns3::ConnectionManager::ConnectionManager
ConnectionManager()
Definition
connection-manager.cc:38
ns3::ConnectionManager::HasPackets
bool HasPackets() const
Definition
connection-manager.cc:213
ns3::ConnectionManager::AllocateManagementConnections
void AllocateManagementConnections(SSRecord *ssRecord, RngRsp *rngrsp)
allocates the management connection for an ss record.
Definition
connection-manager.cc:59
ns3::ConnectionManager::m_transportConnections
std::vector< Ptr< WimaxConnection > > m_transportConnections
transport connections
Definition
connection-manager.h:96
ns3::ConnectionManager::GetConnection
Ptr< WimaxConnection > GetConnection(Cid cid)
Definition
connection-manager.cc:118
ns3::ConnectionManager::CreateConnection
Ptr< WimaxConnection > CreateConnection(Cid::Type type)
create a connection of type type
Definition
connection-manager.cc:72
ns3::ConnectionManager::GetConnections
std::vector< Ptr< WimaxConnection > > GetConnections(Cid::Type type) const
Definition
connection-manager.cc:148
ns3::ConnectionManager::GetNPackets
uint32_t GetNPackets(Cid::Type type, ServiceFlow::SchedulingType schedulingType) const
get number of packets
Definition
connection-manager.cc:172
ns3::ConnectionManager::SetCidFactory
void SetCidFactory(CidFactory *cidFactory)
Set CID factory.
Definition
connection-manager.cc:53
ns3::ConnectionManager::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
connection-manager.cc:32
ns3::ConnectionManager::AddConnection
void AddConnection(Ptr< WimaxConnection > connection, Cid::Type type)
add a connection to the list of managed connections
Definition
connection-manager.cc:95
ns3::ConnectionManager::m_cidFactory
CidFactory * m_cidFactory
the factory
Definition
connection-manager.h:99
ns3::ConnectionManager::m_multicastConnections
std::vector< Ptr< WimaxConnection > > m_multicastConnections
multicast connections
Definition
connection-manager.h:97
ns3::Object
A base class which provides memory management and object aggregation.
Definition
object.h:78
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::RngRsp
This class implements the ranging response message described by "IEEE Standard forLocal and metropoli...
Definition
mac-messages.h:114
ns3::SSRecord
This class is used by the base station to store some information related to subscriber station in the...
Definition
ss-record.h:35
ns3::ServiceFlow::SchedulingType
SchedulingType
section 11.13.11 Service flow scheduling type, page 701
Definition
service-flow.h:51
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
wimax-connection.h
src
wimax
model
connection-manager.h
Generated on Fri Nov 8 2024 13:59:09 for ns-3 by
1.11.0