8362
|
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 |
LteRlcSduStatusTag::LteRlcSduStatusTag ()
|
|
28 |
{
|
|
29 |
}
|
|
30 |
|
|
31 |
void
|
|
32 |
LteRlcSduStatusTag::SetStatus (uint8_t status)
|
|
33 |
{
|
|
34 |
m_sduStatus = status;
|
|
35 |
}
|
|
36 |
|
|
37 |
uint8_t
|
|
38 |
LteRlcSduStatusTag::GetStatus (void) const
|
|
39 |
{
|
|
40 |
return m_sduStatus;
|
|
41 |
}
|
|
42 |
|
|
43 |
TypeId
|
|
44 |
LteRlcSduStatusTag::GetTypeId (void)
|
|
45 |
{
|
|
46 |
static TypeId tid = TypeId ("ns3::LteRlcSduStatusTag")
|
|
47 |
.SetParent<Tag> ()
|
|
48 |
.AddConstructor<LteRlcSduStatusTag> ()
|
|
49 |
;
|
|
50 |
return tid;
|
|
51 |
}
|
|
52 |
TypeId
|
|
53 |
LteRlcSduStatusTag::GetInstanceTypeId (void) const
|
|
54 |
{
|
|
55 |
return GetTypeId ();
|
|
56 |
}
|
|
57 |
|
|
58 |
uint32_t
|
|
59 |
LteRlcSduStatusTag::GetSerializedSize (void) const
|
|
60 |
{
|
|
61 |
return 1;
|
|
62 |
}
|
|
63 |
void
|
|
64 |
LteRlcSduStatusTag::Serialize (TagBuffer i) const
|
|
65 |
{
|
|
66 |
i.WriteU8 (m_sduStatus);
|
|
67 |
}
|
|
68 |
void
|
|
69 |
LteRlcSduStatusTag::Deserialize (TagBuffer i)
|
|
70 |
{
|
|
71 |
m_sduStatus = i.ReadU8 ();
|
|
72 |
}
|
|
73 |
void
|
|
74 |
LteRlcSduStatusTag::Print (std::ostream &os) const
|
|
75 |
{
|
|
76 |
os << "SDU Status=" << (uint32_t) m_sduStatus;
|
|
77 |
}
|
|
78 |
|
|
79 |
}; // namespace ns3
|