-
Notifications
You must be signed in to change notification settings - Fork 498
Open
Labels
class-requirementIssue that can be traced back to a design requiementIssue that can be traced back to a design requiementdomain-productionPertains to the shippable code rather than any scaffoldingPertains to the shippable code rather than any scaffoldingpriority-lowA minor issueA minor issue
Milestone
Description
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.
Metadata
Metadata
Assignees
Labels
class-requirementIssue that can be traced back to a design requiementIssue that can be traced back to a design requiementdomain-productionPertains to the shippable code rather than any scaffoldingPertains to the shippable code rather than any scaffoldingpriority-lowA minor issueA minor issue