PdcpMux.h Source File

Simu5G: PdcpMux.h Source File
Simu5G
PdcpMux.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 _PDCP_MUX_H_
13#define _PDCP_MUX_H_
14
15#include <map>
16#include <set>
17
18#include "simu5g/common/LteCommon.h"
19#include "simu5g/common/LteControlInfo.h"
20
21namespace simu5g {
22
23using namespace omnetpp;
24
25
34class PdcpMux : public cSimpleModule
35{
36 protected:
37 cGate *upperLayerInGate_ = nullptr;
38 cGate *upperLayerOutGate_ = nullptr;
39
40 std::map<DrbKey, int> txGateIndices_; // DRB -> index of the toTxEntity gate serving it
41
42 public:
43 bool hasTxEntity(DrbKey id) const { return txGateIndices_.find(id) != txGateIndices_.end(); }
44 virtual void registerTxEntity(DrbKey id, int gateIndex);
45 virtual void unregisterTxEntity(DrbKey id);
46
47 protected:
48 void initialize(int stage) override;
49 int numInitStages() const override { return inet::NUM_INIT_STAGES; }
50 void handleMessage(cMessage *msg) override;
51
52 virtual void fromDataPort(cPacket *pkt);
53};
54
55} // namespace simu5g
56
57#endif
Definition LteTypes.h:191
Upper-layer PDCP packet dispatcher.
Definition PdcpMux.h:35
Definition AlertReceiver.h:24