Finalize ImplementationTag template parameter for InterProcessTransporterBase#378
Conversation
…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>
tsaubergine
left a comment
There was a problem hiding this comment.
-
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.
-
move ZeromqInterprocessTag into src/zeromq/transport/interprocess.h, ZeromqIntermoduleTag into src/zeromq/transport/intermodule.h and similar for the Udpm tags (src/udpm/transport/*).
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>
Done in commit 9b20b23:
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:
If you need me to access, download, or install something from one of these locations, you can either:
|
…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
…should be supported
0b8e693
into
3.0-interprocess-implementation-tag
Summary
Implements all changes required by the problem statement for finalizing the
ImplementationTagtemplate parameter inInterProcessTransporterBase.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"(insrc/zeromq/transport/detail/tags.h)goby::zeromq::detail::ZeromqIntermoduleTag→"goby::middleware::intermodule::zeromq"(insrc/zeromq/transport/detail/tags.h)goby::udpm::detail::UdpmInterprocessTag→"goby::middleware::interprocess::udpm"(insrc/udpm/transport/detail/tags.h)goby::udpm::detail::UdpmIntermoduleTag→"goby::middleware::intermodule::udpm"(insrc/udpm/transport/detail/tags.h)static_group_names.hnow only contains theconcathelper (include guards added).implementation_tagtypedef added toInterProcessTransporterBaseusing implementation_tag = ImplementationTag;This allows downstream types (e.g.
InterVehiclePortal) to extract the tag from anInnerTransporter.Removed default
ImplementationTagfromInterProcessTransporterBaseNew forwarder and portal types
zeromq namespace:
zeromq::InterProcessForwarder<Inner>— alias formiddleware::InterProcessForwarder<Inner, zeromq::detail::ZeromqInterprocessTag>zeromq::InterModuleForwarder<Inner>— alias formiddleware::InterModuleForwarder<Inner, zeromq::detail::ZeromqIntermoduleTag>zeromq::InterProcessPortal<Inner>— updated with explicitZeromqInterprocessTagzeromq::InterModulePortal<Inner>— updated with explicitZeromqIntermoduleTagudpm namespace:
udpm::InterProcessForwarder<Inner>— alias formiddleware::InterProcessForwarder<Inner, udpm::detail::UdpmInterprocessTag>udpm::InterModuleForwarder<Inner>— alias formiddleware::InterModuleForwarder<Inner, udpm::detail::UdpmIntermoduleTag>udpm::InterProcessPortal<Inner>— updated with explicitUdpmInterprocessTagudpm::InterModulePortal<Inner>— updated with explicitUdpmIntermoduleTagDeprecated backwards-compatible types
middleware::InterProcessForwarder<Inner>(1-arg) andmiddleware::InterModuleForwarder<Inner>(1-arg) are kept for backwards compatibility via a partial template specialization withImplementationTag = void. The constructor of each is marked[[deprecated]]to emit a compile-time warning.Updated
SimpleThreadwithImplementationTagmiddleware::SimpleThreadnow accepts a 2-arg formSimpleThread<Config, ImplementationTag>as the primary template. The 1-argmiddleware::SimpleThread<Config>(i.e.SimpleThread<Config, void>) is kept as a deprecated partial specialization that defaults to zeromq and emits a compile-time warning:New transport-specific aliases:
goby::zeromq::SimpleThread<Config>insrc/zeromq/application/simple_thread.hgoby::udpm::SimpleThread<Config>insrc/udpm/application/simple_thread.hModemDriverThreadtemplated onImplementationTagModemDriverThreadis nowtemplate <typename ImplementationTag>, using the sameInterProcessForwarderprefix as theInnerTransporterpassed toInterVehiclePortal.InterVehiclePortalextractstypename InnerTransporter::implementation_tagand passes it toModemDriverThread<ImplementationTag>. Thedriver_plugins_static class member is replaced by a free-function singletonget_driver_plugins(). Explicit template instantiations for both zeromq and udpm tags are provided indriver_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.hmiddleware/transport/intervehicle/driver_thread.hand.cppmiddleware/io/detail/io_transporters.hTemplate template parameter update
InterProcessPortalImplementationin bothzeromq/andudpm/updated from 2-arg to 3-arg template template parameter to pass theImplementationTagthrough to the portal base.InterProcessPortalBase,InterModulePortalBase, andInterModuleTransporterBaseall updated to takeImplementationTagas an additional parameter.