initial commit
This commit is contained in:
28
Services/IUnlockService.cs
Normal file
28
Services/IUnlockService.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using HC_APTBS.Models;
|
||||
|
||||
namespace HC_APTBS.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Manages the immobilizer unlock sequence required by certain pump ECUs
|
||||
/// (e.g. Ford VP44 models) before they respond to test commands.
|
||||
/// </summary>
|
||||
public interface IUnlockService
|
||||
{
|
||||
/// <summary>Raised with progress text during the unlock sequence.</summary>
|
||||
event Action<string>? StatusChanged;
|
||||
|
||||
/// <summary>Raised when the unlock sequence completes. Argument is true if successful.</summary>
|
||||
event Action<bool>? UnlockCompleted;
|
||||
|
||||
/// <summary>
|
||||
/// Runs the immobilizer unlock sequence for the given pump.
|
||||
/// Returns immediately if <see cref="PumpDefinition.UnlockType"/> is 0 (no unlock needed).
|
||||
/// </summary>
|
||||
/// <param name="pump">Pump definition with unlock type and CAN parameters.</param>
|
||||
/// <param name="ct">Cancellation token to abort the unlock sequence.</param>
|
||||
Task UnlockAsync(PumpDefinition pump, CancellationToken ct);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user