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
qos-tag.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2009 MIRKO BANCHI
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: Mirko Banchi <mk.banchi@gmail.com>
19
*/
20
#ifndef QOS_TAG_H
21
#define QOS_TAG_H
22
23
#include "ns3/packet.h"
24
25
namespace
ns3 {
26
27
class
Tag;
28
29
39
enum
UserPriority
40
{
41
UP_BK
= 1,
42
UP_BE
= 0,
43
UP_EE
= 3,
44
UP_CL
= 4,
45
UP_VI
= 5,
46
UP_VO
= 6,
47
UP_NC
= 7
48
};
49
50
51
61
class
QosTag
:
public
Tag
62
{
63
public
:
64
static
TypeId
GetTypeId
(
void
);
65
virtual
TypeId
GetInstanceTypeId
(
void
)
const
;
66
70
QosTag
();
71
77
QosTag
(uint8_t tid);
78
86
void
SetTid
(uint8_t tid);
87
98
void
SetUserPriority
(
UserPriority
up);
99
100
virtual
void
Serialize
(
TagBuffer
i)
const
;
101
virtual
void
Deserialize
(
TagBuffer
i);
102
virtual
uint32_t
GetSerializedSize
()
const
;
103
virtual
void
Print
(std::ostream &os)
const
;
104
110
uint8_t
GetTid
(
void
)
const
;
111
112
private
:
113
uint8_t
m_tid
;
114
};
115
116
}
// namespace ns3
117
118
#endif
/* QOS_TAG_H */
ns3::QosTag::SetUserPriority
void SetUserPriority(UserPriority up)
Set the TID to the value that corresponds to the requested UserPriority.
Definition:
qos-tag.cc:65
ns3::QosTag::Deserialize
virtual void Deserialize(TagBuffer i)
Definition:
qos-tag.cc:83
ns3::UP_CL
controlled load
Definition:
qos-tag.h:44
ns3::QosTag::SetTid
void SetTid(uint8_t tid)
Set the TID to the given value.
Definition:
qos-tag.cc:59
ns3::UP_BE
best effort (default)
Definition:
qos-tag.h:42
ns3::QosTag::GetSerializedSize
virtual uint32_t GetSerializedSize() const
Definition:
qos-tag.cc:71
ns3::QosTag::Serialize
virtual void Serialize(TagBuffer i) const
Definition:
qos-tag.cc:77
ns3::UP_NC
network control
Definition:
qos-tag.h:47
ns3::QosTag
The aim of the QosTag is to provide means for an Application to specify the TID which will be used by...
Definition:
qos-tag.h:61
ns3::QosTag::GetInstanceTypeId
virtual TypeId GetInstanceTypeId(void) const
Definition:
qos-tag.cc:44
ns3::QosTag::Print
virtual void Print(std::ostream &os) const
Definition:
qos-tag.cc:95
ns3::Tag
tag a set of bytes in a packet
Definition:
tag.h:36
ns3::QosTag::GetTypeId
static TypeId GetTypeId(void)
Definition:
qos-tag.cc:30
ns3::UserPriority
UserPriority
As per IEEE Std.
Definition:
qos-tag.h:39
ns3::QosTag::QosTag
QosTag()
Create a QosTag with the default TID = 0 (best effort traffic)
Definition:
qos-tag.cc:49
ns3::TagBuffer
read and write tag data
Definition:
tag-buffer.h:51
ns3::QosTag::m_tid
uint8_t m_tid
Traffic ID.
Definition:
qos-tag.h:113
ns3::UP_BK
background
Definition:
qos-tag.h:41
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:49
ns3::UP_VO
voice, < 10ms latency and jitter
Definition:
qos-tag.h:46
ns3::QosTag::GetTid
uint8_t GetTid(void) const
Return the Type ID.
Definition:
qos-tag.cc:89
ns3::UP_VI
video, < 100ms latency and jitter
Definition:
qos-tag.h:45
ns3::UP_EE
excellent effort
Definition:
qos-tag.h:43
src
wifi
model
qos-tag.h
Generated on Sat Apr 19 2014 14:07:11 for ns-3 by
1.8.6