-
Notifications
You must be signed in to change notification settings - Fork 503
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
Merge of Issue #346 "CAN sessions" #360
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added: - `transport::ISession` - `transport::IMessage[Rx|Ts]Session` - `transport::I[Request|Response][Rx|Ts]Session` Also: - add "std: [14, 17, 20]" to the build matrix - add hash tag triggering by #verification #docs tags - strip repo absolute path prefix from doxygen file paths #docs --------- Co-authored-by: Sergei Shirokov <sergei@Sergeis-Mac-mini.local>
- 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. - Added`transport::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`, `ICanTransport` & `IUpdTransport` - `PayloadFragment` now immutable; `FragmentBuffer` is mutable span.
- `canardInit` is in use. - CAN transport memory resource is connected to the canard allocate/free. - Implemented `getLocalNodeId` Also: - Get rid of extra `Factory` entities.
- `cetl::VariableLengthArray` is now in use to store CAN transport media interfaces. - min MTU from all media is reported by the `ICanTransport::getProtocolParams`. - added corresponding unit tests (to cover `getProtocolParams`). Also: - a bit reworked (simplified) canard memory alloc/free
1. Less `auto` according AUTOSAR A7-1-5 2. Less `struct` according AUTOSAR A11-0-2 3. C.35: A base class destructor should be either public and virtual, or protected and non-virtual. 4. `IMedia::setFilters` now fallible.
- Implemented `MessageRxSession` - Added intermediate `can::TransportDelegate` entity: - needed for all sessions to be able reference their parent transport - contains canard related (kinda) mixin logic (like "canard" memory management or errors translation) Also: - switch to toolshed 22.4.7 - disable asserts from "Coverage" build flavor - to not pollute branch coverage --------- Co-authored-by: Sergei Shirokov <sshirokov@malwarebytes.com>
- Implemented TX behavior: - building contiguous payload from TX fragments (see internal `ContiguousPayload`) - pushing the payload to each media canard TX queue - `can::TransportImpl::run` now peeks, pushes to media, and finally pops TX queue items (see `runMediaTransmit`) - implemented dropping of expired transfers - implemented flushing of TX queues on transport destruction - no memory leaks now in case there were not transmitted queue items - extended `ITransport` with new `setLocalNodeId` method - A bit simplified creation of RX session (b/c it turns out that there is no failure path; but assert is there just in case) - Addressed issue #349 - More documentation - Previous PR fixes: - `memcpy` → `memmove` - removed not needed `inline`-s - `std::` prefixes before std integrals Also: - better coverage stats for branches - no doxygen warnings - fixed some places where `noexcept` were lost - `override` → `final` where applicable (for Scott ;) ) Coverage: <img width="1680" alt="image" src="https://github.com/OpenCyphal-Garage/libcyphal/assets/2915466/ebc795a9-72a4-4da8-a049-adb899d09480"> --------- Co-authored-by: Sergei Shirokov <sshirokov@malwarebytes.com>
- Added Svc RX & TX sessions (both for Request & Response). - Now that we have more sessions, `ContiguousPayload` building moved to transport impl: - less code duplication - less to verify by unit tests - sessions now more like facade for RX/TX - they do necessary params validation/conversion, but ultimately delegate to the transport - switch to `cetl::unbounded_variant` (instead of former `cetl::any`) Also: - minor changes for previous PR requests - more docs for stable api; excluding `*::detail::*` from generated docs Codo coverage: <img width="1723" alt="Screenshot 2024-05-02 at 09 53 11" src="https://github.com/OpenCyphal-Garage/libcyphal/assets/2915466/56c4ab26-177c-4cd8-806e-173cf38eb84c"> --------- Co-authored-by: Sergei Shirokov <sshirokov@malwarebytes.com>
- Implemented CAN media filters reconfiguration on subscribe/unsubscribe - Reference official `libcanard` v3.2.0 #verification --------- Co-authored-by: Sergei Shirokov <sshirokov@malwarebytes.com>
GitHub's "Hide whitespace" is recommended during review. <img width="1311" alt="image" src="https://github.com/OpenCyphal-Garage/libcyphal/assets/2915466/0fb7a41c-06be-4e8d-b528-d3ac168629c1"> <img width="1708" alt="image" src="https://github.com/OpenCyphal-Garage/libcyphal/assets/2915466/6bd03515-5607-44b8-ab11-5bf8b2695ef8"> --------- Co-authored-by: Sergei Shirokov <sshirokov@malwarebytes.com>
No `CETL_NODISCARD` for the most of public api (issue #350), but private (aka `detail`) stuff stays under strict `[[nodiscard]]` policy for all non-`void` returning functions. Also: - Less `NOSONAR`-s by switching some internal `void*`-s → `cetl::byte*`-s. - Eliminated `IMultiplexer` at CAN - no use of it; but will be at UDP. - More docs for public api. - Fixed Build Status and Sonar Cloud badges at `README.md`. --------- Co-authored-by: Sergei Shirokov <sshirokov@malwarebytes.com> Co-authored-by: Pavel Kirienko <pavel.kirienko@gmail.com>
pavel-kirienko
previously approved these changes
May 14, 2024
Co-authored-by: Pavel Kirienko <pavel.kirienko@gmail.com>
Quality Gate passedIssues Measures |
pavel-kirienko
approved these changes
May 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.