Merge pull request #22 from ekinnee/copilot/fix-1377b357-2690-4bb4-acf3-57a77c4064f0

Move SharpCAT.Server to top-level Server directory and update project structure
This commit is contained in:
Erick Kinnee 2025-08-06 20:20:00 -05:00 committed by GitHub
commit 4192efdd0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 11 additions and 11 deletions

View file

@ -1,8 +1,8 @@
using Microsoft.AspNetCore.Mvc;
using SharpCAT.Server.Models;
using SharpCAT.Server.Services;
using Server.Models;
using Server.Services;
namespace SharpCAT.Server.Controllers
namespace Server.Controllers
{
/// <summary>
/// Controller for CAT (Computer Aided Transceiver) operations

View file

@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using System.IO.Ports;
namespace SharpCAT.Server.Models
namespace Server.Models
{
/// <summary>
/// Response model for listing available serial ports

View file

@ -1,4 +1,4 @@
using SharpCAT.Server.Services;
using Server.Services;
var builder = WebApplication.CreateBuilder(args);

View file

@ -14,7 +14,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Library\Library.csproj" />
<ProjectReference Include="..\Library\Library.csproj" />
</ItemGroup>
</Project>

View file

@ -1,6 +1,6 @@
using System.IO.Ports;
namespace SharpCAT.Server.Services
namespace Server.Services
{
/// <summary>
/// Interface for serial communication services

View file

@ -1,7 +1,7 @@
using System.IO.Ports;
using System.Text;
namespace SharpCAT.Server.Services
namespace Server.Services
{
/// <summary>
/// Service for managing serial communication with radios using SharpCAT library
@ -9,7 +9,7 @@ namespace SharpCAT.Server.Services
public class SerialCommunicationService : ISerialCommunicationService, IDisposable
{
private readonly ILogger<SerialCommunicationService> _logger;
private Serial? _serialConnection;
private SharpCAT.Serial? _serialConnection;
private SerialPort? _directSerialPort;
private string? _currentPortName;
private readonly SemaphoreSlim _semaphore = new(1, 1);
@ -25,7 +25,7 @@ namespace SharpCAT.Server.Services
{
try
{
var sharpCat = new SharpCAT();
var sharpCat = new SharpCAT.SharpCAT();
var ports = sharpCat.PortNames;
_logger.LogInformation("Found {PortCount} available serial ports", ports?.Length ?? 0);
return ports ?? Array.Empty<string>();

View file

@ -7,7 +7,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Library", "Library\Library.
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Server", "Server", "{43CFF66C-84E6-4EC2-AE4F-005FB80D74D5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpCAT.Server", "Server\SharpCAT.Server\SharpCAT.Server.csproj", "{22E4F655-252E-42DB-ADD5-494BC825A97C}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Server\Server.csproj", "{22E4F655-252E-42DB-ADD5-494BC825A97C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution