A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
cid.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2007,2008,2009 INRIA, UDcast
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Authors: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
19
* Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
20
* <amine.ismail@UDcast.com>
21
*/
22
23
24
#ifndef CID_H
25
#define CID_H
26
27
#include <stdint.h>
28
#include <ostream>
29
30
namespace
ns3 {
31
35
class
Cid
36
{
37
public
:
38
enum
Type
39
{
40
BROADCAST
= 1,
41
INITIAL_RANGING
,
42
BASIC
,
43
PRIMARY
,
44
TRANSPORT
,
45
MULTICAST
,
46
PADDING
47
};
48
49
// Create a cid of unknown type
50
Cid
(
void
);
51
Cid
(uint16_t cid);
52
~Cid
(
void
);
56
uint16_t
GetIdentifier
(
void
)
const
;
60
bool
IsMulticast
(
void
)
const
;
64
bool
IsBroadcast
(
void
)
const
;
68
bool
IsPadding
(
void
)
const
;
72
bool
IsInitialRanging
(
void
)
const
;
76
static
Cid
Broadcast
(
void
);
80
static
Cid
Padding
(
void
);
84
static
Cid
InitialRanging
(
void
);
85
86
private
:
87
friend
class
CidFactory
;
88
friend
bool
operator ==
(
const
Cid
&lhs,
const
Cid
&rhs);
89
uint16_t
m_identifier
;
90
};
91
92
bool
operator ==
(
const
Cid
&lhs,
const
Cid
&rhs);
93
bool
operator !=
(
const
Cid
&lhs,
const
Cid
&rhs);
94
95
std::ostream &
operator <<
(std::ostream &os,
const
Cid
&cid);
96
97
}
// namespace ns3
98
99
#endif
/* CID_H */
src
wimax
model
cid.h
Generated on Tue May 14 2013 11:08:37 for ns-3 by
1.8.1.2