A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-pdcp-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 * Nicola Baldo <nbaldo@cttc.es>
8 */
9
10#ifndef PDCP_TAG_H
11#define PDCP_TAG_H
12
13#include "ns3/nstime.h"
14#include "ns3/packet.h"
15
16namespace ns3
17{
18
19class Tag;
20
21/**
22 * Tag to calculate the per-PDU delay from eNb PDCP to UE PDCP
23 */
24
25class PdcpTag : public Tag
26{
27 public:
28 /**
29 * @brief Get the type ID.
30 * @return the object TypeId
31 */
32 static TypeId GetTypeId();
33 TypeId GetInstanceTypeId() const override;
34
35 /**
36 * Create an empty PDCP tag
37 */
38 PdcpTag();
39 /**
40 * Create an PDCP tag with the given senderTimestamp
41 * @param senderTimestamp the time stamp
42 */
43 PdcpTag(Time senderTimestamp);
44
45 void Serialize(TagBuffer i) const override;
46 void Deserialize(TagBuffer i) override;
47 uint32_t GetSerializedSize() const override;
48 void Print(std::ostream& os) const override;
49
50 /**
51 * Get the instant when the PDCP delivers the PDU to the MAC SAP provider
52 * @return the sender timestamp
53 */
55
56 /**
57 * Set the sender timestamp
58 * @param senderTimestamp time stamp of the instant when the PDCP delivers the PDU to the MAC
59 * SAP provider
60 */
61 void SetSenderTimestamp(Time senderTimestamp);
62
63 private:
64 Time m_senderTimestamp; ///< sender timestamp
65};
66
67} // namespace ns3
68
69#endif /* PDCP_TAG_H */
void SetSenderTimestamp(Time senderTimestamp)
Set the sender timestamp.
void Serialize(TagBuffer i) const override
Time GetSenderTimestamp() const
Get the instant when the PDCP delivers the PDU to the MAC SAP provider.
Time m_senderTimestamp
sender timestamp
void Print(std::ostream &os) const override
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
static TypeId GetTypeId()
Get the type ID.
uint32_t GetSerializedSize() const override
void Deserialize(TagBuffer i) override
PdcpTag()
Create an empty PDCP tag.
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:49
Every class exported by the ns3 library is enclosed in the ns3 namespace.