LteRlcAmRxEntity.h Source File

Simu5G: LteRlcAmRxEntity.h Source File
Simu5G
LteRlcAmRxEntity.h
1//
2// Simu5G
3//
4// Authors: Esteban Egea Lopez (Universidad Politécnica de Cartagena), Andras Varga (OpenSim Ltd)
5//
6// This file is part of a software released under the license included in file
7// "license.pdf". Please read LICENSE and README files before using it.
8// The above files and the present reference are part of the software itself,
9// and cannot be removed from it.
10//
11
12#ifndef _SIMU5G_LTERLCAMRXENTITY_H_
13#define _SIMU5G_LTERLCAMRXENTITY_H_
14
15#include <inet/common/packet/Packet.h>
16
17#include "simu5g/stack/rlc/am/RlcAmRxEntityBase.h"
18#include "simu5g/stack/rlc/am/RlcSduSlidingWindowReceptionBuffer.h"
19
20namespace simu5g {
21
22using namespace omnetpp;
23
39{
40 // The receiving window; the unit the SN denotes is the AMD PDU
41 // (TS 36.322), not the SDU as in the NR entity.
42 RlcSduSlidingWindowReceptionBuffer *rxBuffer_ = nullptr;
43 unsigned int amWindowSize_ = 512; // TS 36.322: 512 (10-bit SN space)
44 omnetpp::cMessage *tReorderingTimer_ = nullptr;
45 omnetpp::simtime_t tReordering_;
46 omnetpp::cMessage *tStatusProhibitTimer_ = nullptr;
47 omnetpp::simtime_t tStatusProhibit_;
48 unsigned int rxNextStatusTrigger_ = 0;
49 bool statusReportPending_ = false;
50
51 // An SDU cut across a PDU boundary: the whole-SDU dup carried by the last
52 // fragment seen, and how many of its bytes have arrived so far.
53 struct PendingSdu {
54 inet::Packet *pkt = nullptr;
55 size_t accumulated = 0;
56
57 friend std::ostream& operator<<(std::ostream& os, const PendingSdu& e) {
58 os << "pkt=" << (e.pkt ? e.pkt->getName() : "null") << " accumulated=" << e.accumulated;
59 return os;
60 }
61 } pendingSdu_;
62
63 public:
64 ~LteRlcAmRxEntity() override;
65
66 void enque(inet::Packet *pkt) override;
67 void handleMessage(cMessage *msg) override;
68
69 protected:
70 void initMode() override;
71
72 private:
73 virtual void passUpPdu(uint32_t sn);
74 virtual void deliverSdu(inet::Packet *sdu);
75 virtual void sendStatusReport();
76};
77
78} //namespace
79
80#endif
LTE (TS 36.322) RLC AM receiving entity.
Definition LteRlcAmRxEntity.h:39
Common shell of the RLC AM receiving entity.
Definition RlcAmRxEntityBase.h:42
Definition AlertReceiver.h:24