Integration with Arcor2.ClientSdk.Communication library#258
Merged
ZdenekM merged 3 commits intorobofit:masterfrom Apr 28, 2025
Merged
Integration with Arcor2.ClientSdk.Communication library#258ZdenekM merged 3 commits intorobofit:masterfrom
ZdenekM merged 3 commits intorobofit:masterfrom
Conversation
Member
|
@YanehCheck Looks clean to me. I requested the review from @Kapim, the author of the original code. And can we see the library code somewhere? I will create a new repository for it - something like |
Member
|
@Kapim At the moment, the library is here: https://github.com/YanehCheck/Arcor2.ClientSdk/tree/master. To me, it looks well-documented and structured. |
Kapim
approved these changes
Apr 9, 2025
Collaborator
Kapim
left a comment
There was a problem hiding this comment.
Seems ok to me. Good job!
This file contains hidden or 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
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.
Introduction
The library mostly replaces the
WebSocketManagerclass, which has been renamed toCommunicationManagerand now holds the library client. I decided to retain its responsibility of invoking other Manager's methods on events, similarly to the previous architecture.The library also eliminates the need for the
NativeWebSocketspackage, which has as such been removed from the git submodules.Inclusion of the Library
The library is included by referencing an assembly file (similar to the now-removed OpenApi model assembly). I chose this approach to avoid adding an extra third-party dependency for some implementation of NuGet package manager for Unity. Newer versions of the assembly file will later be automatically generated through the CD/CI pipeline on the library repository, making updates as simple as replacing the assembly file.
Conversion of Existing Code
Most changes listed in the diff are mainly renames. Code that previously expected methods with a callback parameter has been updated to use asynchronous methods or Task continuations. A dispatcher object was added, as all events from the library are generated on a non-main thread.
Testing
Each action that involves communication with the ARCOR2 server has been manually tested, and everything seems to behave as expected.
Let me know if I should change or further update anything!