Skip to content

Finalize ImplementationTag template parameter for InterProcessTransporterBase#378

Merged
tsaubergine merged 11 commits into3.0-interprocess-implementation-tagfrom
copilot/finalize-implementationtag-template-parameter
Apr 9, 2026
Merged

Finalize ImplementationTag template parameter for InterProcessTransporterBase#378
tsaubergine merged 11 commits into3.0-interprocess-implementation-tagfrom
copilot/finalize-implementationtag-template-parameter

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 9, 2026

Summary

Implements all changes required by the problem statement for finalizing the ImplementationTag template parameter in InterProcessTransporterBase.

Changes

New implementation tags (moved to transport-specific detail headers)

Four new tags with distinct group prefixes, now defined in transport-specific headers:

  • goby::zeromq::detail::ZeromqInterprocessTag"goby::middleware::interprocess::zeromq" (in src/zeromq/transport/detail/tags.h)
  • goby::zeromq::detail::ZeromqIntermoduleTag"goby::middleware::intermodule::zeromq" (in src/zeromq/transport/detail/tags.h)
  • goby::udpm::detail::UdpmInterprocessTag"goby::middleware::interprocess::udpm" (in src/udpm/transport/detail/tags.h)
  • goby::udpm::detail::UdpmIntermoduleTag"goby::middleware::intermodule::udpm" (in src/udpm/transport/detail/tags.h)

static_group_names.h now only contains the concat helper (include guards added).

implementation_tag typedef added to InterProcessTransporterBase

using implementation_tag = ImplementationTag;

This allows downstream types (e.g. InterVehiclePortal) to extract the tag from an InnerTransporter.

Removed default ImplementationTag from InterProcessTransporterBase

// Before:
template <typename Derived, typename InnerTransporter,
          typename ImplementationTag = detail::DefaultInterprocessTag>
class InterProcessTransporterBase

// After:
template <typename Derived, typename InnerTransporter, typename ImplementationTag>
class InterProcessTransporterBase

New forwarder and portal types

zeromq namespace:

  • zeromq::InterProcessForwarder<Inner> — alias for middleware::InterProcessForwarder<Inner, zeromq::detail::ZeromqInterprocessTag>
  • zeromq::InterModuleForwarder<Inner> — alias for middleware::InterModuleForwarder<Inner, zeromq::detail::ZeromqIntermoduleTag>
  • zeromq::InterProcessPortal<Inner> — updated with explicit ZeromqInterprocessTag
  • zeromq::InterModulePortal<Inner> — updated with explicit ZeromqIntermoduleTag

udpm namespace:

  • udpm::InterProcessForwarder<Inner> — alias for middleware::InterProcessForwarder<Inner, udpm::detail::UdpmInterprocessTag>
  • udpm::InterModuleForwarder<Inner> — alias for middleware::InterModuleForwarder<Inner, udpm::detail::UdpmIntermoduleTag>
  • udpm::InterProcessPortal<Inner> — updated with explicit UdpmInterprocessTag
  • udpm::InterModulePortal<Inner> — updated with explicit UdpmIntermoduleTag

Deprecated backwards-compatible types

middleware::InterProcessForwarder<Inner> (1-arg) and middleware::InterModuleForwarder<Inner> (1-arg) are kept for backwards compatibility via a partial template specialization with ImplementationTag = void. The constructor of each is marked [[deprecated]] to emit a compile-time warning.

Updated SimpleThread with ImplementationTag

middleware::SimpleThread now accepts a 2-arg form SimpleThread<Config, ImplementationTag> as the primary template. The 1-arg middleware::SimpleThread<Config> (i.e. SimpleThread<Config, void>) is kept as a deprecated partial specialization that defaults to zeromq and emits a compile-time warning:

warning: '...' is deprecated: Use goby::zeromq::SimpleThread or goby::udpm::SimpleThread instead of goby::middleware::SimpleThread

New transport-specific aliases:

  • goby::zeromq::SimpleThread<Config> in src/zeromq/application/simple_thread.h
  • goby::udpm::SimpleThread<Config> in src/udpm/application/simple_thread.h

ModemDriverThread templated on ImplementationTag

ModemDriverThread is now template <typename ImplementationTag>, using the same InterProcessForwarder prefix as the InnerTransporter passed to InterVehiclePortal. InterVehiclePortal extracts typename InnerTransporter::implementation_tag and passes it to ModemDriverThread<ImplementationTag>. The driver_plugins_ static class member is replaced by a free-function singleton get_driver_plugins(). Explicit template instantiations for both zeromq and udpm tags are provided in driver_thread.cpp.

Internal middleware updates (no deprecation warnings in library code)

Updated to use explicit tags to avoid warnings from goby's own code:

  • middleware/application/simple_thread.h
  • middleware/transport/intervehicle/driver_thread.h and .cpp
  • middleware/io/detail/io_transporters.h

Template template parameter update

InterProcessPortalImplementation in both zeromq/ and udpm/ updated from 2-arg to 3-arg template template parameter to pass the ImplementationTag through to the portal base.

InterProcessPortalBase, InterModulePortalBase, and InterModuleTransporterBase all updated to take ImplementationTag as an additional parameter.

Copilot AI and others added 2 commits April 9, 2026 03:17
…d classes

