A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-pdcp-header.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Manuel Requena <manuel.requena@cttc.es>
7 */
8
9#ifndef LTE_PDCP_HEADER_H
10#define LTE_PDCP_HEADER_H
11
12#include "ns3/header.h"
13
14#include <list>
15
16namespace ns3
17{
18
19/**
20 * \ingroup lte
21 * \brief The packet header for the Packet Data Convergence Protocol (PDCP) packets
22 *
23 * This class has fields corresponding to those in an PDCP header as well as
24 * methods for serialization to and deserialization from a byte buffer.
25 * It follows 3GPP TS 36.323 Packet Data Convergence Protocol (PDCP) specification.
26 */
27class LtePdcpHeader : public Header
28{
29 public:
30 /**
31 * \brief Constructor
32 *
33 * Creates a null header
34 */
36 ~LtePdcpHeader() override;
37
38 /**
39 * \brief Set DC bit
40 *
41 * \param dcBit DC bit to set
42 */
43 void SetDcBit(uint8_t dcBit);
44 /**
45 * \brief Set sequence number
46 *
47 * \param sequenceNumber sequence number
48 */
49 void SetSequenceNumber(uint16_t sequenceNumber);
50
51 /**
52 * \brief Get DC bit
53 *
54 * \returns DC bit
55 */
56 uint8_t GetDcBit() const;
57 /**
58 * \brief Get sequence number
59 *
60 * \returns sequence number
61 */
62 uint16_t GetSequenceNumber() const;
63
64 /// DcBit_t typedef
65 enum
66 {
68 DATA_PDU = 1
69 } DcBit_t; ///< DcBit_t typedef
70
71 /**
72 * \brief Get the type ID.
73 * \return the object TypeId
74 */
75 static TypeId GetTypeId();
76 TypeId GetInstanceTypeId() const override;
77 void Print(std::ostream& os) const override;
78 uint32_t GetSerializedSize() const override;
79 void Serialize(Buffer::Iterator start) const override;
81
82 private:
83 uint8_t m_dcBit; ///< the DC bit
84 uint16_t m_sequenceNumber; ///< the sequence number
85};
86
87} // namespace ns3
88
89#endif // LTE_PDCP_HEADER_H
iterator in a Buffer instance
Definition buffer.h:89
Protocol header serialization and deserialization.
Definition header.h:33
The packet header for the Packet Data Convergence Protocol (PDCP) packets.
uint16_t GetSequenceNumber() const
Get sequence number.
void SetDcBit(uint8_t dcBit)
Set DC bit.
void Print(std::ostream &os) const override
uint32_t Deserialize(Buffer::Iterator start) override
uint8_t m_dcBit
the DC bit
static TypeId GetTypeId()
Get the type ID.
uint32_t GetSerializedSize() const override
LtePdcpHeader()
Constructor.
void SetSequenceNumber(uint16_t sequenceNumber)
Set sequence number.
uint16_t m_sequenceNumber
the sequence number
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
void Serialize(Buffer::Iterator start) const override
uint8_t GetDcBit() const
Get DC bit.
enum ns3::LtePdcpHeader::@58 DcBit_t
DcBit_t typedef.
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.