NrSdap.h Source File

Simu5G: NrSdap.h Source File
Simu5G
NrSdap.h
1//
2// Simu5G
3//
4// Authors: Mohamed Seliem (University College Cork), 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_NRRXSDAPENTITY_H_
13#define __SIMU5G_NRRXSDAPENTITY_H_
14
15#include <omnetpp.h>
16#include <set>
17#include "simu5g/stack/sdap/common/SdapDrbTable.h"
18#include "simu5g/stack/sdap/common/ReflectiveQosTable.h"
19#include "simu5g/stack/rrc/ConnectionControlBase.h"
20#include <inet/common/ModuleRefByPar.h>
21
22using namespace omnetpp;
23
24namespace inet {
25class Packet;
26}
27
28namespace simu5g {
29
44class NrSdap : public cSimpleModule
45{
46 protected:
47 SdapDrbTable drbTable_;
48 inet::ModuleRefByPar<ReflectiveQosTable> reflectiveQosTable;
49 inet::ModuleRefByPar<ConnectionControlBase> connectionControl_; // the node's control-plane entry point, the bearer-selection authority
50
51 // The bearers that currently exist on this node, as told by RRC (see
52 // bearerEstablished()). A packet mapped to a bearer that is not here needs one
53 // established.
54 std::set<DrbKey> establishedBearers_;
55
56 bool isUe = true; // Node role: true for UE, false for gNB
57 bool establishBearersOnDemand_ = true;
58 bool reflectiveQosOverridesQfi_ = false; // when a packet has both a classified QFI and a reflective QoS match: true = reflective wins
59
60 protected:
61 virtual bool isD2dFlow(inet::Packet *pkt);
62 virtual Qfi recoveryQfi(const DrbDesc *drb);
63 virtual bool shouldEnableReflectiveQos(Qfi qfi);
64 // The protocol a received packet goes up as. On an IP session that is the IP
65 // version the datagram carries, which the session type only validates.
66 virtual const inet::Protocol *getUpperProtocol(const DrbDesc *ctx, inet::Packet *pkt);
67 virtual void initialize() override;
68 virtual void handleMessage(cMessage *msg) override;
69 virtual void handleUpperPacket(inet::Packet *pkt);
70 virtual void handleLowerPacket(inet::Packet *pkt);
71
72 public:
73 // Configuration push: RRC installs (or replaces) a bearer's SDAP configuration.
74 // SDAP does not author its own configuration; this is the only write path into
75 // its DRB table.
76 virtual void configureDrb(const DrbDesc& drb);
77
78 // Bearer lifecycle notifications from RRC, which owns the entities. They keep
79 // establishedBearers_ current, so "does this DRB's bearer exist?" is answered from
80 // this module's own state instead of by inspecting the PDCP layer's registry.
81 virtual void bearerEstablished(DrbKey key);
82 virtual void bearerReleased(DrbKey key);
83};
84
85} //namespace
86
87#endif
Definition LteTypes.h:191
Definition NrSdap.h:45
Definition AlertReceiver.h:24