A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
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
16
namespace
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
*/
27
class
LtePdcpHeader
:
public
Header
28
{
29
public
:
30
/**
31
* \brief Constructor
32
*
33
* Creates a null header
34
*/
35
LtePdcpHeader
();
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
{
67
CONTROL_PDU
= 0,
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
;
80
uint32_t
Deserialize
(
Buffer::Iterator
start)
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
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition
buffer.h:89
ns3::Header
Protocol header serialization and deserialization.
Definition
header.h:33
ns3::LtePdcpHeader
The packet header for the Packet Data Convergence Protocol (PDCP) packets.
Definition
lte-pdcp-header.h:28
ns3::LtePdcpHeader::GetSequenceNumber
uint16_t GetSequenceNumber() const
Get sequence number.
Definition
lte-pdcp-header.cc:51
ns3::LtePdcpHeader::SetDcBit
void SetDcBit(uint8_t dcBit)
Set DC bit.
Definition
lte-pdcp-header.cc:33
ns3::LtePdcpHeader::Print
void Print(std::ostream &os) const override
Definition
lte-pdcp-header.cc:73
ns3::LtePdcpHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Definition
lte-pdcp-header.cc:95
ns3::LtePdcpHeader::m_dcBit
uint8_t m_dcBit
the DC bit
Definition
lte-pdcp-header.h:83
ns3::LtePdcpHeader::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
lte-pdcp-header.cc:57
ns3::LtePdcpHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition
lte-pdcp-header.cc:80
ns3::LtePdcpHeader::LtePdcpHeader
LtePdcpHeader()
Constructor.
Definition
lte-pdcp-header.cc:20
ns3::LtePdcpHeader::SetSequenceNumber
void SetSequenceNumber(uint16_t sequenceNumber)
Set sequence number.
Definition
lte-pdcp-header.cc:39
ns3::LtePdcpHeader::~LtePdcpHeader
~LtePdcpHeader() override
Definition
lte-pdcp-header.cc:26
ns3::LtePdcpHeader::m_sequenceNumber
uint16_t m_sequenceNumber
the sequence number
Definition
lte-pdcp-header.h:84
ns3::LtePdcpHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition
lte-pdcp-header.cc:67
ns3::LtePdcpHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Definition
lte-pdcp-header.cc:86
ns3::LtePdcpHeader::GetDcBit
uint8_t GetDcBit() const
Get DC bit.
Definition
lte-pdcp-header.cc:45
ns3::LtePdcpHeader::CONTROL_PDU
@ CONTROL_PDU
Definition
lte-pdcp-header.h:67
ns3::LtePdcpHeader::DATA_PDU
@ DATA_PDU
Definition
lte-pdcp-header.h:68
ns3::LtePdcpHeader::DcBit_t
enum ns3::LtePdcpHeader::@58 DcBit_t
DcBit_t typedef.
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lte
model
lte-pdcp-header.h
Generated on Fri Nov 8 2024 13:59:03 for ns-3 by
1.11.0