Hello,
I set a param in one codelet using
ISAAC_PARAM(bool, switchParam, 1);
in .hpp
set_switchParam(OnOff);
in .cpp
but how can I access it from an other codelet ?
I tried get_switchParam()
in .cpp and nothing in .hpp but of course it don’t know the function…
I tried get_switchParam()
in .cpp and ISAAC_PARAM(bool, switchParam, 1);
in .hpp but of course it’s local declaration…
I found this post but it’s not clear enough, it say to use something like :
navigation_mode_->get_desired_behavior(waypoint.empty() ? “stop” : “navigate”);
but the line is no longer available in apps/carter/carter_delivery/CarterDelivery.hpp so I have issues understanding it.
Please help me share my ISAAC_PARAM between my codelets !
Update :
I tried with :
in my Switch .cpp :
SwitchTCP *tcp;
bool switchbool = tcp->SwitchTCP::get_switchParam();
in my hpp :
namespace isaac {
class Switch : public alice::Codelet {
public:
void start() override;
void tick() override;
ISAAC_PROTO_RX(ColorCameraProto, input_image);
ISAAC_PROTO_TX(ColorCameraProto, output_image);
};
class SwitchTCP : public alice::Codelet {
public:
void start() override;
void tick() override;
ISAAC_PROTO_RX(PingProto, switch_bool);
ISAAC_PARAM(bool, switchParam, 1);
};
} // namespace isaac
ISAAC_ALICE_REGISTER_CODELET(isaac::Switch);
ISAAC_ALICE_REGISTER_CODELET(isaac::SwitchTCP);
and get the following error :
error: 'tcp' is used uninitialized in this function [-Werror=uninitialized]
I don’t want to brake my computer ignoring warning, any idea to fix that ?
Thanks !
kind regards,
Planktos