Switch to unified view

a/src/policies/DIF/RMT/Scheduler/RMTSchedulingBase.h b/src/policies/DIF/RMT/Scheduler/RMTSchedulingBase.h
...
...
18
18
19
#include <omnetpp.h>
19
#include <omnetpp.h>
20
20
21
#include "RMTPort.h"
21
#include "RMTPort.h"
22
#include "RMTQueue.h"
22
#include "RMTQueue.h"
23
#include "RMTModuleAllocator.h"
24
25
/* FIXME: circular dependencies */
26
class RMTModuleAllocator;
23
27
24
/**
28
/**
25
 * Noop base class for the RMT scheduling policy.
29
 * Noop base class for the RMT scheduling policy.
26
 * This policy is invoked each time some queue has data to send and uses some
30
 * This policy is invoked each time some queue has data to send and uses some
27
 * algorithm to make a decision about which queues should be handled first.
31
 * algorithm to make a decision about which queues should be handled first.
...
...
32
  friend class RMTQMonitorBase; /* For access to scheduling policy variables. */
36
  friend class RMTQMonitorBase; /* For access to scheduling policy variables. */
33
37
34
  public:
38
  public:
35
39
36
    /**
40
    /**
37
     * A hook method invoked after some queue has data to send.
41
     * A hook method invoked on multiple occasions.
42
     * 1) A PDU arrives into a queue.
43
     * 2) An (N-1)-port becomes ready to serve.
44
     * 3) By self-postponed scheduler invocation.
38
     *
45
     *
39
     * @param port the queue's (N-1)-port
46
     * @param port the (N-1)-port
40
     * @param direction the direction of data flow (in/out)
47
     * @param direction the direction of data flow (in/out)
41
     */
48
     */
42
    virtual void processQueues(RMTPort* port, RMTQueueType direction);
49
    virtual void processQueues(RMTPort* port, RMTQueueType direction);
43
44
    /**
45
     * A hook method invoked after a queue is done serving its data.
46
     * It's used mainly to ensure that processQueues() is re-invoked when
47
     * there are other PDUs waiting in queues, hence it shouldn't be overridden
48
     * unless there is a good reason to do so.
49
     *
50
     * @param port the queue's (N-1)-port
51
     * @param direction the direction of data flow (in/out)
52
     */
53
    virtual void finalizeService(RMTPort* port, RMTQueueType direction);
54
50
55
  protected:
51
  protected:
56
52
57
    /**
53
    /**
58
     * A hook method invoked after the initial setup of policy module.
54
     * A hook method invoked after the initial setup of policy module.
59
     */
55
     */
60
    virtual void onPolicyInit();
56
    virtual void onPolicyInit();
61
57
62
    /**
58
    /**
59
     * Method used for creating postponed Scheduler calls (e.g. for PDU spacing).
60
     *
61
     * @param simtime_t target simulation time
62
     * @param port (N-1)-port
63
     * @param direction direction that is to be processed
64
     */
65
    void scheduleReinvocation(simtime_t time, RMTPort* port, RMTQueueType direction);
66
67
    /**
63
     * Handler for OMNeT++ module messages (probably not of much use here).
68
     * Handler for OMNeT++ module messages (probably not of much use here).
64
     */
69
     */
65
    void handleMessage(cMessage *msg);
70
    void handleMessage(cMessage *msg);
66
71
67
    // temporary
72
    /**
68
    std::map<RMTPort*, bool> inputBusy;
73
     * Pointer to the RMT allocator module (also providing queue<->port mappings).
74
     */
75
    RMTModuleAllocator* rmtAllocator;
69
76
70
  private:
77
  private:
71
78
72
    /**
79
    /**
73
     *  Module initialization routine setting up parameters for GUI.
80
     *  Module initialization routine setting up parameters for GUI.