Switch to unified view

a b/src/policies/DIF/RMT/Scheduler/DL/DL.cc
1
//
2
// This program is free software: you can redistribute it and/or modify
3
// it under the terms of the GNU Lesser General Public License as published by
4
// the Free Software Foundation, either version 3 of the License, or
5
// (at your option) any later version.
6
// 
7
// This program is distributed in the hope that it will be useful,
8
// but WITHOUT ANY WARRANTY; without even the implied warranty of
9
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
// GNU Lesser General Public License for more details.
11
// 
12
// You should have received a copy of the GNU Lesser General Public License
13
// along with this program.  If not, see http://www.gnu.org/licenses/.
14
// 
15
16
#include "DL.h"
17
18
Define_Module(DL);
19
20
void DL::onPolicyInit()
21
{
22
    monitor= check_and_cast<DLMonitor*>
23
        (getModuleByPath("^.queueMonitorPolicy"));
24
    if (monitor == NULL)
25
    {
26
        EV << "!!! DLMaxQ has to be used in conjecture with DLMonitor!" << endl;
27
    }
28
}
29
30
31
void DL::processQueues(RMTPort* port, RMTQueueType direction)
32
{
33
34
//    if (direction == RMTQueue::OUTPUT)
35
//    {
36
//        if (port->isReady())
37
//        {
38
//            port->setBusy();
39
//
40
//            RMTQueue* outQ = monitor->getNextUrgentQ(port);
41
//            if(outQ) {
42
//                outQ->releasePDU();
43
//            } else {
44
//                port->setReady();
45
//            }
46
//        }
47
//        else
48
//        {
49
//            port->addWaitingOnOutput();
50
//        }
51
//    }
52
//    else if (direction == RMTQueue::INPUT)
53
//    {
54
//        if (inputBusy[port] != true)
55
//        {
56
//            inputBusy[port] = true;
57
//
58
//            RMTQueue* inQ = port->getLongestQueue(RMTQueue::INPUT);
59
//            inQ->releasePDU();
60
//        }
61
//        else
62
//        {
63
//            port->addWaitingOnInput();
64
//        }
65
//    }
66
}