namespace RobotNet10.RobotApp.Modules;
///
/// Interface cho Rotation Module - Module điều khiển xoay
///
public interface IRotationModule
{
///
/// Xoay đến góc cụ thể (absolute angle in degrees)
///
/// Góc target (degrees)
Task RotateToAngleAsync(double angleDegrees, CancellationToken cancellationToken = default);
///
/// Xoay một góc offset (relative angle in degrees)
///
/// Góc offset cần xoay (degrees, positive = clockwise, negative = counter-clockwise)
Task RotateOffsetAsync(double angleOffsetDegrees, CancellationToken cancellationToken = default);
///
/// Lấy góc hiện tại (degrees)
///
Task GetCurrentAngleAsync(CancellationToken cancellationToken = default);
///
/// Kiểm tra module đã homed chưa
///
Task IsHomedAsync(CancellationToken cancellationToken = default);
bool Enable{ get; }
///
/// Kiểm tra module đã sẵn sàng chưa (initialized và homed)
///
bool IsReady { get; }
///
/// Lấy trạng thái hiện tại của module
///
RotationModuleState State { get; }
}
///
/// Trạng thái của Rotation Module
///
public enum RotationModuleState
{
Uninitialized,
Initializing,
Homing,
Ready,
Moving,
Error
}