Skip to content

refactor: extract header stamp extraction into separate library#87

Merged
otenim merged 1 commit intomainfrom
refactor/extract-header-stamp-library
Apr 9, 2026
Merged

refactor: extract header stamp extraction into separate library#87
otenim merged 1 commit intomainfrom
refactor/extract-header-stamp-library

Conversation

@otenim
Copy link
Copy Markdown
Collaborator

@otenim otenim commented Apr 9, 2026

Summary

  • Extract kTypesWithHeader, extract_header_stamp(), and deserialization logic from bag_converter.hpp/cpp into new header_stamp.hpp/cpp
  • Consolidate 18 repetitive deserialize-and-return blocks into a single deserialize_header_stamp<MsgT>() template helper
  • Remove unused created_topics variable from run_impl()
  • Add missing #include <cctype> for std::toupper usage

Test plan

  • Verify build succeeds with colcon build
  • Run bag conversion on a sample bag with --use-header-stamp-as-log-time to confirm header stamp extraction still works
  • Run batch and merge modes to verify no regressions

Move kTypesWithHeader, extract_header_stamp, and the deserialization
logic into header_stamp.hpp/cpp. This consolidates 18 repetitive
deserialize-and-return blocks into a single template helper, making it
easier to add new message types. Also removes unused created_topics
variable and adds missing <cctype> include for std::toupper.
@otenim otenim merged commit 5ea2a37 into main Apr 9, 2026
1 check passed
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.

1 participant