Commit f7d2911d authored by Mohamed Ahmed's avatar Mohamed Ahmed

Adding configurability to the timeClient to be able to choose the service...

Adding configurability to the timeClient to be able to choose the service based on its id through Yonohub properties
parent b969c2fa
......@@ -106,7 +106,7 @@ void Timeactivity::serviceAvailabilityCallback(ara::com::ServiceHandleContainer<
try
{
int service_id;
ros::param::get("~SRV_ID", service_id);
ros::param::get("SRV_ID", service_id);
for(int i = 0; i<handles.size();i++){
if(service_id == handles[0].GetInstanceId().GetInstanceId()){
m_proxy = std::make_shared<proxy::timeServiceProxy>(handles[i]);
......@@ -127,7 +127,7 @@ void Timeactivity::serviceAvailabilityCallback(ara::com::ServiceHandleContainer<
try
{
int service_id;
ros::param::get("~SRV_ID", service_id);
ros::param::get("SRV_ID", service_id);
for(int i = 0; i<handles.size();i++){
if(service_id == handles[0].GetInstanceId().GetInstanceId()){
m_proxy = std::make_shared<proxy::timeServiceProxy>(handles[i]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment