Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Changes to support preallocate #24

Closed
wants to merge 5 commits into from

Conversation

gonzodepedro
Copy link

@gonzodepedro gonzodepedro commented Feb 6, 2019

In progress work to support rmw_preallocate.

Connects to ros2/rmw_connext#345

Signed-off-by: Gonzalo de Pedro [email protected]

@gonzodepedro gonzodepedro self-assigned this Feb 6, 2019
@gonzodepedro gonzodepedro requested a review from wjwwood February 6, 2019 21:35
@gonzodepedro gonzodepedro added the in progress Actively being worked on (Kanban column) label Feb 6, 2019
@@ -348,6 +362,10 @@ to_cdr_stream(
fprintf(stderr, "failed to call @(spec.base_type.type)_Plugin_serialize_to_cdr_buffer()\n");
return false;
}


printf("EXPECTED LENGTH INTO TO_CDR_STREAM : %u\n", expected_length);
Copy link
Member

Choose a reason for hiding this comment

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

Seems vestigial.

@@ -322,6 +322,20 @@ else:
return true;
}

static bool get_serialized_length(unsigned int * expected_length)
Copy link
Member

Choose a reason for hiding this comment

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

I know the other functions are structured this way, but I think we should start to move towards the ability to set and report error states. So instead of returning a bool, I think it would be better to return an rmw_ret_t and instead of printing to stderr with fprintf, I'd like to see us using the error state with RMW_SET_ERROR_MSG.

We don't need to refactor all of the generated code here to be the same, but in this instance I'd slightly prefer a trend toward better error reporting over consistency with the rest of the existing file.

@gonzodepedro gonzodepedro added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Mar 26, 2019
Gonzalo de Pedro added 5 commits May 3, 2019 11:00
Signed-off-by: Gonzalo de Pedro <[email protected]>
Signed-off-by: Gonzalo de Pedro <[email protected]>
Signed-off-by: Gonzalo de Pedro <[email protected]>
Signed-off-by: Gonzalo de Pedro <[email protected]>
Signed-off-by: Gonzalo de Pedro <[email protected]>
@hidmic
Copy link
Contributor

hidmic commented Sep 10, 2021

I think we should close this @gonzodepedro. Thoughts?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
in review Waiting for review (Kanban column)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants