A Discrete-Event Network Simulator
API
eps-bearer-tag.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2011,2012 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: Marco Miozzo <marco.miozzo@cttc.es>
19  * Nicola Baldo <nbaldo@cttc.es>
20  */
21 #ifndef EPS_BEARER_TAG_H
22 #define EPS_BEARER_TAG_H
23 
24 #include "ns3/tag.h"
25 
26 namespace ns3 {
27 
28 class Tag;
29 
30 
36 class EpsBearerTag : public Tag
37 {
38 public:
43  static TypeId GetTypeId (void);
44  virtual TypeId GetInstanceTypeId (void) const;
45 
49  EpsBearerTag ();
50 
57  EpsBearerTag (uint16_t rnti, uint8_t bid);
58 
64  void SetRnti (uint16_t rnti);
65 
71  void SetBid (uint8_t bid);
72 
73  virtual void Serialize (TagBuffer i) const;
74  virtual void Deserialize (TagBuffer i);
75  virtual uint32_t GetSerializedSize () const;
76  virtual void Print (std::ostream &os) const;
77 
82  uint16_t GetRnti (void) const;
87  uint8_t GetBid (void) const;
88 
89 private:
90  uint16_t m_rnti;
91  uint8_t m_bid;
92 
93 };
94 
95 
96 
97 } // namespace ns3
98 
99 #endif /* EPS_BEARER_TAG_H */
Tag used to define the RNTI and EPS bearer ID for packets interchanged between the EpcEnbApplication ...
uint16_t m_rnti
RNTI value.
void SetBid(uint8_t bid)
Set the bearer id to the given value.
uint8_t GetBid(void) const
Get Bearer Id function.
uint16_t GetRnti(void) const
Get RNTI function.
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
EpsBearerTag()
Create an empty EpsBearerTag.
void SetRnti(uint16_t rnti)
Set the RNTI to the given value.
tag a set of bytes in a packet
Definition: tag.h:36
static TypeId GetTypeId(void)
Get the type ID.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
read and write tag data
Definition: tag-buffer.h:51
virtual void Serialize(TagBuffer i) const
virtual void Deserialize(TagBuffer i)
uint8_t m_bid
Bearer Id value.
virtual void Print(std::ostream &os) const
a unique identifier for an interface.
Definition: type-id.h:58
virtual uint32_t GetSerializedSize() const