You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm implementing a different pending queue in the IEEE80211 module. Below is the new pending queue design:
The issue is that when a gate is closed, the scheduler still tries to schedule a packet, resulting in an error. Is this the expected behavior? Do you have any suggestions for what I could change to resolve this?
Here is the relevant part of the PriorityScheduler.cc code: int PriorityScheduler::schedulePacket() { for (size_t i = 0; i < providers.size(); i++) { int inputIndex = getInputGateIndex(i); if (inputIndex == inProgressGateIndex || providers[inputIndex]->canPullSomePacket(inputGates[inputIndex]->getPathStartGate())) return inputIndex; } return -1; }
The text was updated successfully, but these errors were encountered:
The scheduler should not try to pull a packet through a gate which is closed. Actually, the call to canPullSomePacket makes sure that there is a packet which can be pulled. When a gate is closed, canPullSomePacket supposed to return false independently of whether the queue contains packets or not. So your design should work the way you expect.
I appreciate your reply, @levy . Unfortunately, I need to have this working by next Monday, as it’s part of a project for my master’s class. Could you help me resolve this issue or at least point me to where the bug might be occurring?
Hello!
I'm implementing a different pending queue in the IEEE80211 module. Below is the new pending queue design:
The issue is that when a gate is closed, the scheduler still tries to schedule a packet, resulting in an error. Is this the expected behavior? Do you have any suggestions for what I could change to resolve this?
Here is the relevant part of the PriorityScheduler.cc code:
int PriorityScheduler::schedulePacket() { for (size_t i = 0; i < providers.size(); i++) { int inputIndex = getInputGateIndex(i); if (inputIndex == inProgressGateIndex || providers[inputIndex]->canPullSomePacket(inputGates[inputIndex]->getPathStartGate())) return inputIndex; } return -1; }
The text was updated successfully, but these errors were encountered: