Refactor SharpCAT into Client-Server architecture #14
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.
This PR implements a complete Client-Server architecture refactoring for SharpCAT, transforming the monolithic library into a distributed system that enables remote radio control and management.
New Architecture
The refactoring introduces three distinct components:
/SharpCAT/): The original .NET Standard 2.0 library remains unchanged, preserving all existing CAT control logic and radio models/Server/): New ASP.NET Core Web API that exposes the core library functionality through REST endpoints/Client/): New .NET class library providing a typed client interface for consuming the Server APIsKey Features
Server APIs
The new
ExampleControllerexposes essential radio control endpoints:GET /api/example/health- Server health monitoringGET /api/example/ports- Discovery of available serial portsGET /api/example/ctcss-tones- Retrieval of CTCSS tone frequenciesGET /api/example/dcs-codes- Access to DCS code definitionsTyped Client Library
The
SharpCATApiClientprovides a clean, async interface:Benefits
This architecture enables:
Migration Path
Existing users can continue using the original SharpCAT library unchanged. The new architecture is additive and maintains full backward compatibility.
Next Steps
The foundation is now in place for expanding the API surface to include:
Testing was performed to verify all components build successfully and the Server APIs respond correctly to HTTP requests.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.