Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raising Inconsistent Topic from CyloneDDS #1543

Open
allenh1 opened this issue Jan 19, 2023 · 1 comment
Open

Raising Inconsistent Topic from CyloneDDS #1543

allenh1 opened this issue Jan 19, 2023 · 1 comment
Labels
question Explanation on code or feature is requested

Comments

@allenh1
Copy link
Contributor

allenh1 commented Jan 19, 2023

Hi!

I'm interested in enabling cyclone to support inconsistent topic events, especially those relevant to ros2/rmw_cyclonedds#431.

I found this segment blocked out in the code, and am curious why it is blocked out?

/*
Topic status change callback handler. Supports INCONSISTENT_TOPIC
status (only defined status on a topic). Irrelevant until inconsistent topic
definitions can be detected, so until topic discovery is added.
*/
#if 0
static void dds_topic_status_cb (struct dds_topic *tp)
{
struct dds_listener const * const lst = &tp->m_entity.m_listener;
ddsrt_mutex_lock (&tp->m_entity.m_observers_lock);
while (tp->m_entity.m_cb_count > 0)
ddsrt_cond_wait (&tp->m_entity.m_observers_cond, &tp->m_entity.m_observers_lock);
tp->m_entity.m_cb_count++;
tp->m_inconsistent_topic_status.total_count++;
tp->m_inconsistent_topic_status.total_count_change++;
if (lst->on_inconsistent_topic)
{
ddsrt_mutex_unlock (&tp->m_entity.m_observers_lock);
dds_entity_invoke_listener (&tp->m_entity, DDS_INCONSISTENT_TOPIC_STATUS_ID, &tp->m_inconsistent_topic_status);
ddsrt_mutex_lock (&tp->m_entity.m_observers_lock);
tp->m_inconsistent_topic_status.total_count_change = 0;
}
dds_entity_status_set (&tp->m_entity, DDS_INCONSISTENT_TOPIC_STATUS);
tp->m_entity.m_cb_count--;
ddsrt_cond_broadcast (&tp->m_entity.m_observers_cond);
ddsrt_mutex_unlock (&tp->m_entity.m_observers_lock);
}
#endif

@eboasson commented that this is a bug here.

What specifically would need to be done to get this behavior working?

@poetinger poetinger added the question Explanation on code or feature is requested label Jan 20, 2023
@poetinger
Copy link
Contributor

Hello Allen! A Wallingford-ian checking in. We have not forgotten about this question, and I will get back to you soon (quite busy at the moment). I think I have an answer for you, but I need to do a bit of digging and check with the team to make sure I do not answer with any misleading or incorrect information. Thank you for your patience, and sorry for the delay!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Explanation on code or feature is requested
Projects
None yet
Development

No branches or pull requests

2 participants