A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
wimax
model
wimax-connection.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
* Author: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
19
* Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
20
*/
21
22
#ifndef WIMAX_CONNECTION_H
23
#define WIMAX_CONNECTION_H
24
25
#include <stdint.h>
26
#include <ostream>
27
#include "
cid.h
"
28
#include "
wimax-mac-header.h
"
29
#include "
wimax-mac-queue.h
"
30
#include "ns3/object.h"
31
#include "
service-flow.h
"
32
33
namespace
ns3
{
34
35
class
ServiceFlow;
36
class
Cid;
37
42
class
WimaxConnection
:
public
Object
43
{
44
public
:
49
static
TypeId
GetTypeId
(
void
);
50
57
WimaxConnection
(
Cid
cid,
enum
Cid::Type
type);
58
~WimaxConnection
(
void
);
59
64
Cid
GetCid
(
void
)
const
;
65
70
enum
Cid::Type
GetType
(
void
)
const
;
74
Ptr<WimaxMacQueue>
GetQueue
(
void
)
const
;
79
void
SetServiceFlow
(
ServiceFlow
*serviceFlow);
83
ServiceFlow
*
GetServiceFlow
(
void
)
const
;
84
85
// wrapper functions
89
uint8_t
GetSchedulingType
(
void
)
const
;
97
bool
Enqueue
(
Ptr<Packet>
packet,
const
MacHeaderType
&hdrType,
const
GenericMacHeader
&hdr);
103
Ptr<Packet>
Dequeue
(
MacHeaderType::HeaderType
packetType =
MacHeaderType::HEADER_TYPE_GENERIC
);
113
Ptr<Packet>
Dequeue
(
MacHeaderType::HeaderType
packetType, uint32_t availableByte);
117
bool
HasPackets
(
void
)
const
;
123
bool
HasPackets
(
MacHeaderType::HeaderType
packetType)
const
;
124
129
std::string
GetTypeStr
(
void
)
const
;
130
132
typedef
std::list<Ptr<const Packet> >
FragmentsQueue
;
137
const
FragmentsQueue
GetFragmentsQueue
(
void
)
const
;
142
void
FragmentEnqueue
(
Ptr<const Packet>
fragment);
146
void
ClearFragmentsQueue
(
void
);
147
148
private
:
149
virtual
void
DoDispose
(
void
);
150
151
Cid
m_cid
;
152
enum
Cid::Type
m_cidType
;
153
Ptr<WimaxMacQueue>
m_queue
;
154
ServiceFlow
*
m_serviceFlow
;
155
156
// FragmentsQueue stores all received fragments
157
FragmentsQueue
m_fragmentsQueue
;
158
};
159
160
}
// namespace ns3
161
162
#endif
/* WIMAX_CONNECTION_H */
ns3::MacHeaderType::HeaderType
HeaderType
Header type enumeration.
Definition:
wimax-mac-header.h:40
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:73
ns3::WimaxConnection::GetFragmentsQueue
const FragmentsQueue GetFragmentsQueue(void) const
get a queue of received fragments
Definition:
wimax-connection.cc:185
ns3::MacHeaderType::HEADER_TYPE_GENERIC
Definition:
wimax-mac-header.h:42
ns3::Cid::Type
Type
Type enumeration.
Definition:
cid.h:41
ns3::WimaxConnection::~WimaxConnection
~WimaxConnection(void)
Definition:
wimax-connection.cc:75
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:191
ns3::WimaxConnection::m_cid
Cid m_cid
CID.
Definition:
wimax-connection.h:151
ns3::WimaxConnection::m_serviceFlow
ServiceFlow * m_serviceFlow
service flow
Definition:
wimax-connection.h:154
ns3::WimaxConnection::m_cidType
enum Cid::Type m_cidType
CID type.
Definition:
wimax-connection.h:152
service-flow.h
ns3::WimaxConnection::GetSchedulingType
uint8_t GetSchedulingType(void) const
Definition:
wimax-connection.cc:117
ns3::WimaxConnection
Class to represent WiMAX connections.
Definition:
wimax-connection.h:42
ns3::GenericMacHeader
This class implements the Generic mac Header as described by IEEE Standard for Local and metropolitan...
Definition:
wimax-mac-header.h:108
ns3::WimaxConnection::GetServiceFlow
ServiceFlow * GetServiceFlow(void) const
Definition:
wimax-connection.cc:111
ns3::WimaxConnection::GetCid
Cid GetCid(void) const
Get CID function.
Definition:
wimax-connection.cc:87
ns3::WimaxConnection::WimaxConnection
WimaxConnection(Cid cid, enum Cid::Type type)
Constructor.
Definition:
wimax-connection.cc:67
ns3::WimaxConnection::GetQueue
Ptr< WimaxMacQueue > GetQueue(void) const
Definition:
wimax-connection.cc:99
ns3::WimaxConnection::DoDispose
virtual void DoDispose(void)
Destructor implementation.
Definition:
wimax-connection.cc:80
ns3::MacHeaderType
This class Represents the HT (Header Type) field of generic MAC and bandwidth request headers...
Definition:
wimax-mac-header.h:36
wimax-mac-header.h
ns3::WimaxConnection::ClearFragmentsQueue
void ClearFragmentsQueue(void)
delete all enqueued fragments
Definition:
wimax-connection.cc:197
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:123
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::Cid
Cid class.
Definition:
cid.h:37
ns3::WimaxConnection::GetTypeStr
std::string GetTypeStr(void) const
Get type string.
Definition:
wimax-connection.cc:154
ns3::ServiceFlow
This class implements service flows as described by the IEEE-802.16 standard.
Definition:
service-flow.h:39
ns3::WimaxConnection::FragmentsQueue
std::list< Ptr< const Packet > > FragmentsQueue
Definition of Fragments Queue data type.
Definition:
wimax-connection.h:132
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:130
cid.h
ns3::WimaxConnection::SetServiceFlow
void SetServiceFlow(ServiceFlow *serviceFlow)
set the service flow associated to this connection
Definition:
wimax-connection.cc:105
ns3::WimaxConnection::m_fragmentsQueue
FragmentsQueue m_fragmentsQueue
fragments queue
Definition:
wimax-connection.h:157
ns3::WimaxConnection::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
wimax-connection.cc:32
wimax-mac-queue.h
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:87
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:58
ns3::WimaxConnection::GetType
enum Cid::Type GetType(void) const
Get type function.
Definition:
wimax-connection.cc:93
ns3::WimaxConnection::HasPackets
bool HasPackets(void) const
Definition:
wimax-connection.cc:142
ns3::WimaxConnection::m_queue
Ptr< WimaxMacQueue > m_queue
queue
Definition:
wimax-connection.h:153
Generated on Wed Nov 7 2018 10:02:16 for ns-3 by
1.8.14