using RobotNet10.NavigationTune.Shared.Models;
namespace RobotNet10.NavigationTune.Shared.Interfaces;
///
/// Navigation wrapper for tuning system
///
public interface ITuningNavigation
{
///
/// Execute a test with given scenario and parameters.
/// When testRunId is provided, real-time telemetry is pushed to SignalR group test_{testRunId}.
/// When onComplete is provided, returns immediately with Status=Running and invokes onComplete when done.
///
Task ExecuteTestAsync(
TestScenario scenario,
NavigationParameterSet parameters,
Guid? testRunId = null,
CancellationToken cancellationToken = default,
Action? onComplete = null
);
///
/// Real-time telemetry updates
///
event Action? OnTelemetryUpdate;
///
/// Safety violation events
///
event Action? OnSafetyViolation;
///
/// Test status updates
///
event Action? OnStatusChanged;
///
/// Check if test is currently running
///
bool IsTestRunning { get; }
///
/// Get current test progress
///
TestProgress GetProgress();
///
/// Pause current test
///
void Pause();
///
/// Resume paused test
///
void Resume();
///
/// Stop current test
///
void Stop();
///
/// Emergency stop
///
void EmergencyStop();
}
///
/// Test execution result
///
public class TestExecutionResult
{
public Guid TestRunId { get; set; }
public TestStatus Status { get; set; }
public List TelemetryData { get; set; } = new();
public TestMetrics? Metrics { get; set; }
public List SafetyViolations { get; set; } = new();
public DateTime StartTime { get; set; }
public DateTime? EndTime { get; set; }
public double Duration { get; set; }
public string? ErrorMessage { get; set; }
public TuningReport? TuningReport { get; set; }
}
///
/// Test progress information
///
public class TestProgress
{
public double ProgressPercent { get; set; } // 0.0 - 1.0
public double DistanceTraveled { get; set; }
public double DistanceToGoal { get; set; }
public double ElapsedTime { get; set; }
public double EstimatedTimeRemaining { get; set; }
}