- Add 4 new implementation tags in static_group_names.h:
  ZeromqInterprocessTag, ZeromqIntermoduleTag, UdpmInterprocessTag, UdpmIntermoduleTag
- Add include guards and <array> include to static_group_names.h
- Remove default ImplementationTag from InterProcessTransporterBase
- Convert InterProcessForwarder to 2-arg template; add deprecated 1-arg
  specialisation (void tag) with deprecated constructor warning
- Convert InterModuleForwarder to 2-arg template; add deprecated 1-arg
  specialisation (void tag) with deprecated constructor warning
- Update InterModuleTransporterBase alias to 3-arg
- Update InterProcessPortalBase to 3-arg template
- Update InterModulePortalBase to 3-arg template
- Update InterProcessPortalImplementation in zeromq and udpm to 3-arg
  template template parameter
- Add zeromq::InterProcessForwarder and zeromq::InterModuleForwarder aliases
- Add udpm::InterProcessForwarder and udpm::InterModuleForwarder aliases
- Update zeromq/udpm InterProcessPortal and InterModulePortal aliases with
  explicit implementation tags
- Update internal middleware files (simple_thread.h, driver_thread.h,
  driver_thread.cpp, io_transporters.h, io_interface.h) to use explicit
  ZeromqInterprocessTag to avoid deprecation warnings in library code

Agent-Logs-Url: https://github.com/GobySoft/goby3/sessions/c6ca443b-8a07-4692-a671-3732170b90b2

Co-authored-by: tsaubergine <732276+tsaubergine@users.noreply.github.com>
Agent-Logs-Url: https://github.com/GobySoft/goby3/sessions/c6ca443b-8a07-4692-a671-3732170b90b2

Co-authored-by: tsaubergine <732276+tsaubergine@users.noreply.github.com>
Copy link
Copy Markdown
Member

@tsaubergine tsaubergine left a comment

Choose a reason for hiding this comment

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

  1. Please update SimpleThread with a new argument for the ImplementationTag but leave a 1-arg version (goby::middleware::SimpleThread) that acts as before (uses zeromq) but gives a deprecated compile time warning. Add new specializations for goby::zeromq::SimpleThread and goby::udpm::SimpleThread that use the respective InterProcessForwarder implementations.

  2. move ZeromqInterprocessTag into src/zeromq/transport/interprocess.h, ZeromqIntermoduleTag into src/zeromq/transport/intermodule.h and similar for the Udpm tags (src/udpm/transport/*).

Copilot AI and others added 2 commits April 9, 2026 04:18
Agent-Logs-Url: https://github.com/GobySoft/goby3/sessions/1e9e4359-992e-49b3-b502-88884c861876

Co-authored-by: tsaubergine <732276+tsaubergine@users.noreply.github.com>
…onTag, add zeromq/udpm SimpleThread, move tags to zeromq/udpm detail headers

Agent-Logs-Url: https://github.com/GobySoft/goby3/sessions/1e9e4359-992e-49b3-b502-88884c861876

Co-authored-by: tsaubergine <732276+tsaubergine@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 9, 2026

  1. Please update SimpleThread with a new argument for the ImplementationTag but leave a 1-arg version (goby::middleware::SimpleThread) that acts as before (uses zeromq) but gives a deprecated compile ...

Done in commit 9b20b23:

  1. SimpleThread with ImplementationTag: Updated middleware::SimpleThread to accept a 2-arg form SimpleThread<Config, ImplementationTag> as the primary template. The 1-arg middleware::SimpleThread<Config> (i.e. SimpleThread<Config, void>) is kept as a deprecated partial specialization that defaults to zeromq and emits a compile-time warning. Added goby::zeromq::SimpleThread<Config> in src/zeromq/application/simple_thread.h and goby::udpm::SimpleThread<Config> in src/udpm/application/simple_thread.h.

  2. Tags moved: ZeromqInterprocessTag/ZeromqIntermoduleTag moved into src/zeromq/transport/detail/tags.h and UdpmInterprocessTag/UdpmIntermoduleTag moved into src/udpm/transport/detail/tags.h. The static_group_names.h now only contains the concat helper.

  3. driver_thread.h ImplementationTag: ModemDriverThread is now template <typename ImplementationTag>, using the same InterProcessForwarder prefix as the InnerTransporter passed to InterVehiclePortal. InterVehiclePortal extracts typename InnerTransporter::implementation_tag (enabled by a new using implementation_tag = ImplementationTag in InterProcessTransporterBase) and passes it to ModemDriverThread<ImplementationTag>. Explicit instantiations for both zeromq and udpm tags are provided in driver_thread.cpp.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 239.142.0.1
    • Triggering command: REDACTED, pid is -1 (packet block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI requested a review from tsaubergine April 9, 2026 04:47
…ation. Switch tests and other applications to use correct interprocess implementation
…erProcess/Module to be more explicit about deprecated specialization
…parate deprecated InterProcessForwarder from rest of header. Isolate Boost.StateMachine deprecated warning so we can leave Wdeprecated-declarations enabled for everything else
@tsaubergine tsaubergine marked this pull request as ready for review April 9, 2026 06:48
@tsaubergine tsaubergine merged commit 0b8e693 into 3.0-interprocess-implementation-tag Apr 9, 2026
5 checks passed
@tsaubergine tsaubergine deleted the copilot/finalize-implementationtag-template-parameter branch April 9, 2026 08:43
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