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