Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F1497829
attach_modulesToTestbench.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Size
1 KB
Referenced Files
None
Subscribers
None
attach_modulesToTestbench.cpp
View Options
#include
"attach_modulesToTestbench.h"
//#include "rlutil.h"
#include
"SensorSlotOfTestbench.h"
// using namespace rlutil;
bool
attach_csvReaderModuleToSensorSlotInAgent
(
Testbench
*
testbench
,
Sensor
*
sensor
,
CSVreaderModule
*
csvReaderModule
)
{
if
(
testbench
!=
NULL
&&
sensor
!=
NULL
&&
csvReaderModule
!=
NULL
)
{
SensorSlotOfTestbench
*
sensorSlot
=
testbench
->
get_sensorSlotAddressOfTestbench
(
sensor
);
if
(
sensorSlot
!=
NULL
)
{
printf
(
" > CSV-Reader "
);
// setColor(TXTCOLOR_LIGHTCYAN);
printf
(
"%s "
,
csvReaderModule
->
get_name
());
// setColor(TXTCOLOR_GREY);
printf
(
"(id: %03u) "
,
csvReaderModule
->
get_id
());
if
(
sensorSlot
->
set_csvReaderModule
(
csvReaderModule
))
{
// setColor(TXTCOLOR_LIGHTGREEN);
printf
(
"attached "
);
// setColor(TXTCOLOR_GREY);
printf
(
"to Sensor "
);
// setColor(TXTCOLOR_LIGHTCYAN);
printf
(
"%s "
,
sensor
->
get_name
());
// setColor(TXTCOLOR_GREY);
printf
(
"(id: %03u) in Testbench "
,
sensor
->
get_id
());
// setColor(TXTCOLOR_LIGHTCYAN);
printf
(
"%s "
,
testbench
->
get_name
());
// setColor(TXTCOLOR_GREY);
printf
(
"(id: %03u)
\n
"
,
testbench
->
get_id
());
return
true
;
}
else
{
// setColor(TXTCOLOR_LIGHTRED);
printf
(
"Couldn't attach the CSVreaderModule!
\n
"
);
// setColor(TXTCOLOR_GREY);
}
}
else
{
// setColor(TXTCOLOR_LIGHTRED);
printf
(
" > Couldn't attach the CSVreaderModule because Sensor isn't "
"registered in %s (id: %03u)!
\n
"
,
testbench
->
get_name
(),
testbench
->
get_id
());
// setColor(TXTCOLOR_GREY);
}
}
else
{
// setColor(TXTCOLOR_LIGHTRED);
printf
(
" > Couldn't attach the CSVreaderModule because Testbench, "
"Sensorm or CSVreaderModule is not valid!
\n
"
);
// setColor(TXTCOLOR_GREY);
}
return
false
;
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Sun, Mar 1, 10:17 PM (23 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
283048
Default Alt Text
attach_modulesToTestbench.cpp (1 KB)
Attached To
Mode
R20 SoC_Rosa_repo
Attached
Detach File
Event Timeline
Log In to Comment