A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-rlc-tag.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011 CTTC
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Jaume Nin <jaume.nin@cttc.es>
7 */
8
9#ifndef RLC_TAG_H
10#define RLC_TAG_H
11
12#include "ns3/nstime.h"
13#include "ns3/packet.h"
14
15namespace ns3
16{
17
18class Tag;
19
20/**
21 * Tag to calculate the per-PDU delay from eNb RLC to UE RLC
22 */
23
24class RlcTag : public Tag
25{
26 public:
27 /**
28 * @brief Get the type ID.
29 * @return the object TypeId
30 */
31 static TypeId GetTypeId();
32 TypeId GetInstanceTypeId() const override;
33
34 /**
35 * Create an empty RLC tag
36 */
37 RlcTag();
38 /**
39 * Create an RLC tag with the given senderTimestamp
40 * @param senderTimestamp the time
41 */
42 RlcTag(Time senderTimestamp);
43
44 void Serialize(TagBuffer i) const override;
45 void Deserialize(TagBuffer i) override;
46 uint32_t GetSerializedSize() const override;
47 void Print(std::ostream& os) const override;
48
49 /**
50 * Get the instant when the RLC delivers the PDU to the MAC SAP provider
51 * @return the sender timestamp
52 */
54 {
55 return m_senderTimestamp;
56 }
57
58 /**
59 * Set the sender timestamp
60 * @param senderTimestamp time stamp of the instant when the RLC delivers the PDU to the MAC SAP
61 * provider
62 */
63 void SetSenderTimestamp(Time senderTimestamp)
64 {
65 this->m_senderTimestamp = senderTimestamp;
66 }
67
68 private:
69 Time m_senderTimestamp; ///< sender timestamp
70};
71
72} // namespace ns3
73
74#endif /* RLC_TAG_H */
Tag to calculate the per-PDU delay from eNb RLC to UE RLC.
Definition lte-rlc-tag.h:25
Time m_senderTimestamp
sender timestamp
Definition lte-rlc-tag.h:69
uint32_t GetSerializedSize() const override
Time GetSenderTimestamp() const
Get the instant when the RLC delivers the PDU to the MAC SAP provider.
Definition lte-rlc-tag.h:53
RlcTag()
Create an empty RLC tag.
static TypeId GetTypeId()
Get the type ID.
void SetSenderTimestamp(Time senderTimestamp)
Set the sender timestamp.
Definition lte-rlc-tag.h:63
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
void Serialize(TagBuffer i) const override
void Print(std::ostream &os) const override
void Deserialize(TagBuffer i) override
read and write tag data
Definition tag-buffer.h:41
tag a set of bytes in a packet
Definition tag.h:28
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.