RlcAmRxEntityBase.h Source File

Simu5G: RlcAmRxEntityBase.h Source File
Simu5G
RlcAmRxEntityBase.h
1//
2// Simu5G
3//
4// Authors: 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_RLCAMRXENTITYBASE_H_
13#define _SIMU5G_RLCAMRXENTITYBASE_H_
14
15#include <inet/common/packet/Packet.h>
16
17#include "simu5g/common/LteControlInfo.h"
18#include "simu5g/stack/rlc/RlcRxEntityBase.h"
19
20namespace simu5g {
21
22using namespace omnetpp;
23
24
42{
43 protected:
44
45 // Signals emitted by the concrete subclasses. Declared/registered in one
46 // translation unit (RlcAmRxEntityBase.cc), in their historical order, so
47 // registerSignal() ordering -- and therefore result recording -- is
48 // unaffected by the split.
49 static simsignal_t rlcPacketLossSignal_[2];
50 static simsignal_t rlcPduPacketLossSignal_[2];
51 static simsignal_t rlcDelaySignal_[2];
52 static simsignal_t rlcThroughputSignal_[2];
53 static simsignal_t rlcPduDelaySignal_[2];
54 static simsignal_t rlcPduThroughputSignal_[2];
55 static simsignal_t receivedPacketFromLowerLayerSignal_;
56 static simsignal_t sentPacketToUpperLayerSignal_;
57 static simsignal_t rxWindowOccupationSignal_;
58
59
60 // The reversed flow info used to stamp outgoing STATUS PDUs, built from the
61 // first received data PDU's flow info.
62 FlowControlInfo *ackFlowControlInfo_ = nullptr;
63 simtime_t lastSentAck_ = 0;
64
65 // Per-bearer throughput accounting, common to both passUp implementations.
66 unsigned int totalRcvdBytes_ = 0;
67 unsigned int totalPduRcvdBytes_ = 0;
68
74 virtual void emitRxStatistics(bool perPdu, double throughput, omnetpp::simtime_t delay);
75
76 void initialize(int stage) override;
77
78 // Mode-specific INITSTAGE_LOCAL init (buffers, timers, window).
79 virtual void initMode() = 0;
80
81 public:
82
83 // Enqueues a lower-layer PDU into the entity for reassembly
84 virtual void enque(inet::Packet *pdu) = 0;
85
86 ~RlcAmRxEntityBase() override { delete ackFlowControlInfo_; }
87};
88
89} //namespace
90
91#endif
Common shell of the RLC AM receiving entity.
Definition RlcAmRxEntityBase.h:42
virtual void emitRxStatistics(bool perPdu, double throughput, omnetpp::simtime_t delay)
Abstract base class for all RLC RX entities (UM, TM, AM).
Definition RlcRxEntityBase.h:29
Definition AlertReceiver.h:24