479Wireless Sensor Network Simulations Using Castalia
a signicant number of parameters, a separate method parseStringParams() is called from
startup() to parse parameters during runtime.
void DCSApplication::startup()
{
neighborTable.clear();
parseStringParams();
-----------------------------
}
void DCSApplication::parseStringParams(void){
const char *parameterStr, *token, *test;
-----------------------------
}
The timerFiredCallback() method reacts to timers expiring and handles all eight timers. The
REQUEST_ SAMPLE action prompts MNs to return a sample. The action is rst set from the startup()
method at 0 s (i.e., start immediately) as the timer value. However, it is then repeatedly set with the timer
value as sampleInterval second (in this ...