RlcMux.h Source File

Simu5G: RlcMux.h Source File
Simu5G
RlcMux.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 _RLC_MUX_H_
13#define _RLC_MUX_H_
14
15#include <map>
16#include <set>
17#include <inet/common/ModuleRefByPar.h>
18
19#include "simu5g/common/LteCommon.h"
20#include "simu5g/common/LteControlInfo.h"
21#include "simu5g/mec/utils/MecCommon.h"
22
23namespace simu5g {
24
25using namespace omnetpp;
26
28
36class RlcMux : public cSimpleModule
37{
38 protected:
39 static simsignal_t receivedPacketFromLowerLayerSignal_;
40 static simsignal_t sentPacketToLowerLayerSignal_;
41
42 BearerManagement *bearerManagement_ = nullptr;
43
44 cGate *macInGate_ = nullptr;
45 cGate *macOutGate_ = nullptr;
46
47 std::map<DrbKey, int> rxGateIndices_; // DRB -> index of the toRxEntity gate serving it
48 std::map<DrbKey, int> txGateIndices_; // DRB -> index of the macToTxEntity gate serving it
49
50 typedef std::map<MacNodeId, Throughput> ULThroughputPerUE;
51 ULThroughputPerUE ulThroughput_;
52
53 public:
54 virtual void registerRxEntity(DrbKey id, int gateIndex);
55 virtual void unregisterRxEntity(DrbKey id);
56 virtual void registerTxEntity(DrbKey id, int gateIndex);
57 virtual void unregisterTxEntity(DrbKey id);
58 virtual void activeUeUL(std::set<MacNodeId> *ueSet);
59
60 virtual void addUeThroughput(MacNodeId nodeId, Throughput throughput);
61 virtual double getUeThroughput(MacNodeId nodeId);
62 virtual void resetThroughputStats(MacNodeId nodeId);
63
64 protected:
65 void initialize(int stage) override;
66 int numInitStages() const override { return inet::NUM_INIT_STAGES; }
67 void handleMessage(cMessage *msg) override;
68
69 virtual void fromMacLayer(cPacket *pkt);
70};
71
72} // namespace simu5g
73
74#endif
RRC Bearer Management — creates and tears down PDCP, RLC and MAC entities for data radio bearers.
Definition BearerManagement.h:49
Definition LteTypes.h:191
Lower-layer RLC packet dispatcher.
Definition RlcMux.h:37
Definition AlertReceiver.h:24