A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
cid-factory.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2007,2008,2009 INRIA, UDcast
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Authors: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
18
* Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
19
* <amine.ismail@UDcast.com>
20
*/
21
22
#ifndef CONNECTION_IDENTIFIER_FACTORY_H
23
#define CONNECTION_IDENTIFIER_FACTORY_H
24
25
#include "
cid.h
"
26
27
#include <stdint.h>
28
29
namespace
ns3
30
{
31
45
class
CidFactory
46
{
47
public
:
51
CidFactory
();
56
Cid
AllocateBasic
();
61
Cid
AllocatePrimary
();
66
Cid
AllocateTransportOrSecondary
();
71
Cid
AllocateMulticast
();
77
Cid
Allocate
(
Cid::Type
type
);
78
84
bool
IsTransport
(
Cid
cid)
const
;
90
bool
IsPrimary
(
Cid
cid)
const
;
96
bool
IsBasic
(
Cid
cid)
const
;
97
103
void
FreeCid
(
Cid
cid);
104
105
private
:
106
uint16_t
m_m
;
107
108
uint16_t
m_basicIdentifier
;
109
uint16_t
m_primaryIdentifier
;
110
uint16_t
m_transportOrSecondaryIdentifier
;
111
uint16_t
m_multicastPollingIdentifier
;
112
};
113
114
}
// namespace ns3
115
116
#endif
/* CONNECTION_IDENTIFIER_FACTORY_H */
cid.h
ns3::CidFactory
This class is used exclusively by the BS to allocate CIDs to new connections.
Definition:
cid-factory.h:46
ns3::CidFactory::m_m
uint16_t m_m
m
Definition:
cid-factory.h:106
ns3::CidFactory::Allocate
Cid Allocate(Cid::Type type)
This function returns the next CID for the specified type.
Definition:
cid-factory.cc:74
ns3::CidFactory::m_basicIdentifier
uint16_t m_basicIdentifier
basic identifier
Definition:
cid-factory.h:108
ns3::CidFactory::IsBasic
bool IsBasic(Cid cid) const
This function determines if the CID is basic.
Definition:
cid-factory.cc:113
ns3::CidFactory::m_transportOrSecondaryIdentifier
uint16_t m_transportOrSecondaryIdentifier
transport or secondary identifier
Definition:
cid-factory.h:110
ns3::CidFactory::AllocatePrimary
Cid AllocatePrimary()
This function returns the next primary basic CID.
Definition:
cid-factory.cc:50
ns3::CidFactory::AllocateTransportOrSecondary
Cid AllocateTransportOrSecondary()
This function returns the next Transport (or Secondary) CID.
Definition:
cid-factory.cc:58
ns3::CidFactory::m_multicastPollingIdentifier
uint16_t m_multicastPollingIdentifier
multicast polling identifier
Definition:
cid-factory.h:111
ns3::CidFactory::IsPrimary
bool IsPrimary(Cid cid) const
This function determines if the CID is primary.
Definition:
cid-factory.cc:106
ns3::CidFactory::AllocateBasic
Cid AllocateBasic()
This function returns the next basic CID.
Definition:
cid-factory.cc:42
ns3::CidFactory::IsTransport
bool IsTransport(Cid cid) const
This function determines if the CID is a transport.
Definition:
cid-factory.cc:99
ns3::CidFactory::m_primaryIdentifier
uint16_t m_primaryIdentifier
primary identifier
Definition:
cid-factory.h:109
ns3::CidFactory::AllocateMulticast
Cid AllocateMulticast()
This function returns the next Multicast CID.
Definition:
cid-factory.cc:66
ns3::CidFactory::CidFactory
CidFactory()
Create a cid factory with a default value for m of 0x5500.
Definition:
cid-factory.cc:31
ns3::CidFactory::FreeCid
void FreeCid(Cid cid)
Notify the factory that the connection associated to this cid has been killed and that this cid can b...
Definition:
cid-factory.cc:120
ns3::Cid
Cid class.
Definition:
cid.h:37
ns3::Cid::Type
Type
Type enumeration.
Definition:
cid.h:41
check-style-clang-format.type
type
Definition:
check-style-clang-format.py:704
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
wimax
model
cid-factory.h
Generated on Sun Mar 3 2024 17:11:13 for ns-3 by
1.9.1