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

Fixed data reader creation return value handling #874

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kordets
Copy link

@kordets kordets commented Jan 17, 2025

Ammendment to previous fix where previously it was only handling the case in reader creation where only the last topic would define the return value for the reader creation.

@kordets kordets requested review from jnippula and jlaitine January 17, 2025 08:53
@kordets kordets force-pushed the fix-uxrce-reader-creation branch 2 times, most recently from 954cef0 to 43d48b3 Compare January 17, 2025 09:08
@kordets kordets force-pushed the fix-uxrce-reader-creation branch from 43d48b3 to 13bbcbf Compare January 17, 2025 10:23
@@ -157,7 +157,7 @@ bool RcvTopicsPubs::init(uxrSession *session, uxrStreamId reliable_out_stream_id
@[ for idx, sub in enumerate(subscriptions)]@
{
uint16_t queue_depth = uORB::DefaultQueueSize<@(sub['simple_base_type'])_s>::value * 2; // use a bit larger queue size than internal
ret = create_data_reader(session, reliable_out_stream_id, best_effort_in_stream_id, participant_id, @(idx), client_namespace, "@(sub['topic_name'])", "@(sub['dds_type'])", queue_depth);
ret = ret & create_data_reader(session, reliable_out_stream_id, best_effort_in_stream_id, participant_id, @(idx), client_namespace, "@(sub['topic_name'])", "@(sub['dds_type'])", queue_depth);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BItwise and is not nice for this (consider e.g. 1 & 2). Or, first iteration returning 1 and second 0...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants