Files
Aperio_Control_Centre/Aperio_Control_Centre.UnitTest/AperioServer/Setups/TestingAperioHubDevice.cs
2025-10-17 08:48:13 +02:00

166 lines
5.1 KiB
C#

using Aperio_Control_Centre.Aadp.Commands;
using Aperio_Control_Centre.Aadp.Enumerations;
using Aperio_Control_Centre.Aadp.Types;
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 System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Aperio_Control_Centre.UnitTest.AperioServer.Setups
{
internal sealed class TestingAperioHubDevice : IAperioHubDevice
{
private IAperioConnectionContext? _connection;
private DeviceId _deviceId;
public IAperioTimeoutFeature TimeoutFeature => new TestingAperioTimeoutFeature();
public string Id => _deviceId.ToIdString();
public string Name => throw new NotImplementedException();
public DateTime LastData { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public int DataBaseDeviceID => throw new NotImplementedException();
public IAperioConnectionContext Connection => _connection;
public string IPAddress => _connection.Address.ToString();
public ConnectionStates ConnectionState => throw new NotImplementedException();
public Status DeviceStatus => throw new NotImplementedException();
public TamperState TamperState => throw new NotImplementedException();
public string FirmwareVersion { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public MainHwVersion? HwVersion { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public LockVersions LockVersion { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public event EventHandler? DeviceChanged;
public Task ClearDTCOnDevice(uint dtcId, CancellationToken token)
{
throw new NotImplementedException();
}
public void Dispose()
{
}
public Task GetdeviceParameter(string parameter, CancellationToken token)
{
throw new NotImplementedException();
}
public Task GetDeviceTimeFromDevice(CancellationToken token)
{
throw new NotImplementedException();
}
public Task GetDTCsFromDevice(CancellationToken token)
{
throw new NotImplementedException();
}
public Task GetFirmwareVersionFromDevice(CancellationToken token)
{
throw new NotImplementedException();
}
public Task GetLockVersionsFromDevice(CancellationToken token)
{
throw new NotImplementedException();
}
public Task GetMainHwVersionFromDevice(CancellationToken token)
{
throw new NotImplementedException();
}
public Task GetStatusFromDevice(CancellationToken token)
{
return Task.CompletedTask;
//throw new NotImplementedException();
}
public Task GetTamperStateFromDevice(CancellationToken token)
{
throw new NotImplementedException();
}
public Task HandleMessage(IPduCommand pducommand, CancellationToken token)
{
throw new NotImplementedException();
}
public void ResetTimeOut()
{
throw new NotImplementedException();
}
public Task RestartDevice(CancellationToken token)
{
throw new NotImplementedException();
}
public Task SetBaseDevice(DeviceId deviceId, IAperioConnectionContext conn, CancellationToken token)
{
throw new NotImplementedException();
}
public Task SetConnection(IAperioConnectionContext conn, CancellationToken token)
{
_connection = conn;
return Task.CompletedTask;
}
public void RemoveConnection()
{
_connection = null;
}
public Task SetConnectionState(ConnectionStates connectionState, CancellationToken token)
{
return Task.CompletedTask;
}
public Task SetDevice(DeviceId deviceId, IAperioConnectionContext conn, CancellationToken token)
{
_deviceId = deviceId;
_connection = conn;
return Task.CompletedTask;
}
public Task SetDeviceStatus(Status deviceStatus, CancellationToken token)
{
throw new NotImplementedException();
}
public Task SetDeviceTimeOnDevice(CancellationToken token)
{
throw new NotImplementedException();
}
public void StopTimeUpdateTimer()
{
}
public Task WriteToDeviceLog(string msg, LogTypes logType, CancellationToken token)
{
throw new NotImplementedException();
}
public Task GetDeviceListFromDevice(CancellationToken token)
{
throw new NotImplementedException();
}
}
}