A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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:
39  static TypeId GetTypeId (void);
40  virtual TypeId GetInstanceTypeId (void) const;
41 
45  EpsBearerTag ();
46 
50  EpsBearerTag (uint16_t rnti, uint8_t bid);
51 
57  void SetRnti (uint16_t rnti);
58 
64  void SetBid (uint8_t bid);
65 
66  virtual void Serialize (TagBuffer i) const;
67  virtual void Deserialize (TagBuffer i);
68  virtual uint32_t GetSerializedSize () const;
69  virtual void Print (std::ostream &os) const;
70 
71  uint16_t GetRnti (void) const;
72  uint8_t GetBid (void) const;
73 
74 private:
75  uint16_t m_rnti;
76  uint8_t m_bid;
77 
78 };
79 
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 ...
void SetBid(uint8_t bid)
Set the bearer id to the given value.
uint8_t GetBid(void) const
uint16_t GetRnti(void) const
virtual TypeId GetInstanceTypeId(void) const
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)
read and write tag data
Definition: tag-buffer.h:51
virtual void Serialize(TagBuffer i) const
virtual void Deserialize(TagBuffer i)
virtual void Print(std::ostream &os) const
a unique identifier for an interface.
Definition: type-id.h:49
virtual uint32_t GetSerializedSize() const