-
Notifications
You must be signed in to change notification settings - Fork 117
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
Magic_numbers in calculateMaxSerializedSize #72
Comments
@mikaelarguedas This might also be something I could work on |
@allenh1 Is this one still on your radar ? |
Yep -- I was waiting on the refactor to finish, but looks like I can go after it now. |
There is now only one magic number left. @richiprosima I see there is a todo in your name to modify it, do you have any insight as of if this variable should be kept ? |
That value is inherited from when there was only preallocated memory policy in FastRTPS, and dynamic types had to have a maximum length. For sequences/arrays the maximum length was 100. Now ROS2 uses preallocated_with_realloc memory policy and maximum lengths are not needed. |
@richiprosima can you please propose a patch how to get rid of this variable. It isn't clear to us how to remove it cleanly. |
I'm working on it |
PR #152 removes those magic numbers. |
All magic numbers have now been removed 🎉 closing |
This is a follow-up of #36
There are still magic numbers (101, 257 and 100) use to determine the maximum size of a sample.
It would be good to investigate if we can get rid of them and improve the logic of the MaxSize calculation
The text was updated successfully, but these errors were encountered: