A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
eps-bearer-tag.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011,2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Marco Miozzo <marco.miozzo@cttc.es>
7 * Nicola Baldo <nbaldo@cttc.es>
8 */
9#ifndef EPS_BEARER_TAG_H
10#define EPS_BEARER_TAG_H
11
12#include "ns3/tag.h"
13
14namespace ns3
15{
16
17class Tag;
18
19/**
20 * Tag used to define the RNTI and EPS bearer ID for packets
21 * interchanged between the EpcEnbApplication and the LteEnbNetDevice
22 */
23
24class EpsBearerTag : public Tag
25{
26 public:
27 /**
28 * \brief Get the type ID.
29 * \return the object TypeId
30 */
31 static TypeId GetTypeId();
32 TypeId GetInstanceTypeId() const override;
33
34 /**
35 * Create an empty EpsBearerTag
36 */
38
39 /**
40 * Create a EpsBearerTag with the given RNTI and bearer id
41 *
42 * @param rnti the value of the RNTI to set
43 * @param bid the value of the Bearer Id to set
44 */
45 EpsBearerTag(uint16_t rnti, uint8_t bid);
46
47 /**
48 * Set the RNTI to the given value.
49 *
50 * @param rnti the value of the RNTI to set
51 */
52 void SetRnti(uint16_t rnti);
53
54 /**
55 * Set the bearer id to the given value.
56 *
57 * @param bid the value of the Bearer Id to set
58 */
59 void SetBid(uint8_t bid);
60
61 void Serialize(TagBuffer i) const override;
62 void Deserialize(TagBuffer i) override;
63 uint32_t GetSerializedSize() const override;
64 void Print(std::ostream& os) const override;
65
66 /**
67 * Get RNTI function
68 * \returns the RNTI
69 */
70 uint16_t GetRnti() const;
71 /**
72 * Get Bearer Id function
73 * \returns the Bearer Id
74 */
75 uint8_t GetBid() const;
76
77 private:
78 uint16_t m_rnti; ///< RNTI value
79 uint8_t m_bid; ///< Bearer Id value
80};
81
82} // namespace ns3
83
84#endif /* EPS_BEARER_TAG_H */
Tag used to define the RNTI and EPS bearer ID for packets interchanged between the EpcEnbApplication ...
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
uint16_t m_rnti
RNTI value.
void Deserialize(TagBuffer i) override
uint8_t GetBid() const
Get Bearer Id function.
void Serialize(TagBuffer i) const override
static TypeId GetTypeId()
Get the type ID.
uint8_t m_bid
Bearer Id value.
void Print(std::ostream &os) const override
uint32_t GetSerializedSize() const override
uint16_t GetRnti() const
Get RNTI function.
void SetRnti(uint16_t rnti)
Set the RNTI to the given value.
void SetBid(uint8_t bid)
Set the bearer id to the given value.
EpsBearerTag()
Create an empty EpsBearerTag.
read and write tag data
Definition tag-buffer.h:41
tag a set of bytes in a packet
Definition tag.h:28
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.