Skip to content
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

Merged
merged 8 commits into from
Apr 9, 2024

Conversation

serges147
Copy link
Collaborator

  • Added ITransport::makeMessage[Rx|Tx]Session methods
  • Added ITransport::make[Request|Response][Rx|Tx]Session methods
  • Added Priority, [Service]TransferMetadata, PayloadFragments, MessageRxTransfre and ServiceRxTransfer types.
  • Addedtransport::AnyError
  • Added implementation of DynamicBuffer.

Also:

  • fixed "Coverage" build flavor, and artifacts upload
  • added libcyphal::UniquePtr & libcyphal::Expected
  • fixed "rule of five" deficiency

- 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.
@serges147 serges147 self-assigned this Apr 8, 2024
@serges147 serges147 requested a review from pavel-kirienko April 8, 2024 07:04
Comment on lines 22 to 27
IRunnable() = default;
IRunnable(const IRunnable&) = default;
IRunnable(IRunnable&&) = default;

IRunnable& operator=(const IRunnable&) = default;
IRunnable& operator=(IRunnable&&) = default;
Copy link
Member

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.

include/libcyphal/types.hpp Outdated Show resolved Hide resolved
include/libcyphal/transport/transport.hpp Outdated Show resolved Hide resolved
include/libcyphal/transport/session/msg_sessions.hpp Outdated Show resolved Hide resolved
include/libcyphal/transport/defines.hpp Outdated Show resolved Hide resolved
include/libcyphal/transport/defines.hpp Outdated Show resolved Hide resolved
include/libcyphal/transport/defines.hpp Outdated Show resolved Hide resolved
test/unittest/transport/test_dynamic_buffer.cpp Outdated Show resolved Hide resolved
test/unittest/transport/test_dynamic_buffer.cpp Outdated Show resolved Hide resolved
@serges147 serges147 requested a review from pavel-kirienko April 8, 2024 13:03
Copy link
Member

@pavel-kirienko pavel-kirienko left a 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;
Copy link
Member

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>>;
Copy link
Member

Choose a reason for hiding this comment

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

Missing const qualifier.

Copy link
Collaborator Author

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)

@serges147 serges147 merged commit a57b392 into issue/336_transport_iterfaces Apr 9, 2024
18 checks passed
@serges147 serges147 deleted the sshirokov/336_transport branch April 9, 2024 11:42
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