LtePdcpTxEntity.h Source File

Simu5G: LtePdcpTxEntity.h Source File
Simu5G
LtePdcpTxEntity.h
1//
2// Simu5G
3//
4// Copyright (C) 2012-2021 Giovanni Nardini, Giovanni Stea, Antonio Virdis et al. (University of Pisa)
5// Copyright (C) 2022-2026 Giovanni Nardini, Giovanni Stea et al. (University of Pisa)
6//
7// This file is part of a software released under the license included in file
8// "license.pdf". Please read LICENSE and README files before using it.
9// The above files and the present reference are part of the software itself,
10// and cannot be removed from it.
11//
12
13#ifndef _LTE_LTEPDCPTXENTITY_H_
14#define _LTE_LTEPDCPTXENTITY_H_
15
16#include <memory>
17
18#include <inet/common/ModuleRefByPar.h>
19
20#include "simu5g/common/LteCommon.h"
21#include "simu5g/stack/pdcp/PdcpTxEntityBase.h"
22#include "simu5g/common/LteControlInfo.h"
23#include "simu5g/common/binder/Binder.h"
24#include "simu5g/stack/pdcp/rohc/RohcCompressor.h"
25
26namespace simu5g {
27
28class LtePdcpHeader;
29
30using namespace inet;
31
42{
43 protected:
44 static simsignal_t receivedPacketFromUpperLayerSignal_;
45 static simsignal_t sentPacketToLowerLayerSignal_;
46 static simsignal_t pdcpSduSentSignal_;
47 // Modules references
48 inet::ModuleRefByPar<Binder> binder_;
49
50 // Identifier for this node
51 MacNodeId nodeId_;
52
53 // ROHC (RObust Header Compression), if the bearer has it configured
54 std::unique_ptr<RohcCompressor> rohc_;
55
56 // RLC mode of this bearer's logical channel, as pushed by RRC via the "rlcMode" NED
57 // param (see PdcpEntityBase); resolved once in initialize() into the PDCP header size.
58 RlcMode rlcType_ = UM;
59 unsigned int pdcpHeaderLength_ = PDCP_HEADER_UM;
60
61 // false on a multi-leg bearer: the compound's splitter emits the per-leg statistics
62 bool emitPerSduSignals_ = true;
63
64 // next sequence number to be assigned
65 unsigned int sno_ = 0;
66
67 // deliver the PDCP PDU to the lower layer
68 virtual void deliverPdcpPdu(Packet *pdcpPkt);
69
70 virtual void compressHeader(inet::Packet *pkt);
71
72 bool isCompressionEnabled() { return rohc_ != nullptr; }
73
74 public:
75
76
77 void initialize(int stage) override;
78
79 // create a PDCP PDU from the IP datagram
80 void handlePacketFromUpperLayer(Packet *pkt) override;
81};
82
83} //namespace
84
85#endif
86
Entity for PDCP Layer.
Definition LtePdcpTxEntity.h:42
Abstract base class for all TX PDCP entities.
Definition PdcpTxEntityBase.h:29
Definition AlertReceiver.h:24