Initial commit
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
using RobotNet10.NavigationTune.Shared.Models;
|
||||
|
||||
namespace RobotNet10.NavigationTune.Shared.Interfaces;
|
||||
|
||||
/// <summary>
|
||||
/// Parameter management interface
|
||||
/// </summary>
|
||||
public interface IParameterManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Get parameter set by name
|
||||
/// </summary>
|
||||
Task<NavigationParameterSet?> GetByNameAsync(string name);
|
||||
|
||||
/// <summary>
|
||||
/// Get parameter set by ID
|
||||
/// </summary>
|
||||
Task<NavigationParameterSet?> GetByIdAsync(Guid id);
|
||||
|
||||
/// <summary>
|
||||
/// Get all parameter sets
|
||||
/// </summary>
|
||||
Task<List<NavigationParameterSet>> GetAllAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Save parameter set
|
||||
/// </summary>
|
||||
Task<Guid> SaveAsync(NavigationParameterSet parameterSet);
|
||||
|
||||
/// <summary>
|
||||
/// Update parameter set
|
||||
/// </summary>
|
||||
Task UpdateAsync(NavigationParameterSet parameterSet);
|
||||
|
||||
/// <summary>
|
||||
/// Delete parameter set
|
||||
/// </summary>
|
||||
Task DeleteAsync(Guid id);
|
||||
|
||||
/// <summary>
|
||||
/// Validate parameter set
|
||||
/// </summary>
|
||||
ValidationResult Validate(NavigationParameterSet parameterSet);
|
||||
|
||||
/// <summary>
|
||||
/// Get default preset
|
||||
/// </summary>
|
||||
NavigationParameterSet GetDefaultPreset();
|
||||
|
||||
/// <summary>
|
||||
/// Get aggressive preset
|
||||
/// </summary>
|
||||
NavigationParameterSet GetAggressivePreset();
|
||||
|
||||
/// <summary>
|
||||
/// Get smooth preset
|
||||
/// </summary>
|
||||
NavigationParameterSet GetSmoothPreset();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validation result
|
||||
/// </summary>
|
||||
public class ValidationResult
|
||||
{
|
||||
public bool IsValid { get; set; }
|
||||
public List<string> Errors { get; set; } = new();
|
||||
public List<string> Warnings { get; set; } = new();
|
||||
|
||||
public void AddError(string error)
|
||||
{
|
||||
IsValid = false;
|
||||
Errors.Add(error);
|
||||
}
|
||||
|
||||
public void AddWarning(string warning)
|
||||
{
|
||||
Warnings.Add(warning);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user