A Discrete-Event Network Simulator
API
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  * 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: Marco Miozzo <marco.miozzo@cttc.es>
18  * Nicola Baldo <nbaldo@cttc.es>
19  */
20 #ifndef EPS_BEARER_TAG_H
21 #define EPS_BEARER_TAG_H
22 
23 #include "ns3/tag.h"
24 
25 namespace ns3
26 {
27 
28 class Tag;
29 
35 class EpsBearerTag : public Tag
36 {
37  public:
42  static TypeId GetTypeId();
43  TypeId GetInstanceTypeId() const override;
44 
48  EpsBearerTag();
49 
56  EpsBearerTag(uint16_t rnti, uint8_t bid);
57 
63  void SetRnti(uint16_t rnti);
64 
70  void SetBid(uint8_t bid);
71 
72  void Serialize(TagBuffer i) const override;
73  void Deserialize(TagBuffer i) override;
74  uint32_t GetSerializedSize() const override;
75  void Print(std::ostream& os) const override;
76 
81  uint16_t GetRnti() const;
86  uint8_t GetBid() const;
87 
88  private:
89  uint16_t m_rnti;
90  uint8_t m_bid;
91 };
92 
93 } // namespace ns3
94 
95 #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: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.