5G-LENA nr-v4.0-29-g6d8085cd
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-rlc-sdu-status-tag.cc
1// Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
2//
3// SPDX-License-Identifier: GPL-2.0-only
4//
5// Author: Manuel Requena <manuel.requena@cttc.es>
6
7#include "nr-rlc-sdu-status-tag.h"
8
9namespace ns3
10{
11
12NS_OBJECT_ENSURE_REGISTERED(NrRlcSduStatusTag);
13
14NrRlcSduStatusTag::NrRlcSduStatusTag()
15{
16}
17
18void
20{
21 m_sduStatus = status;
22}
23
24uint8_t
26{
27 return m_sduStatus;
28}
29
30TypeId
32{
33 static TypeId tid = TypeId("ns3::NrRlcSduStatusTag")
34 .SetParent<Tag>()
35 .SetGroupName("Nr")
36 .AddConstructor<NrRlcSduStatusTag>();
37 return tid;
38}
39
40TypeId
41NrRlcSduStatusTag::GetInstanceTypeId() const
42{
43 return GetTypeId();
44}
45
46uint32_t
47NrRlcSduStatusTag::GetSerializedSize() const
48{
49 return 1;
50}
51
52void
53NrRlcSduStatusTag::Serialize(TagBuffer i) const
54{
55 i.WriteU8(m_sduStatus);
56}
57
58void
59NrRlcSduStatusTag::Deserialize(TagBuffer i)
60{
61 m_sduStatus = i.ReadU8();
62}
63
64void
65NrRlcSduStatusTag::Print(std::ostream& os) const
66{
67 os << "SDU Status=" << (uint32_t)m_sduStatus;
68}
69
70}; // namespace ns3
This class implements a tag that carries the status of a RLC SDU for the fragmentation process Status...
void SetStatus(uint8_t status)
static TypeId GetTypeId()
Get the type ID.