feat: Refactor routing signal types and enhance web API for routing devices

- Renamed `UsbOutput` to `Usb` in `eRoutingSignalType.cs`.
- Removed unused `UsbInput` and `SecondaryAudio` signal types.
- Added new HTTP route for retrieving routing devices and tielines in `EssentialsWebApi.cs`.
- Implemented `GetRoutingDevicesAndTieLinesHandler` to handle requests for routing devices and tielines, including detailed port information.
- Updated `GenericSink` to remove `SecondaryAudio` from input port signal types.
- Created `ICurrentSourcesMessenger` to manage current source information and status updates.
- Introduced `IDeviceInfoProviderMessenger` for device information communication with debounce functionality.
- Updated `MobileControlSystemController` to use new messenger classes for current sources and device info.
- Added console commands for listing tielines and visualizing routes in `ControlSystem.cs`.
- Implemented methods for visualizing routes and current routes, including filtering options.
This commit is contained in:
Neil Dorin 2026-04-10 09:49:16 -06:00
parent ec3e2bbc0b
commit 3d8ee22f45
14 changed files with 1433 additions and 456 deletions

View file

@ -12,17 +12,17 @@ namespace PepperDash.Essentials.AppServer.Messengers
/// <summary>
/// Represents a IHasCurrentSourceInfoMessenger
/// </summary>
public class CurrentSourcesMessenger : MessengerBase
public class ICurrentSourcesMessenger : MessengerBase
{
private readonly ICurrentSources sourceDevice;
/// <summary>
/// Initializes a new instance of the <see cref="CurrentSourcesMessenger"/> class.
/// Initializes a new instance of the <see cref="ICurrentSourcesMessenger"/> class.
/// </summary>
/// <param name="key">The key.</param>
/// <param name="messagePath">The message path.</param>
/// <param name="device">The device.</param>
public CurrentSourcesMessenger(string key, string messagePath, ICurrentSources device) : base(key, messagePath, device as IKeyName)
public ICurrentSourcesMessenger(string key, string messagePath, ICurrentSources device) : base(key, messagePath, device as IKeyName)
{
sourceDevice = device;
}

View file

@ -10,19 +10,19 @@ namespace PepperDash.Essentials.AppServer.Messengers
/// Facilitates communication of device information by providing mechanisms for status updates and device
/// information reporting.
/// </summary>
/// <remarks>The <see cref="DeviceInfoMessenger"/> class integrates with an <see
/// <remarks>The <see cref="IDeviceInfoProviderMessenger"/> class integrates with an <see
/// cref="IDeviceInfoProvider"/> to manage device-specific information. It uses a debounce timer to limit the
/// frequency of updates, ensuring efficient communication. The timer is initialized with a 1-second interval and
/// is disabled by default. This class also subscribes to device information change events and provides actions for
/// reporting full device status and triggering updates.</remarks>
public class DeviceInfoMessenger : MessengerBase
public class IDeviceInfoProviderMessenger : MessengerBase
{
private readonly IDeviceInfoProvider _deviceInfoProvider;
private readonly Timer debounceTimer;
/// <summary>
/// Initializes a new instance of the <see cref="DeviceInfoMessenger"/> class, which facilitates communication
/// Initializes a new instance of the <see cref="IDeviceInfoProviderMessenger"/> class, which facilitates communication
/// of device information.
/// </summary>
/// <remarks>The messenger uses a debounce timer to limit the frequency of certain operations. The
@ -30,7 +30,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
/// <param name="key">A unique identifier for the messenger instance.</param>
/// <param name="messagePath">The path used for sending and receiving messages.</param>
/// <param name="device">An implementation of <see cref="IDeviceInfoProvider"/> that provides device-specific information.</param>
public DeviceInfoMessenger(string key, string messagePath, IDeviceInfoProvider device) : base(key, messagePath, device as Device)
public IDeviceInfoProviderMessenger(string key, string messagePath, IDeviceInfoProvider device) : base(key, messagePath, device as Device)
{
_deviceInfoProvider = device;