RlcUmRxEntityBase.h Source File

Simu5G: RlcUmRxEntityBase.h Source File
Simu5G
RlcUmRxEntityBase.h
1//
2// Simu5G
3//
4// Authors: Giovanni Nardini, Giovanni Stea, Antonio Virdis (University of Pisa), 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_RLCUMRXENTITYBASE_H_
13#define _SIMU5G_RLCUMRXENTITYBASE_H_
14
15#include "simu5g/common/LteDefs.h"
16#include "simu5g/stack/rlc/RlcRxEntityBase.h"
17#include "simu5g/stack/rlc/LteRlcDefs.h"
18
19namespace simu5g {
20
21using namespace omnetpp;
22
23class LteMacBase;
24class RlcMux;
25
38{
39 protected:
40
41 // Node id of the owner module
42 MacNodeId ownerNodeId_;
43
44 // The mux feeding this entity (for UL burst-throughput reporting)
45 RlcMux *rlcMux_ = nullptr;
46
47 // UL data-burst accounting (TS 136.314), eNB only
48 enum BurstCheck { ENQUE, REORDERING };
49 bool isBurst_ = false;
50 unsigned int totalBits_ = 0;
51 unsigned int ttiBits_ = 0;
52 simtime_t t1_ = 0;
53 simtime_t t2_ = 0;
54
55 // Signals. Declared/registered in one translation unit (RlcUmRxEntityBase.cc),
56 // in their historical order, so registerSignal() ordering -- and therefore result
57 // recording -- is unaffected by the split. Emitted by the concrete subclasses.
58 static simsignal_t rlcDelaySignal_[2];
59 static simsignal_t rlcThroughputSignal_[2];
60 static simsignal_t rlcPduDelaySignal_[2];
61 static simsignal_t rlcPduThroughputSignal_[2];
62 static simsignal_t receivedPacketFromLowerLayerSignal_;
63 static simsignal_t sentPacketToUpperLayerSignal_;
64
65 void initialize(int stage) override;
66
67 // UL throughput burst accounting (shared accumulator; per-mode buffer-empty check
68 // via isEmpty()).
69 virtual void handleBurst(BurstCheck event);
70
71 // --- mode-specific hooks, implemented by the concrete subclasses ---
72
73 // Mode-specific INITSTAGE_LOCAL init (buffers, timers, window, rlcMux_ lookup).
74 virtual void initMode(LteMacBase *mac) = 0;
75
76 public:
77
78 // Enqueues a lower-layer PDU into the entity for reassembly
79 virtual void enque(cPacket *pkt) = 0;
80
81 // returns true if the entity contains no buffered RLC data
82 virtual bool isEmpty() const = 0;
83};
84
85} //namespace
86
87#endif
MAC Layer.
Definition LteMacBase.h:80
Lower-layer RLC packet dispatcher.
Definition RlcMux.h:37
Abstract base class for all RLC RX entities (UM, TM, AM).
Definition RlcRxEntityBase.h:29
Common shell of the RLC UM receiving entity.
Definition RlcUmRxEntityBase.h:38
Definition AlertReceiver.h:24