26 queues[port].insert(q);
27 if(queues[port].size() == 1) { lastQ[port] = queues[port].begin(); }
30 if(*lastQ[port] == q) { lastQ[port]++; }
31 queues[port].erase(q);
32 if(lastQ[port] == queues[port].end()) { lastQ[port] = queues[port].begin(); }
36 Enter_Method(
"processQueues()");
47 for(
int k = queues[port].size(); k > 0; k--) {
51 if(lastQ[port] == queues[port].end()) { lastQ[port] = queues[port].
begin(); }
56 if(lastQ[port] == queues[port].end()) { lastQ[port] = queues[port].begin(); }
65 if(par(
"printAtEnd").boolValue()) {
66 cout <<
"----------------" << endl;
67 std::cout <<
"IterativeScheduling::finish" << endl;
68 cout << getFullPath() << endl << endl;
69 for(
auto & pl : queues) {
70 cout << pl.first->getFullPath() << endl;
71 for(
auto & q : pl.second) {
72 cout <<
"\t" << q->getFullPath() << endl;
73 cout <<
"\t\t" << q->getLength();
74 cout <<
" / " << q->getThreshLength() << endl;
76 auto it = lastQ[pl.first];
77 if(it == pl.second.end()) {
78 cout <<
"\tCurrent : out of bounds" <<endl;
80 cout <<
"\tCurrent : " << (*it)->getFullPath() <<endl;
83 cout <<
"----------------" << endl;
void addQueue(RMTPort *port, RMTQueue *q)
RMTQueue * getLongestQueue(RMTQueueType type) const
unsigned long getWaiting(RMTQueueType direction)
void removeQueue(RMTPort *port, RMTQueue *q)
void processQueues(RMTPort *port, RMTQueueType direction)
Define_Module(IterativeMonitor)