A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
wimax-connection.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
* Author: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
18
* Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
19
*/
20
21
#ifndef WIMAX_CONNECTION_H
22
#define WIMAX_CONNECTION_H
23
24
#include "
cid.h
"
25
#include "
service-flow.h
"
26
#include "
wimax-mac-header.h
"
27
#include "
wimax-mac-queue.h
"
28
29
#include "ns3/object.h"
30
31
#include <ostream>
32
#include <stdint.h>
33
34
namespace
ns3
35
{
36
37
class
ServiceFlow;
38
class
Cid;
39
44
class
WimaxConnection
:
public
Object
45
{
46
public
:
51
static
TypeId
GetTypeId
();
52
59
WimaxConnection
(
Cid
cid,
Cid::Type
type
);
60
~WimaxConnection
()
override
;
61
66
Cid
GetCid
()
const
;
67
72
Cid::Type
GetType
()
const
;
76
Ptr<WimaxMacQueue>
GetQueue
()
const
;
81
void
SetServiceFlow
(
ServiceFlow
* serviceFlow);
85
ServiceFlow
*
GetServiceFlow
()
const
;
86
87
// wrapper functions
91
uint8_t
GetSchedulingType
()
const
;
99
bool
Enqueue
(
Ptr<Packet>
packet,
const
MacHeaderType
& hdrType,
const
GenericMacHeader
& hdr);
105
Ptr<Packet>
Dequeue
(
MacHeaderType::HeaderType
packetType =
MacHeaderType::HEADER_TYPE_GENERIC
);
115
Ptr<Packet>
Dequeue
(
MacHeaderType::HeaderType
packetType, uint32_t availableByte);
119
bool
HasPackets
()
const
;
126
bool
HasPackets
(
MacHeaderType::HeaderType
packetType)
const
;
127
132
std::string
GetTypeStr
()
const
;
133
135
typedef
std::list<Ptr<const Packet>>
FragmentsQueue
;
140
const
FragmentsQueue
GetFragmentsQueue
()
const
;
145
void
FragmentEnqueue
(
Ptr<const Packet>
fragment);
149
void
ClearFragmentsQueue
();
150
151
private
:
152
void
DoDispose
()
override
;
153
154
Cid
m_cid
;
155
Cid::Type
m_cidType
;
156
Ptr<WimaxMacQueue>
m_queue
;
157
ServiceFlow
*
m_serviceFlow
;
158
159
// FragmentsQueue stores all received fragments
160
FragmentsQueue
m_fragmentsQueue
;
161
};
162
163
}
// namespace ns3
164
165
#endif
/* WIMAX_CONNECTION_H */
cid.h
ns3::Cid
Cid class.
Definition:
cid.h:37
ns3::Cid::Type
Type
Type enumeration.
Definition:
cid.h:41
ns3::GenericMacHeader
This class implements the Generic mac Header as described by IEEE Standard for Local and metropolitan...
Definition:
wimax-mac-header.h:114
ns3::MacHeaderType
This class Represents the HT (Header Type) field of generic MAC and bandwidth request headers.
Definition:
wimax-mac-header.h:38
ns3::MacHeaderType::HeaderType
HeaderType
Header type enumeration.
Definition:
wimax-mac-header.h:42
ns3::MacHeaderType::HEADER_TYPE_GENERIC
@ HEADER_TYPE_GENERIC
Definition:
wimax-mac-header.h:43
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:89
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:77
ns3::ServiceFlow
This class implements service flows as described by the IEEE-802.16 standard.
Definition:
service-flow.h:43
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3::WimaxConnection
Class to represent WiMAX connections.
Definition:
wimax-connection.h:45
ns3::WimaxConnection::m_serviceFlow
ServiceFlow * m_serviceFlow
service flow
Definition:
wimax-connection.h:157
ns3::WimaxConnection::Enqueue
bool Enqueue(Ptr< Packet > packet, const MacHeaderType &hdrType, const GenericMacHeader &hdr)
enqueue a packet in the queue of the connection
Definition:
wimax-connection.cc:126
ns3::WimaxConnection::GetTypeStr
std::string GetTypeStr() const
Get type string.
Definition:
wimax-connection.cc:158
ns3::WimaxConnection::GetServiceFlow
ServiceFlow * GetServiceFlow() const
Definition:
wimax-connection.cc:114
ns3::WimaxConnection::DoDispose
void DoDispose() override
Destructor implementation.
Definition:
wimax-connection.cc:83
ns3::WimaxConnection::GetType
Cid::Type GetType() const
Get type function.
Definition:
wimax-connection.cc:96
ns3::WimaxConnection::Dequeue
Ptr< Packet > Dequeue(MacHeaderType::HeaderType packetType=MacHeaderType::HEADER_TYPE_GENERIC)
dequeue a packet from the queue of the connection
Definition:
wimax-connection.cc:134
ns3::WimaxConnection::ClearFragmentsQueue
void ClearFragmentsQueue()
delete all enqueued fragments
Definition:
wimax-connection.cc:195
ns3::WimaxConnection::GetCid
Cid GetCid() const
Get CID function.
Definition:
wimax-connection.cc:90
ns3::WimaxConnection::GetSchedulingType
uint8_t GetSchedulingType() const
Definition:
wimax-connection.cc:120
ns3::WimaxConnection::m_cid
Cid m_cid
CID.
Definition:
wimax-connection.h:154
ns3::WimaxConnection::WimaxConnection
WimaxConnection(Cid cid, Cid::Type type)
Constructor.
Definition:
wimax-connection.cc:70
ns3::WimaxConnection::SetServiceFlow
void SetServiceFlow(ServiceFlow *serviceFlow)
set the service flow associated to this connection
Definition:
wimax-connection.cc:108
ns3::WimaxConnection::GetQueue
Ptr< WimaxMacQueue > GetQueue() const
Definition:
wimax-connection.cc:102
ns3::WimaxConnection::m_queue
Ptr< WimaxMacQueue > m_queue
queue
Definition:
wimax-connection.h:156
ns3::WimaxConnection::HasPackets
bool HasPackets() const
Definition:
wimax-connection.cc:146
ns3::WimaxConnection::m_cidType
Cid::Type m_cidType
CID type.
Definition:
wimax-connection.h:155
ns3::WimaxConnection::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
wimax-connection.cc:35
ns3::WimaxConnection::FragmentsQueue
std::list< Ptr< const Packet > > FragmentsQueue
Definition of Fragments Queue data type.
Definition:
wimax-connection.h:135
ns3::WimaxConnection::m_fragmentsQueue
FragmentsQueue m_fragmentsQueue
fragments queue
Definition:
wimax-connection.h:160
ns3::WimaxConnection::GetFragmentsQueue
const FragmentsQueue GetFragmentsQueue() const
get a queue of received fragments
Definition:
wimax-connection.cc:183
ns3::WimaxConnection::FragmentEnqueue
void FragmentEnqueue(Ptr< const Packet > fragment)
enqueue a received packet (that is a fragment) into the fragments queue
Definition:
wimax-connection.cc:189
ns3::WimaxConnection::~WimaxConnection
~WimaxConnection() override
Definition:
wimax-connection.cc:78
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.
service-flow.h
wimax-mac-header.h
wimax-mac-queue.h
src
wimax
model
wimax-connection.h
Generated on Sun Mar 3 2024 17:11:14 for ns-3 by
1.9.1