Page MenuHomePhorge

setupNode.cpp
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

setupNode.cpp

#include "setupNode.h"
#include "rlutil.h"
//#define PRINT
using namespace rlutil;
void setWorkingCycleOfSensor(Sensor* sensor, unsigned int workingCycle) {
if (sensor->set_workingCycle(workingCycle)) {
#ifdef PRINT
printf(" > WorkingCycle of Sensor ");
setColor(TXTCOLOR_LIGHTCYAN);
printf("%s ", sensor->get_name().c_str());
setColor(TXTCOLOR_GREY);
printf("(id: %03u) ", sensor->get_id());
setColor(TXTCOLOR_LIGHTGREEN);
printf("set ");
setColor(TXTCOLOR_GREY);
printf("to %u\n", workingCycle);
#endif // PRINT
}
else {
#ifdef PRINT
setColor(TXTCOLOR_LIGHTRED);
printf(" > Couldn't set WorkingCycle of Sensor %s (id: %03u)\n", sensor->get_name().c_str(), sensor->get_id());
setColor(TXTCOLOR_GREY);
#endif // PRINT
}
}
void setWorkingCycleOfAgent(Agent* agent, unsigned int workingCycle) {
if (agent->set_workingCycle(workingCycle)) {
#ifdef PRINT
printf(" > WorkingCycle of Agent ");
setColor(TXTCOLOR_LIGHTCYAN);
printf("%s ", agent->get_name().c_str());
setColor(TXTCOLOR_GREY);
printf("(id: %03u) ", agent->get_id());
setColor(TXTCOLOR_LIGHTGREEN);
printf("set ");
setColor(TXTCOLOR_GREY);
printf("to %u\n", workingCycle);
#endif // PRINT
}
else {
#ifdef PRINT
setColor(TXTCOLOR_LIGHTRED);
printf(" > Couldn't set WorkingCycle of Sensor %s (id: %03u)\n", agent->get_name().c_str(), agent->get_id());
setColor(TXTCOLOR_GREY);
#endif // PRINT
}
}

File Metadata

Mime Type
text/x-c
Expires
Sun, Mar 1, 10:18 PM (1 d, 16 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
287462
Default Alt Text
setupNode.cpp (1 KB)

Event Timeline