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
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
41
class
WimaxConnection
:
public
Object
42
{
43
public
:
44
static
TypeId
GetTypeId
(
void
);
45
46
WimaxConnection
(
Cid
cid,
enum
Cid::Type
type);
47
~WimaxConnection
(
void
);
48
49
Cid
GetCid
(
void
)
const
;
50
51
enum
Cid::Type
GetType
(
void
)
const
;
55
Ptr<WimaxMacQueue>
GetQueue
(
void
)
const
;
60
void
SetServiceFlow
(
ServiceFlow
*serviceFlow);
64
ServiceFlow
*
GetServiceFlow
(
void
)
const
;
65
66
// wrapper functions
70
uint8_t
GetSchedulingType
(
void
)
const
;
77
bool
Enqueue
(
Ptr<Packet>
packet,
const
MacHeaderType
&hdrType,
const
GenericMacHeader
&hdr);
82
Ptr<Packet>
Dequeue
(
MacHeaderType::HeaderType
packetType =
MacHeaderType::HEADER_TYPE_GENERIC
);
83
Ptr<Packet>
Dequeue
(
MacHeaderType::HeaderType
packetType, uint32_t availableByte);
87
bool
HasPackets
(
void
)
const
;
92
bool
HasPackets
(
MacHeaderType::HeaderType
packetType)
const
;
93
94
std::string
GetTypeStr
(
void
)
const
;
95
96
// Definition of Fragments Queue data type
97
typedef
std::list<Ptr<const Packet> >
FragmentsQueue
;
101
const
FragmentsQueue
GetFragmentsQueue
(
void
)
const
;
106
void
FragmentEnqueue
(
Ptr<const Packet>
fragment);
110
void
ClearFragmentsQueue
(
void
);
111
112
private
:
113
virtual
void
DoDispose
(
void
);
114
115
Cid
m_cid
;
116
enum
Cid::Type
m_cidType
;
117
Ptr<WimaxMacQueue>
m_queue
;
118
ServiceFlow
*
m_serviceFlow
;
119
120
// FragmentsQueue stores all received fragments
121
FragmentsQueue
m_fragmentsQueue
;
122
};
123
124
}
// namespace ns3
125
126
#endif
/* WIMAX_CONNECTION_H */
ns3::MacHeaderType::HeaderType
HeaderType
this class implements the mac header type field.
Definition:
wimax-mac-header.h:42
ns3::Ptr
smart pointer class similar to boost::intrusive_ptr
Definition:
ptr.h:59
ns3::MacHeaderType::HEADER_TYPE_GENERIC
Definition:
wimax-mac-header.h:44
ns3::Cid::Type
Type
Definition:
cid.h:38
ns3::WimaxConnection::~WimaxConnection
~WimaxConnection(void)
Definition:
wimax-connection.cc:74
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:190
ns3::WimaxConnection::m_cid
Cid m_cid
Definition:
wimax-connection.h:115
ns3::WimaxConnection::m_serviceFlow
ServiceFlow * m_serviceFlow
Definition:
wimax-connection.h:118
ns3::WimaxConnection::m_cidType
enum Cid::Type m_cidType
Definition:
wimax-connection.h:116
service-flow.h
ns3::WimaxConnection::GetSchedulingType
uint8_t GetSchedulingType(void) const
Definition:
wimax-connection.cc:116
ns3::WimaxConnection
Definition:
wimax-connection.h:41
ns3::WimaxConnection::GetServiceFlow
ServiceFlow * GetServiceFlow(void) const
Definition:
wimax-connection.cc:110
ns3::GenericMacHeader
this class implements the Generic mac Header as described by IEEE Standard for Local and metropolitan...
Definition:
wimax-mac-header.h:84
ns3::WimaxConnection::GetQueue
Ptr< WimaxMacQueue > GetQueue(void) const
Definition:
wimax-connection.cc:98
ns3::WimaxConnection::WimaxConnection
WimaxConnection(Cid cid, enum Cid::Type type)
Definition:
wimax-connection.cc:66
ns3::WimaxConnection::GetFragmentsQueue
const FragmentsQueue GetFragmentsQueue(void) const
get a queue of received fragments
Definition:
wimax-connection.cc:184
ns3::WimaxConnection::GetType
enum Cid::Type GetType(void) const
Definition:
wimax-connection.cc:92
ns3::WimaxConnection::DoDispose
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
Definition:
wimax-connection.cc:79
ns3::WimaxConnection::HasPackets
bool HasPackets(void) const
Definition:
wimax-connection.cc:141
ns3::MacHeaderType
Represents the HT (Header Type) field of generic MAC and bandwidth request headers.
Definition:
wimax-mac-header.h:34
wimax-mac-header.h
ns3::WimaxConnection::ClearFragmentsQueue
void ClearFragmentsQueue(void)
delete all enqueued fragments
Definition:
wimax-connection.cc:196
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:122
ns3::Cid
Definition:
cid.h:35
ns3::ServiceFlow
This class implements service flows as described by the IEEE-802.16 standard.
Definition:
service-flow.h:39
ns3::WimaxConnection::GetCid
Cid GetCid(void) const
Definition:
wimax-connection.cc:86
ns3::WimaxConnection::FragmentsQueue
std::list< Ptr< const Packet > > FragmentsQueue
Definition:
wimax-connection.h:97
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:129
cid.h
ns3::WimaxConnection::SetServiceFlow
void SetServiceFlow(ServiceFlow *serviceFlow)
set the service flow associated to this connection
Definition:
wimax-connection.cc:104
ns3::WimaxConnection::m_fragmentsQueue
FragmentsQueue m_fragmentsQueue
Definition:
wimax-connection.h:121
ns3::WimaxConnection::GetTypeId
static TypeId GetTypeId(void)
Definition:
wimax-connection.cc:33
ns3::WimaxConnection::GetTypeStr
std::string GetTypeStr(void) const
Definition:
wimax-connection.cc:153
wimax-mac-queue.h
ns3::Object
a base class which provides memory management and object aggregation
Definition:
object.h:63
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:49
ns3::WimaxConnection::m_queue
Ptr< WimaxMacQueue > m_queue
Definition:
wimax-connection.h:117
src
wimax
model
wimax-connection.h
Generated on Sat Apr 19 2014 14:07:13 for ns-3 by
1.8.6