A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
lte-radio-bearer-tag.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Author: Marco Miozzo <marco.miozzo@cttc.es>
7
*/
8
#ifndef LTE_RADIO_BEARER_TAG_H
9
#define LTE_RADIO_BEARER_TAG_H
10
11
#include "ns3/tag.h"
12
13
namespace
ns3
14
{
15
16
class
Tag;
17
18
/**
19
* Tag used to define the RNTI and LC id for each MAC packet transmitted
20
*/
21
22
class
LteRadioBearerTag
:
public
Tag
23
{
24
public
:
25
/**
26
* \brief Get the type ID.
27
* \return the object TypeId
28
*/
29
static
TypeId
GetTypeId
();
30
TypeId
GetInstanceTypeId
()
const override
;
31
32
/**
33
* Create an empty LteRadioBearerTag
34
*/
35
LteRadioBearerTag
();
36
37
/**
38
* Create a LteRadioBearerTag with the given RNTI and LC id
39
* \param rnti the RNTI
40
* \param lcId the LCID
41
*/
42
LteRadioBearerTag
(uint16_t rnti, uint8_t lcId);
43
44
/**
45
* Create a LteRadioBearerTag with the given RNTI, LC id and layer
46
* \param rnti the RNTI
47
* \param lcId the LCID
48
* \param layer the layer
49
*/
50
LteRadioBearerTag
(uint16_t rnti, uint8_t lcId, uint8_t layer);
51
52
/**
53
* Set the RNTI to the given value.
54
*
55
* @param rnti the value of the RNTI to set
56
*/
57
void
SetRnti
(uint16_t rnti);
58
59
/**
60
* Set the LC id to the given value.
61
*
62
* @param lcid the value of the RNTI to set
63
*/
64
void
SetLcid
(uint8_t lcid);
65
66
/**
67
* Set the layer id to the given value.
68
*
69
* @param layer the value of the layer to set
70
*/
71
void
SetLayer
(uint8_t layer);
72
73
void
Serialize
(
TagBuffer
i)
const override
;
74
void
Deserialize
(
TagBuffer
i)
override
;
75
uint32_t
GetSerializedSize
()
const override
;
76
void
Print
(std::ostream& os)
const override
;
77
78
/**
79
* Get RNTI function
80
*
81
* \returns RNTI
82
*/
83
uint16_t
GetRnti
()
const
;
84
/**
85
* Get LCID function
86
*
87
* \returns LCID
88
*/
89
uint8_t
GetLcid
()
const
;
90
/**
91
* Get layer function
92
*
93
* \returns layer
94
*/
95
uint8_t
GetLayer
()
const
;
96
97
private
:
98
uint16_t
m_rnti
;
///< RNTI
99
uint8_t
m_lcid
;
///< LCID
100
uint8_t
m_layer
;
///< layer
101
};
102
103
}
// namespace ns3
104
105
#endif
/* LTE_RADIO_BEARER_TAG_H */
ns3::LteRadioBearerTag
Tag used to define the RNTI and LC id for each MAC packet transmitted.
Definition
lte-radio-bearer-tag.h:23
ns3::LteRadioBearerTag::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition
lte-radio-bearer-tag.cc:86
ns3::LteRadioBearerTag::Serialize
void Serialize(TagBuffer i) const override
Definition
lte-radio-bearer-tag.cc:92
ns3::LteRadioBearerTag::SetLayer
void SetLayer(uint8_t layer)
Set the layer id to the given value.
Definition
lte-radio-bearer-tag.cc:80
ns3::LteRadioBearerTag::GetRnti
uint16_t GetRnti() const
Get RNTI function.
Definition
lte-radio-bearer-tag.cc:108
ns3::LteRadioBearerTag::Print
void Print(std::ostream &os) const override
Definition
lte-radio-bearer-tag.cc:126
ns3::LteRadioBearerTag::GetLcid
uint8_t GetLcid() const
Get LCID function.
Definition
lte-radio-bearer-tag.cc:114
ns3::LteRadioBearerTag::m_rnti
uint16_t m_rnti
RNTI.
Definition
lte-radio-bearer-tag.h:98
ns3::LteRadioBearerTag::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
lte-radio-bearer-tag.cc:20
ns3::LteRadioBearerTag::m_layer
uint8_t m_layer
layer
Definition
lte-radio-bearer-tag.h:100
ns3::LteRadioBearerTag::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition
lte-radio-bearer-tag.cc:42
ns3::LteRadioBearerTag::LteRadioBearerTag
LteRadioBearerTag()
Create an empty LteRadioBearerTag.
Definition
lte-radio-bearer-tag.cc:47
ns3::LteRadioBearerTag::SetRnti
void SetRnti(uint16_t rnti)
Set the RNTI to the given value.
Definition
lte-radio-bearer-tag.cc:68
ns3::LteRadioBearerTag::SetLcid
void SetLcid(uint8_t lcid)
Set the LC id to the given value.
Definition
lte-radio-bearer-tag.cc:74
ns3::LteRadioBearerTag::m_lcid
uint8_t m_lcid
LCID.
Definition
lte-radio-bearer-tag.h:99
ns3::LteRadioBearerTag::GetLayer
uint8_t GetLayer() const
Get layer function.
Definition
lte-radio-bearer-tag.cc:120
ns3::LteRadioBearerTag::Deserialize
void Deserialize(TagBuffer i) override
Definition
lte-radio-bearer-tag.cc:100
ns3::TagBuffer
read and write tag data
Definition
tag-buffer.h:41
ns3::Tag
tag a set of bytes in a packet
Definition
tag.h:28
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lte
model
lte-radio-bearer-tag.h
Generated on Fri Nov 8 2024 13:59:03 for ns-3 by
1.11.0