A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lte-rlc-sdu-status-tag.cc
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2011 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: Manuel Requena <manuel.requena@cttc.es>
19  */
20 
21 #include "ns3/lte-rlc-sdu-status-tag.h"
22 
23 namespace ns3 {
24 
25 NS_OBJECT_ENSURE_REGISTERED (LteRlcSduStatusTag)
26  ;
27 
29 {
30 }
31 
32 void
34 {
35  m_sduStatus = status;
36 }
37 
38 uint8_t
40 {
41  return m_sduStatus;
42 }
43 
44 TypeId
46 {
47  static TypeId tid = TypeId ("ns3::LteRlcSduStatusTag")
48  .SetParent<Tag> ()
49  .AddConstructor<LteRlcSduStatusTag> ()
50  ;
51  return tid;
52 }
53 TypeId
55 {
56  return GetTypeId ();
57 }
58 
59 uint32_t
61 {
62  return 1;
63 }
64 void
66 {
67  i.WriteU8 (m_sduStatus);
68 }
69 void
71 {
72  m_sduStatus = i.ReadU8 ();
73 }
74 void
75 LteRlcSduStatusTag::Print (std::ostream &os) const
76 {
77  os << "SDU Status=" << (uint32_t) m_sduStatus;
78 }
79 
80 }; // namespace ns3
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
virtual void Deserialize(TagBuffer i)
TAG_BUFFER_INLINE uint8_t ReadU8(void)
Definition: tag-buffer.h:179
virtual void Serialize(TagBuffer i) const
uint8_t GetStatus(void) const
virtual TypeId GetInstanceTypeId(void) const
tag a set of bytes in a packet
Definition: tag.h:36
TAG_BUFFER_INLINE void WriteU8(uint8_t v)
Definition: tag-buffer.h:156
virtual uint32_t GetSerializedSize(void) const
read and write tag data
Definition: tag-buffer.h:51
void SetStatus(uint8_t status)
virtual void Print(std::ostream &os) const
a unique identifier for an interface.
Definition: type-id.h:49
TypeId SetParent(TypeId tid)
Definition: type-id.cc:611