Skip to content

Commit 844476b

Browse files
committed
TMP - MOVE DATA MEMBERS TO TOP
1 parent 6015ffc commit 844476b

16 files changed

Lines changed: 117 additions & 116 deletions

File tree

src/simu5g/background/cell/BackgroundScheduler.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,17 +82,18 @@ class BackgroundScheduler : public cSimpleModule, public cListener
8282
std::vector<MacNodeId> ulBandAllocation_;
8383
std::vector<MacNodeId> ulPrevBandAllocation_;
8484

85+
// statistics
86+
static simsignal_t bgAvgServedBlocksDlSignal_;
87+
static simsignal_t bgAvgServedBlocksUlSignal_;
88+
8589
// update the band status. Called at each TTI (not used for FULL_ALLOC)
8690
virtual void updateAllocation(Direction dir);
8791
// move the current status in the prevBandStatus structure and reset the former
8892
void resetAllocation(Direction dir);
8993
/*****************************/
9094

91-
// statistics
92-
static simsignal_t bgAvgServedBlocksDlSignal_;
93-
static simsignal_t bgAvgServedBlocksUlSignal_;
94-
9595
protected:
96+
9697
void initialize(int stage) override;
9798
int numInitStages() const override { return inet::INITSTAGE_LOCAL + 2; }
9899
void handleMessage(cMessage *msg) override;

src/simu5g/background/trafficGenerator/BackgroundTrafficManagerBase.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,14 @@ class BackgroundTrafficManagerBase : public cSimpleModule, public IBackgroundTra
8383

8484
/*************************************/
8585

86+
static const double nrCqiTable[16];
87+
88+
protected:
89+
8690
void initialize(int stage) override;
8791
int numInitStages() const override { return inet::INITSTAGE_LAST; }
8892
void handleMessage(cMessage *msg) override;
8993

90-
static const double nrCqiTable[16];
9194
static double getCqiFromTable(double snr);
9295

9396
virtual double getTtiPeriod() = 0;

src/simu5g/corenetwork/gtp/GtpUser.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ class GtpUser : public cSimpleModule
5353
// specifies the type of the node that contains this filter (it can be ENB or PGW)
5454
CoreNodeType ownerType_;
5555

56-
CoreNodeType selectOwnerType(const char *type);
57-
5856
// if this module is on BS, this variable includes the ID of the BS
5957
MacNodeId myMacNodeID;
6058

6159
opp_component_ptr<inet::NetworkInterface> ie_;
6260

6361
opp_component_ptr<cModule> networkNode_;
6462

63+
CoreNodeType selectOwnerType(const char *type);
64+
6565
protected:
6666

6767
int numInitStages() const override { return inet::NUM_INIT_STAGES; }
@@ -81,4 +81,3 @@ class GtpUser : public cSimpleModule
8181
} //namespace
8282

8383
#endif
84-

src/simu5g/corenetwork/trafficFlowFilter/TrafficFlowFilter.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ class TrafficFlowFilter : public cSimpleModule
4848
// store the name of the gateway node (for MEC Hosts and base stations only)
4949
std::string gateway_;
5050

51-
CoreNodeType selectOwnerType(const char *type);
52-
5351
// === MEC support === //
5452

5553
// only if owner type is ENB or GNB
@@ -64,6 +62,8 @@ class TrafficFlowFilter : public cSimpleModule
6462
inet::L3Address meAppsExtAddress_;
6563
int meAppsExtAddressMask_;
6664

65+
CoreNodeType selectOwnerType(const char *type);
66+
6767
protected:
6868
int numInitStages() const override { return inet::INITSTAGE_LAST + 1; }
6969
void initialize(int stage) override;
@@ -78,4 +78,3 @@ class TrafficFlowFilter : public cSimpleModule
7878
} //namespace
7979

8080
#endif
81-

src/simu5g/mec/platform/services/messages/HttpRequestMessage.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ class HttpRequestMessage : public HttpRequestMessage_m
6565
virtual std::string getPayload() const;
6666

6767
private:
68-
void copy(const HttpRequestMessage& other);
6968
std::map<std::string, std::string> headerFields_;
7069

7170
bool isBackgroundRequest_;
7271
bool isLastBackgroundRequest_;
7372

73+
void copy(const HttpRequestMessage& other);
74+
7475
};
7576

7677
} //namespace
7778

7879
#endif //_HTTREQUESTMESSAGE_H_
79-

src/simu5g/mec/platform/services/messages/HttpResponseMessage.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ class HttpResponseMessage : public HttpResponseMessage_m
5757
virtual std::string getPayload() const;
5858

5959
private:
60-
void copy(const HttpResponseMessage& other);
6160
std::map<std::string, std::string> headerFields_;
6261

62+
void copy(const HttpResponseMessage& other);
63+
6364
};
6465

6566
} //namespace
6667

6768
#endif //_HTTRESPONSEMESSAGE_H_
68-

src/simu5g/stack/ip2nic/Ip2Nic.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ class Ip2Nic : public cSimpleModule
7878
SplitBearersTable *sbTable_ = nullptr;
7979

