A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
lte-rlc-sdu-status-tag.cc
Go to the documentation of this file.
1
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
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: Manuel Requena <manuel.requena@cttc.es>
19
*/
20
21
#include "ns3/lte-rlc-sdu-status-tag.h"
22
23
namespace
ns3
{
24
25
NS_OBJECT_ENSURE_REGISTERED
(LteRlcSduStatusTag);
26
27
LteRlcSduStatusTag::LteRlcSduStatusTag
()
28
{
29
}
30
31
void
32
LteRlcSduStatusTag::SetStatus
(uint8_t status)
33
{
34
m_sduStatus
= status;
35
}
36
37
uint8_t
38
LteRlcSduStatusTag::GetStatus
(
void
)
const
39
{
40
return
m_sduStatus
;
41
}
42
43
TypeId
44
LteRlcSduStatusTag::GetTypeId
(
void
)
45
{
46
static
TypeId
tid =
TypeId
(
"ns3::LteRlcSduStatusTag"
)
47
.
SetParent
<
Tag
> ()
48
.SetGroupName(
"Lte"
)
49
.AddConstructor<
LteRlcSduStatusTag
> ()
50
;
51
return
tid;
52
}
53
TypeId
54
LteRlcSduStatusTag::GetInstanceTypeId
(
void
)
const
55
{
56
return
GetTypeId
();
57
}
58
59
uint32_t
60
LteRlcSduStatusTag::GetSerializedSize
(
void
)
const
61
{
62
return
1;
63
}
64
void
65
LteRlcSduStatusTag::Serialize
(
TagBuffer
i)
const
66
{
67
i.
WriteU8
(
m_sduStatus
);
68
}
69
void
70
LteRlcSduStatusTag::Deserialize
(
TagBuffer
i)
71
{
72
m_sduStatus
= i.
ReadU8
();
73
}
74
void
75
LteRlcSduStatusTag::Print
(std::ostream &os)
const
76
{
77
os <<
"SDU Status="
<< (uint32_t)
m_sduStatus
;
78
}
79
80
};
// namespace ns3
ns3::LteRlcSduStatusTag
This class implements a tag that carries the status of a RLC SDU for the fragmentation process Status...
Definition:
lte-rlc-sdu-status-tag.h:35
ns3::LteRlcSduStatusTag::LteRlcSduStatusTag
LteRlcSduStatusTag()
Definition:
lte-rlc-sdu-status-tag.cc:27
ns3::LteRlcSduStatusTag::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
lte-rlc-sdu-status-tag.cc:44
ns3::LteRlcSduStatusTag::Serialize
virtual void Serialize(TagBuffer i) const
Definition:
lte-rlc-sdu-status-tag.cc:65
ns3::LteRlcSduStatusTag::m_sduStatus
uint8_t m_sduStatus
SDU status.
Definition:
lte-rlc-sdu-status-tag.h:71
ns3::LteRlcSduStatusTag::Print
virtual void Print(std::ostream &os) const
Definition:
lte-rlc-sdu-status-tag.cc:75
ns3::LteRlcSduStatusTag::GetInstanceTypeId
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition:
lte-rlc-sdu-status-tag.cc:54
ns3::LteRlcSduStatusTag::GetSerializedSize
virtual uint32_t GetSerializedSize(void) const
Definition:
lte-rlc-sdu-status-tag.cc:60
ns3::LteRlcSduStatusTag::Deserialize
virtual void Deserialize(TagBuffer i)
Definition:
lte-rlc-sdu-status-tag.cc:70
ns3::LteRlcSduStatusTag::SetStatus
void SetStatus(uint8_t status)
Set status function.
Definition:
lte-rlc-sdu-status-tag.cc:32
ns3::LteRlcSduStatusTag::GetStatus
uint8_t GetStatus(void) const
Get status function.
Definition:
lte-rlc-sdu-status-tag.cc:38
ns3::TagBuffer
read and write tag data
Definition:
tag-buffer.h:52
ns3::TagBuffer::WriteU8
TAG_BUFFER_INLINE void WriteU8(uint8_t v)
Definition:
tag-buffer.h:172
ns3::TagBuffer::ReadU8
TAG_BUFFER_INLINE uint8_t ReadU8(void)
Definition:
tag-buffer.h:195
ns3::Tag
tag a set of bytes in a packet
Definition:
tag.h:37
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition:
type-id.cc:922
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition:
object-base.h:45
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lte
model
lte-rlc-sdu-status-tag.cc
Generated on Tue Feb 6 2024 19:21:22 for ns-3 by
1.9.1