setSchedulingPriority(short p)
where p is the priority, the smaller number of p has higher priority.
refer to.
https://omnetpp.org/doc/omnetpp/api/classcMessage.html#a205278b4eaf8a54a901537f6e6cfae59
Examples:
cMessage *timer1 = new cMessage("tiemr1");
cMessage *timer2 = new cMessage("tiemr2");
timer1->setSchedulingPriority(1); // lower priority
timer1->setSchedulingPriority(-1); // high priority
send(timer1, Gate);
send(timer2, Gate);
No comments:
Post a Comment