DrbTable.h Source File

Simu5G: DrbTable.h Source File
Simu5G
DrbTable.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 _DRB_TABLE_H_
13#define _DRB_TABLE_H_
14
15#include <map>
16
17#include "simu5g/stack/rrc/DrbDesc.h"
18
19namespace omnetpp { class cValueArray; class cValueMap; }
20
21using namespace omnetpp;
22
23namespace simu5g {
24
41class DrbTable : public cSimpleModule
42{
43 protected:
44 std::map<DrbKey, DrbDesc> drbs_; // established bearers
45 std::map<DrbKey, DrbDesc> configuredDrbs_; // configuration delivered by the core network
46
47 protected:
48 void initialize() override;
49 void handleMessage(cMessage *msg) override;
50 void refreshDisplay() const override;
51
52 public:
53 virtual const DrbDesc *findDrb(DrbKey key) const;
54 virtual DrbDesc& getOrCreateDrb(DrbKey key);
55 virtual const std::map<DrbKey, DrbDesc>& getDrbs() const { return drbs_; }
56
57 // Configuration delivered by the core network (UE side: keyed by NODEID_NONE)
58 virtual void addConfiguredDrb(const DrbDesc& drb) { configuredDrbs_[drb.key] = drb; }
59 virtual const DrbDesc *findConfiguredDrb(DrbKey key) const;
60 virtual const std::map<DrbKey, DrbDesc>& getConfiguredDrbs() const { return configuredDrbs_; }
61
62 // Teardown: mirrors the lifecycle of the bearer's PDCP entity (see
63 // BearerManagement::deleteLocalPdcpEntities). Established bearers only; the
64 // authored configuration is not affected.
65 virtual void removeDrb(DrbKey key);
66 virtual void removeDrbsOfPeer(MacNodeId peerId);
67 virtual void removeAllDrbs();
68};
69
70} // namespace simu5g
71
72#endif
Definition LteTypes.h:191
The node's data radio bearer configuration, owned by RRC.
Definition DrbTable.h:42
Definition AlertReceiver.h:24