5G-LENA nr-v4.0-29-g6d8085cd
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-rlc-tag.h
1// Copyright (c) 2011 CTTC
2//
3// SPDX-License-Identifier: GPL-2.0-only
4//
5// Author: Jaume Nin <jaume.nin@cttc.es>
6
7#ifndef NR_RLC_TAG_H
8#define NR_RLC_TAG_H
9
10#include "ns3/nstime.h"
11#include "ns3/packet.h"
12
13namespace ns3
14{
15
16class Tag;
17
22class NrRlcTag : public Tag
23{
24 public:
29 static TypeId GetTypeId();
30 TypeId GetInstanceTypeId() const override;
31
35 NrRlcTag();
40 NrRlcTag(Time senderTimestamp);
41
42 void Serialize(TagBuffer i) const override;
43 void Deserialize(TagBuffer i) override;
44 uint32_t GetSerializedSize() const override;
45 void Print(std::ostream& os) const override;
46
51 Time GetSenderTimestamp() const
52 {
53 return m_senderTimestamp;
54 }
55
61 void SetSenderTimestamp(Time senderTimestamp)
62 {
63 this->m_senderTimestamp = senderTimestamp;
64 }
65
70 uint16_t GetTxRnti() const
71 {
72 return m_txRnti;
73 }
74
79 void SetTxRnti(uint16_t rnti)
80 {
81 this->m_txRnti = rnti;
82 }
83
84 private:
85 Time m_senderTimestamp;
86 uint16_t m_txRnti{std::numeric_limits<uint16_t>::max()};
87};
88
89} // namespace ns3
90
91#endif /* NR_RLC_TAG_H */
uint16_t GetTxRnti() const
Definition nr-rlc-tag.h:70
Time GetSenderTimestamp() const
Definition nr-rlc-tag.h:51
static TypeId GetTypeId()
Get the type ID.
Definition nr-rlc-tag.cc:31
void SetSenderTimestamp(Time senderTimestamp)
Definition nr-rlc-tag.h:61
void SetTxRnti(uint16_t rnti)
Definition nr-rlc-tag.h:79