Skip to content

Commit

Permalink
GateControlList: Moved the configuration of the gates in the queueing…
Browse files Browse the repository at this point in the history
… stage.

The local stage was too early and could cause an error depending on submodule order.
  • Loading branch information
levy committed Oct 12, 2023
1 parent f7a57f3 commit fcb003e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/inet/queueing/gate/GateControlList.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ void GateControlList::initialize(int stage)
gateStates = check_and_cast<cValueArray *>(par("gateStates").objectValue());

parseGcl();

}
else if (stage == INITSTAGE_QUEUEING) {
for (int index = 0; index < numGates; ++index) {
std::string modulePath = "^.transmissionGate[" + std::to_string(index) + "]";
PeriodicGate *mod = check_and_cast<PeriodicGate *>(getModuleByPath(modulePath.c_str()));
Expand Down
1 change: 1 addition & 0 deletions src/inet/queueing/gate/GateControlList.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class INET_API GateControlList : public cSimpleModule
cValueArray *gateStates = nullptr;

protected:
virtual int numInitStages() const override { return NUM_INIT_STAGES; }
virtual void initialize(int stage) override;
virtual void handleMessage(cMessage *msg) override;

Expand Down

0 comments on commit fcb003e

Please sign in to comment.