-
Notifications
You must be signed in to change notification settings - Fork 1
Remove RelayTestServer project and non-x64 platform configurations from solution #2
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,7 +16,7 @@ | |
| using plugin_Relay.Models; | ||
| using plugin_Relay.Pages; | ||
| using Microsoft.Extensions.Logging; | ||
| using Stl.Rpc; | ||
| using ActualLab.Rpc; | ||
|
|
||
| // To learn more about WinUI, the WinUI project structure, | ||
| // and more about our project templates, see: http://aka.ms/winui-project-info. | ||
|
|
@@ -169,39 +169,29 @@ public void Initialize() | |
| // Mark as initialized | ||
| IsInitialized = true; | ||
|
|
||
| try | ||
| { | ||
| MemoryPackFormatterProvider.Register(new TrackingDeviceFormatter()); | ||
| MemoryPackFormatterProvider.Register(new TrackedJointFormatter()); | ||
| MemoryPackFormatterProvider.Register(new TrackingDeviceFormatter()); | ||
| MemoryPackFormatterProvider.Register(new TrackedJointFormatter()); | ||
|
|
||
| if (RelayService.Instance?.IsBackfeed ?? false) | ||
| { | ||
| Status = RelayDeviceStatus.BackFeedDetected; | ||
| SettingsPage.DeviceStatusAppendix = string.Empty; | ||
| InitException = null; | ||
| return; // Don't proceed further | ||
| } | ||
| if (RelayService.Instance?.IsBackfeed ?? false) | ||
| { | ||
| Status = RelayDeviceStatus.BackFeedDetected; | ||
| SettingsPage.DeviceStatusAppendix = string.Empty; | ||
| InitException = null; | ||
| return; // Don't proceed further | ||
| } | ||
|
|
||
| var services = new ServiceCollection() | ||
| .AddLogging(logging => logging.AddConsole()); | ||
| var services = new ServiceCollection() | ||
| .AddLogging(); | ||
|
|
||
| services.AddRpc() | ||
| .AddWebSocketClient($"http://{ServerIp}:{ServerPort}/") | ||
| .AddClient<IRelayService>() | ||
| .AddServer<IRelayClient, DataClient>(); | ||
| services.AddRpc() | ||
| .AddWebSocketClient($"http://{ServerIp}:{ServerPort}/") | ||
| .AddClient<IRelayService>(); | ||
|
|
||
| ServiceChannel = services.BuildServiceProvider(); | ||
| Service = ServiceChannel.GetRequiredService<IRelayService>(); | ||
| ServiceChannel = services.BuildServiceProvider(); | ||
| Service = ServiceChannel.GetRequiredService<IRelayService>(); | ||
|
|
||
| SettingsPage.DeviceStatusAppendix = string.Empty; | ||
| SettingsPage.StartConnectionTest(); | ||
| } | ||
| catch (Exception ex) | ||
| { | ||
| InitException = ex; | ||
| Status = RelayDeviceStatus.ServiceError; | ||
| return; | ||
| } | ||
| SettingsPage.DeviceStatusAppendix = string.Empty; | ||
| SettingsPage.StartConnectionTest(); | ||
|
Comment on lines
+172
to
+194
|
||
|
|
||
| Host.Log($"Tried to initialize with status: {DeviceStatusString}"); | ||
| InitException = null; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,13 +24,17 @@ | |
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="ActualLab.Generators" Version="12.1.51"> | ||
| <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
| <PrivateAssets>all</PrivateAssets> | ||
| </PackageReference> | ||
| <PackageReference Include="ActualLab.Rpc" Version="12.1.51" /> | ||
| <PackageReference Include="ActualLab.Rpc.Server" Version="12.1.51" /> | ||
| <PackageReference Include="Amethyst.Plugins.Contract" Version="1.3.0" /> | ||
| <PackageReference Include="MemoryPack" Version="1.21.4" /> | ||
| <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" /> | ||
| <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" /> | ||
| <PackageReference Include="Stl.Generators" Version="6.8.11" /> | ||
| <PackageReference Include="Stl.Rpc" Version="6.8.11" /> | ||
| <PackageReference Include="Stl.Rpc.Server" Version="6.8.11" /> | ||
| <PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.1" /> | ||
|
Comment on lines
+27
to
+37
|
||
| <PackageReference Include="System.ComponentModel.Composition" Version="8.0.0" /> | ||
| <PackageReference Include="System.ComponentModel.Composition.Registration" Version="8.0.0" /> | ||
| <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.7.250606001" /> | ||
|
|
||
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.
The client-side RPC setup has removed the server registration for IRelayClient. Previously, the client registered both .AddClient() and .AddServer<IRelayClient, DataClient>() to handle bidirectional communication. With this change, the client can only call the server but cannot receive calls from the server. The DataClient class (lines 333-346) is still defined and implements IRelayClient with methods like OnRequestShutdown and OnRefreshInterface, but it will never be invoked since it's no longer registered. If bidirectional communication is still needed, the .AddServer<IRelayClient, DataClient>() line should be restored. If bidirectional communication from server to client is no longer required, the DataClient class and IRelayClient interface should be removed from the client-side code.