Project

General

Profile

Revision 96e929a8

ID96e929a8aca87819d829629798726a90312b8093

Added by Simon Tenbusch over 9 years ago

[eefscheduler] encapsulated getProcessingDelay-call in the getEventDuration() of cMessage
The duration of a message is invalidated in scheduleAt and sendDirect/Delayed

View differences:

src/sim/casyncmodule.cc
70 70

  
71 71
int cAsyncModule::scheduleAt(simtime_t t, cMessage *msg)
72 72
{
73
    msg->setEventDuration(-1);
74

  
73 75
    //
74 76
    // check current state
75 77
    //
......
88 90
        // message it will trigger the processing of the associated task
89 91
        msg->setSentFrom(this, -1, t_end);
90 92
        msg->setArrival(this, -1, t);
93

  
94

  
91 95
        simulation.msgQueue.insert(msg);
92 96
        return 0;
93 97
    }
......
213 217

  
214 218
int cAsyncModule::sendDelayed(cMessage *msg, simtime_t delay, cGate *outputgate)
215 219
{
220
    msg->setEventDuration(-1);
221

  
216 222
    //
217 223
    // check current state
218 224
    //
......
309 315

  
310 316
int cAsyncModule::sendDirect(cMessage *msg, simtime_t delay, simtime_t duration, cGate *togate)
311 317
{
318

  
319
    msg->setEventDuration(-1);
320

  
312 321
    //
313 322
    // check current state
314 323
    //
......
364 373

  
365 374
        msg->setSentFrom(this, -1, time);
366 375

  
376

  
377

  
367 378
        bool keepit = togate->deliver(msg, time + delay);
368 379
        if (!keepit)
369 380
                delete msg;

Also available in: Unified diff