-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 336: Declare libcyphal transport interfaces #339
Issue 336: Declare libcyphal transport interfaces #339
Conversation
- added `ITransport::makeMessage[Rx|Tx]Session` methods - added `ITransport::make[Request|Response][Rx|Tx]Session` methods Also: - added `libcyphal::UniquePtr` & `libcyphal::Expected` - added`transport::AnyError`
…essageRxTransfre` and `ServiceRxTransfer` types.
include/libcyphal/runnable.hpp
Outdated
IRunnable() = default; | ||
IRunnable(const IRunnable&) = default; | ||
IRunnable(IRunnable&&) = default; | ||
|
||
IRunnable& operator=(const IRunnable&) = default; | ||
IRunnable& operator=(IRunnable&&) = default; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think runnables must be non-copyable, otherwise things like AggregateRunnable
et all will break, because we have to be able to keep valid references to the interface. If the implementation object is moved, references lose validity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IRunnable& operator=(IRunnable&&) = default; | ||
IRunnable() = default; | ||
IRunnable(IRunnable&&) = default; | ||
IRunnable& operator=(IRunnable&&) = default; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
future note: do not forget to update this in the next pr
}; | ||
|
||
// TODO: Maybe have `cetl::byte` polyfill for C++20 | ||
using PayloadFragments = cetl::span<cetl::span<std::uint8_t>>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing const qualifier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will double check (next pr)
ITransport::makeMessage[Rx|Tx]Session
methodsITransport::make[Request|Response][Rx|Tx]Session
methodsPriority
,[Service]TransferMetadata
,PayloadFragments
,MessageRxTransfre
andServiceRxTransfer
types.transport::AnyError
DynamicBuffer
.Also:
libcyphal::UniquePtr
&libcyphal::Expected