eProsima / Micro-XRCE-DDS

An XRCE DDS implementation. Looking for commercial support? Contact info@eprosima.com
Apache License 2.0
157 stars 17 forks source link

client with only one reader instance cannot get session status #167

Closed MarvinLiuMing closed 6 months ago

MarvinLiuMing commented 6 months ago

hi teams

I found a issue, the client in my MCU is only have one reader. I'm using uxr_run_session_time to get the data.

everything goes well except one thing, if xrce agent is killed, Client can't get this info by calling uxr_run_session_time function. I'm using reliable_out stream.

Thanks in advance.

pablogs9 commented 6 months ago

This is not an issue. The XRCE Wire protocol is working as expected. If you need to be aware of the Agent status from Client side you can use the ping API: https://micro-xrce-dds.docs.eprosima.com/en/latest/client_api.html?highlight=ping#general-utilities

MarvinLiuMing commented 6 months ago

Thanks for your reply. Got it , so if there is only one reader in the client, ping function is necessary. what is the best practice of this part ? Even though I have periodic pub function, do I aslo need to ping agent periodically?

pablogs9 commented 6 months ago

Yes, you will need to ping the agent periodically to check if it is still alive. You can configure the client to regenerate the entities if necessary, please read the creation documentation: https://micro-xrce-dds.docs.eprosima.com/en/latest/client.html#creation-policy-table

MarvinLiuMing commented 6 months ago

understand thanks!