Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F28207697
setupNode.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
setupNode.cpp
View Options
#include
"setupNode.h"
#include
"rlutil.h"
using
namespace
rlutil
;
void
setWorkingCycleOfSensor
(
Sensor
*
sensor
,
unsigned
int
workingCycle
)
{
if
(
sensor
->
set_workingCycle
(
workingCycle
))
{
printf
(
" > WorkingCycle of Sensor "
);
setColor
(
TXTCOLOR_LIGHTCYAN
);
printf
(
"%s "
,
sensor
->
get_name
());
setColor
(
TXTCOLOR_GREY
);
printf
(
"(id: %03u) "
,
sensor
->
get_id
());
setColor
(
TXTCOLOR_LIGHTGREEN
);
printf
(
"set "
);
setColor
(
TXTCOLOR_GREY
);
printf
(
"to %u
\n
"
,
workingCycle
);
}
else
{
setColor
(
TXTCOLOR_LIGHTRED
);
printf
(
" > Couldn't set WorkingCycle of Sensor %s (id: %03u)
\n
"
,
sensor
->
get_name
(),
sensor
->
get_id
());
setColor
(
TXTCOLOR_GREY
);
}
}
void
setWorkingCycleOfAgent
(
Agent
*
agent
,
unsigned
int
workingCycle
)
{
if
(
agent
->
set_workingCycle
(
workingCycle
))
{
printf
(
" > WorkingCycle of Agent "
);
setColor
(
TXTCOLOR_LIGHTCYAN
);
printf
(
"%s "
,
agent
->
get_name
());
setColor
(
TXTCOLOR_GREY
);
printf
(
"(id: %03u) "
,
agent
->
get_id
());
setColor
(
TXTCOLOR_LIGHTGREEN
);
printf
(
"set "
);
setColor
(
TXTCOLOR_GREY
);
printf
(
"to %u
\n
"
,
workingCycle
);
}
else
{
setColor
(
TXTCOLOR_LIGHTRED
);
printf
(
" > Couldn't set WorkingCycle of Sensor %s (id: %03u)
\n
"
,
agent
->
get_name
(),
agent
->
get_id
());
setColor
(
TXTCOLOR_GREY
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Sat, Nov 21, 12:20 AM (3 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
422596
Default Alt Text
setupNode.cpp (1 KB)
Attached To
Mode
R20 SoC_Rosa_repo
Attached
Detach File
Event Timeline