A Discrete-Event Network Simulator
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 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Author: Marco Miozzo <marco.miozzo@cttc.es>
18 */
19#ifndef LTE_RADIO_BEARER_TAG_H
20#define LTE_RADIO_BEARER_TAG_H
21
22#include "ns3/tag.h"
23
24namespace ns3
25{
26
27class Tag;
28
33class LteRadioBearerTag : public Tag
34{
35 public:
40 static TypeId GetTypeId();
41 TypeId GetInstanceTypeId() const override;
42
47
53 LteRadioBearerTag(uint16_t rnti, uint8_t lcId);
54
61 LteRadioBearerTag(uint16_t rnti, uint8_t lcId, uint8_t layer);
62
68 void SetRnti(uint16_t rnti);
69
75 void SetLcid(uint8_t lcid);
76
82 void SetLayer(uint8_t layer);
83
84 void Serialize(TagBuffer i) const override;
85 void Deserialize(TagBuffer i) override;
86 uint32_t GetSerializedSize() const override;
87 void Print(std::ostream& os) const override;
88
94 uint16_t GetRnti() const;
100 uint8_t GetLcid() const;
106 uint8_t GetLayer() const;
107
108 private:
109 uint16_t m_rnti;
110 uint8_t m_lcid;
111 uint8_t m_layer;
112};
113
114} // namespace ns3
115
116#endif /* LTE_RADIO_BEARER_TAG_H */
Tag used to define the RNTI and LC id for each MAC packet trasmitted.
uint32_t GetSerializedSize() const override
void Serialize(TagBuffer i) const override
void SetLayer(uint8_t layer)
Set the layer id to the given value.
uint16_t GetRnti() const
Get RNTI function.
void Print(std::ostream &os) const override
uint8_t GetLcid() const
Get LCID function.
static TypeId GetTypeId()
Get the type ID.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
LteRadioBearerTag()
Create an empty LteRadioBearerTag.
void SetRnti(uint16_t rnti)
Set the RNTI to the given value.
void SetLcid(uint8_t lcid)
Set the LC id to the given value.
uint8_t GetLayer() const
Get layer function.
void Deserialize(TagBuffer i) override
read and write tag data
Definition: tag-buffer.h:52
tag a set of bytes in a packet
Definition: tag.h:39
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.