both can_transport_impl and udp_transport_impl have makeTransport methods that take a span of IMedia*. This is a pointer to pointers which means a simple implementation with only one IMedia implementation has to add an additional memory location to store a pointer to the one implementation.
struct MyApplication {
MyApplication()
: only_one_of_me_{}
, i_hate_this_{&only_one_of_me_}
{
libcyphal::transport::udp::makeTransport(
{
*cetl::pmr::get_default_resource(),
},
my_executor,
cetl::span<libcyphal::transport::udp::IMedia*>{&i_hate_this_, 1},
tx_capacity);
}
MyMediaObject only_one_of_me_;
MyMediaObject* i_hate_this_;
};
Solutions include a different override for this case or std::reference_wrapper in the span.
both
can_transport_implandudp_transport_implhavemakeTransportmethods that take a span ofIMedia*. This is a pointer to pointers which means a simple implementation with only one IMedia implementation has to add an additional memory location to store a pointer to the one implementation.Solutions include a different override for this case or
std::reference_wrapperin the span.