Add doormode schudeling

This commit is contained in:
Martijn Scheepers
2025-10-17 08:48:13 +02:00
parent 6aca09d6d4
commit f379a9f689
76 changed files with 3057 additions and 116 deletions

View File

@@ -54,10 +54,9 @@ namespace Aperio_Control_Centre.AperioServer
_connection = connection;
}
public Task RemoveConnection()
public void RemoveConnection()
{
Debug.WriteLine("TestingAperioConnectionContext RemoveConnection");
return Task.CompletedTask;
}
public Task Receive(CancellationTokenSource linkedCts)

View File

@@ -13,7 +13,7 @@ using System.Threading.Tasks;
namespace Aperio_Control_Centre.UnitTest.AperioServer.Setups
{
internal class TestingAperioHubDevice : IAperioHubDevice
internal sealed class TestingAperioHubDevice : IAperioHubDevice
{
private IAperioConnectionContext? _connection;
private DeviceId _deviceId;

View File

@@ -6,6 +6,7 @@ using Aperio_Control_Centre.Aadp.Types.ApplicationTypes;
using Aperio_Control_Centre.ACSDatabase.Types;
using Aperio_Control_Centre.AperioServer;
using Aperio_Control_Centre.AperioServer.Devices;
using Aperio_Control_Centre.Models;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -14,7 +15,7 @@ using System.Threading.Tasks;
namespace Aperio_Control_Centre.UnitTest.AperioServer.Setups
{
internal class TestingAperioLockDevice : IAperioLockDevice
internal sealed class TestingAperioLockDevice : IAperioLockDevice
{
private IAperioConnectionContext? _connection;
private DeviceId _deviceId;
@@ -56,6 +57,8 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer.Setups
public HandleState HandleState => throw new NotImplementedException();
public List<SchedulerItem> DoorModeSchedules => throw new NotImplementedException();
public event EventHandler? DeviceChanged;
public Task ClearDTCOnDevice(uint dtcId, CancellationToken token)
@@ -217,5 +220,15 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer.Setups
{
throw new NotImplementedException();
}
public Task LoadDoorModeSchedule(CancellationToken token)
{
throw new NotImplementedException();
}
//public void SetDoorModeOnDevice(DoorMode? doorMode)
//{
// throw new NotImplementedException();
//}
}
}

View File

@@ -6,6 +6,7 @@ using Aperio_Control_Centre.Aadp.Types.ApplicationTypes;
using Aperio_Control_Centre.ACSDatabase.Types;
using Aperio_Control_Centre.AperioServer;
using Aperio_Control_Centre.AperioServer.Devices;
using Aperio_Control_Centre.Models;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -14,7 +15,7 @@ using System.Threading.Tasks;
namespace Aperio_Control_Centre.UnitTest.AperioServer.Setups
{
internal class TestingAperioOptaDevice : IAperioOptaDevice
internal sealed class TestingAperioOptaDevice : IAperioOptaDevice
{
private IAperioConnectionContext? _connection;
private DeviceId _deviceId;
@@ -51,6 +52,8 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer.Setups
public ActivatorState EmergencyInsideState { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public ActivatorState EmergencyOutsideState { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public List<SchedulerItem> DoorModeSchedules => throw new NotImplementedException();
public event EventHandler? DeviceChanged;
public Task ClearDTCOnDevice(uint dtcId, CancellationToken token)
@@ -190,5 +193,15 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer.Setups
{
throw new NotImplementedException();
}
public Task LoadDoorModeSchedule(CancellationToken token)
{
throw new NotImplementedException();
}
//public void SetDoorModeOnDevice(DoorMode? doorMode)
//{
// throw new NotImplementedException();
//}
}
}

View File

@@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace Aperio_Control_Centre.UnitTest.AperioServer.Setups
{
internal class TestingAperioTimeoutFeature : IAperioTimeoutFeature
internal sealed class TestingAperioTimeoutFeature : IAperioTimeoutFeature
{
public DateTime GetStartTime => DateTime.Now;

View File

@@ -1,13 +1,15 @@
using Aperio_Control_Centre.Aadp.Enumerations;
using Aperio_Control_Centre.Aadp.Types;
using Aperio_Control_Centre.Aadp.Types.ApplicationTypes;
using Aperio_Control_Centre.ACSDatabase.Models;
using Aperio_Control_Centre.AperioServer;
using Aperio_Control_Centre.AperioServer.Devices;
using Aperio_Control_Centre.Models;
using System.Diagnostics;
namespace Aperio_Control_Centre.UnitTest.AperioServer.Setups
{
internal class TestingDeviceList : IAperioDeviceList
internal sealed class TestingDeviceList : IAperioDeviceList
{
public event EventHandler DeviceListChanged;
@@ -47,6 +49,11 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer.Setups
return [];
}
public IEnumerable<SchedulerItem> GetSchedules()
{
throw new NotImplementedException();
}
public void RemoveConnection(IAperioConnectionContext conn)
{
Debug.WriteLine("RemoveConnection");
@@ -57,5 +64,10 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer.Setups
Debug.WriteLine("RemoveDevice");
return Task.CompletedTask;
}
IEnumerable<DoorModeSchedule> IAperioDeviceList.GetSchedules()
{
throw new NotImplementedException();
}
}
}

View File

@@ -2,7 +2,7 @@
namespace Aperio_Control_Centre.UnitTest.AperioServer.Setups
{
internal class TestingLogger<T> : ILogger<T>
internal sealed class TestingLogger<T> : ILogger<T>
{
public List<string> Messages { get; } = [];

View File

@@ -3,7 +3,7 @@ using Aperio_Control_Centre.ScreenLogging;
namespace Aperio_Control_Centre.UnitTest.AperioServer.Setups
{
internal class TestingScreenLoggerBridge : IScreenLoggerBridge
internal sealed class TestingScreenLoggerBridge : IScreenLoggerBridge
{
public List<string> Messages { get; } = [];

View File

@@ -5,7 +5,7 @@ using System.Diagnostics;
namespace Aperio_Control_Centre.UnitTest.AperioServer.Setups
{
internal class TestingServerInfoService : IServerInfoService
internal sealed class TestingServerInfoService : IServerInfoService
{
public List<string> Messages { get; } = [];