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
cid.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 CID_H
12
#define CID_H
13
14
#include <ostream>
15
#include <stdint.h>
16
17
namespace
ns3
18
{
19
20
/**
21
* \ingroup wimax
22
* \class Cid
23
* \brief Cid class
24
*/
25
class
Cid
26
{
27
public
:
28
/// Type enumeration
29
enum
Type
30
{
31
BROADCAST
= 1,
32
INITIAL_RANGING
,
33
BASIC
,
34
PRIMARY
,
35
TRANSPORT
,
36
MULTICAST
,
37
PADDING
38
};
39
40
/// Create a cid of unknown type
41
Cid
();
42
/**
43
* Constructor
44
*
45
* \param cid
46
*/
47
Cid
(uint16_t cid);
48
~Cid
();
49
/**
50
* \return the identifier of the cid
51
*/
52
uint16_t
GetIdentifier
()
const
;
53
/**
54
* \return true if the cid is a multicast cid, false otherwise
55
*/
56
bool
IsMulticast
()
const
;
57
/**
58
* \return true if the cid is a broadcast cid, false otherwise
59
*/
60
bool
IsBroadcast
()
const
;
61
/**
62
* \return true if the cid is a padding cid, false otherwise
63
*/
64
bool
IsPadding
()
const
;
65
/**
66
* \return true if the cid is an initial ranging cid, false otherwise
67
*/
68
bool
IsInitialRanging
()
const
;
69
/**
70
* \return the broadcast cid
71
*/
72
static
Cid
Broadcast
();
73
/**
74
* \return the padding cid
75
*/
76
static
Cid
Padding
();
77
/**
78
* \return the initial ranging cid
79
*/
80
static
Cid
InitialRanging
();
81
82
private
:
83
/// allow CidFactory class friend access
84
friend
class
CidFactory
;
85
/// equality operator
86
friend
bool
operator==
(
const
Cid
& lhs,
const
Cid
& rhs);
87
uint16_t
m_identifier
;
///< identiifier
88
};
89
90
bool
operator==
(
const
Cid
& lhs,
const
Cid
& rhs);
91
bool
operator!=
(
const
Cid
& lhs,
const
Cid
& rhs);
92
93
std::ostream&
operator<<
(std::ostream& os,
const
Cid
& cid);
94
95
}
// namespace ns3
96
97
#endif
/* 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::Cid::PRIMARY
@ PRIMARY
Definition
cid.h:34
ns3::Cid::BROADCAST
@ BROADCAST
Definition
cid.h:31
ns3::Cid::TRANSPORT
@ TRANSPORT
Definition
cid.h:35
ns3::Cid::MULTICAST
@ MULTICAST
Definition
cid.h:36
ns3::Cid::BASIC
@ BASIC
Definition
cid.h:33
ns3::Cid::PADDING
@ PADDING
Definition
cid.h:37
ns3::Cid::INITIAL_RANGING
@ INITIAL_RANGING
Definition
cid.h:32
ns3::Cid::GetIdentifier
uint16_t GetIdentifier() const
Definition
cid.cc:34
ns3::Cid::IsInitialRanging
bool IsInitialRanging() const
Definition
cid.cc:58
ns3::Cid::~Cid
~Cid()
Definition
cid.cc:29
ns3::Cid::Cid
Cid()
Create a cid of unknown type.
Definition
cid.cc:19
ns3::Cid::InitialRanging
static Cid InitialRanging()
Definition
cid.cc:76
ns3::Cid::IsPadding
bool IsPadding() const
Definition
cid.cc:52
ns3::Cid::Padding
static Cid Padding()
Definition
cid.cc:70
ns3::Cid::operator==
friend bool operator==(const Cid &lhs, const Cid &rhs)
equality operator
Definition
cid.cc:88
ns3::Cid::IsMulticast
bool IsMulticast() const
Definition
cid.cc:40
ns3::Cid::IsBroadcast
bool IsBroadcast() const
Definition
cid.cc:46
ns3::Cid::Broadcast
static Cid Broadcast()
Definition
cid.cc:64
ns3::Cid::m_identifier
uint16_t m_identifier
identiifier
Definition
cid.h:87
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::operator!=
bool operator!=(Callback< R, Args... > a, Callback< R, Args... > b)
Inequality test.
Definition
callback.h:658
ns3::operator==
bool operator==(const EventId &a, const EventId &b)
Definition
event-id.h:155
ns3::operator<<
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition
angles.cc:148
src
wimax
model
cid.h
Generated on Fri Nov 8 2024 13:59:09 for ns-3 by
1.11.0