8080
protected:
81+
cGate *stackGateOut_ = nullptr; // gate connecting Ip2Nic module to cellular stack
82+
cGate *ipGateOut_ = nullptr; // gate connecting Ip2Nic module to network layer
83+
84+
// corresponding entry for our interface
85+
opp_component_ptr<inet::NetworkInterface> networkIf;
86+
8187
/**
8288
* Handle packets from transport layer and forward them to the stack
8389
*/
@@ -128,12 +134,6 @@ class Ip2Nic : public cSimpleModule
128134
void handleMessage(cMessage *msg) override;
129135
void finish() override;
130136

131-
cGate *stackGateOut_ = nullptr; // gate connecting Ip2Nic module to cellular stack
132-
cGate *ipGateOut_ = nullptr; // gate connecting Ip2Nic module to network layer
133-
134-
// corresponding entry for our interface
135-
opp_component_ptr<inet::NetworkInterface> networkIf;
136-
137137
public:
138138

139139
/*
@@ -158,4 +158,3 @@ class Ip2Nic : public cSimpleModule
158158
} //namespace
159159

160160
#endif
161-

src/simu5g/stack/ip2nic/SplitBearersTable.h

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,6 @@ class SplitBearersTable
5151
int create_entry(uint32_t srcAddr, uint32_t dstAddr, uint16_t typeOfService);
5252

5353
private:
54-
/**
55-
* hash_func() calculates the hash function used
56-
* by this structure. At the moment it's simply an OR
57-
* operation between all fields of the 3-tuple
58-
*/
59-
unsigned int hash_func(uint32_t srcAddr, uint32_t dstAddr, uint16_t typeOfService);
60-
6154
/*
6255
* Data Structures
6356
*/
@@ -85,9 +78,15 @@ class SplitBearersTable
8578

8679
/// Hash table of size TABLE_SIZE
8780
entry_ ht_[TABLE_SIZE];
81+
82+
/**
83+
* hash_func() calculates the hash function used
84+
* by this structure. At the moment it's simply an OR
85+
* operation between all fields of the 3-tuple
86+
*/
87+
unsigned int hash_func(uint32_t srcAddr, uint32_t dstAddr, uint16_t typeOfService);
8888
};
8989

9090
} //namespace
9191

9292
#endif
93-

src/simu5g/stack/mac/LteMacBase.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,6 @@ class LteMacBase : public cSimpleModule
163163
};
164164
std::map<NumerologyIndex, NumerologyPeriodCounter> numerologyPeriodCounter_;
165165

166-
unsigned int getNumerologyPeriodCounter(NumerologyIndex index) { return numerologyPeriodCounter_[index].current; }
167-
void decreaseNumerologyPeriodCounter();
168-
169166
// statistics in visualization
170167
bool statDisplay_;
171168
uint64_t nrFromUpper_;
@@ -179,6 +176,11 @@ class LteMacBase : public cSimpleModule
179176
unsigned int totalHarqErrorRateDlCount_ = 0;
180177
unsigned int totalHarqErrorRateUlCount_ = 0;
181178

179+
protected:
180+
181+
unsigned int getNumerologyPeriodCounter(NumerologyIndex index) { return numerologyPeriodCounter_[index].current; }
182+
void decreaseNumerologyPeriodCounter();
183+
182184
public:
183185

184186
/**

src/simu5g/stack/mac/scheduler/LteSchedulerEnbUl.h

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ class LteSchedulerEnbUl : public LteSchedulerEnb
3232
unsigned int scheduleUnit_;
3333
//---------------------------------------------
3434

35+
//! Uplink Synchronous H-ARQ process counter - keeps track of currently active process on connected UEs.
36+
std::map<GHz, HarqStatus> harqStatus_;
37+
38+
//! RAC request flags: signals whether a UE shall be granted the RAC allocation
39+
std::map<GHz, RacStatus> racStatus_;
40+
41+
protected:
42+
3543
/**
3644
* Checks Harq Descriptors and returns the first free codeword.
3745
*
@@ -41,12 +49,6 @@ class LteSchedulerEnbUl : public LteSchedulerEnb
4149
*/
4250
bool checkEligibility(MacNodeId id, Codeword& cw, GHz carrierFrequency) override;
4351

44-
//! Uplink Synchronous H-ARQ process counter - keeps track of currently active process on connected UEs.
45-
std::map<GHz, HarqStatus> harqStatus_;
46-
47-
//! RAC request flags: signals whether a UE shall be granted the RAC allocation
48-
std::map<GHz, RacStatus> racStatus_;
49-
5052
public:
5153

5254
//! Updates HARQ descriptor current process pointer (to be called every TTI by main loop).
@@ -110,4 +112,3 @@ class LteSchedulerEnbUl : public LteSchedulerEnb
110112
} //namespace
111113

112114
#endif // _LTE_LTE_SCHEDULER_ENB_UL_H_
113-

0 commit comments

Comments
 (0)