Friday, April 1, 2016

OMNeT++/OMNEST priority schedule for the event at the same time

In OMNeT++/OMNEST, sometimes two events may arrive at the same time. However, the OMNeT++/OMNEST can only handle both events in sequence based on the arrival time of each event. If we hope to always handle a event before the other event, we can use the following function to handle this problem.

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);



Thursday, March 10, 2016

Source Insight無法讀取.cc檔

當你load檔時,發現缺少.cc的載入怎麼辦

照著這個步驟
1. 打開Options -> Document Options, 
2. 在Document Type選擇C++ Source File
3. 在File Filter中加入 ;*.cc

在sync一次應該就出現拉XD