namespace RobotNet10.FleetManager.Script;
///
/// Defines the action types that can be performed at a station.
///
public enum StationAction
{
///
/// Pick up a load from the station.
///
Pick,
///
/// Drop off a load at the station.
///
Drop,
///
/// No action - robot moves to station without performing any load operation.
///
None
}
///
/// Interface for controlling an Autonomous Mobile Robot (AMR).
/// Provides methods to move the robot, execute actions, and query its current state.
///
public interface IRobot
{
///
/// Gets the unique identifier of the robot (serial number or unique identifier).
///
string RobotId { get; }
///
/// Gets the display name of the robot.
///
string Name { get; }
///
/// Gets the robot model identifier.
///
Guid ModelId { get; }
///
/// Gets the map identifier where the robot is currently operating, or if not assigned to a map.
///
Guid? MapId { get; }
///
/// Gets the current state of the robot, including position, battery, loads, and operational status.
///
RobotState State { get; }
///
/// Moves the robot to a target node on the map without performing any end action.
///
/// The name of the target node. Cannot be null or empty.
/// A cancellation token that can be used to cancel the operation.
///
/// A task that represents the asynchronous operation.
/// The task result contains a indicating success or failure of the movement command.
///
Task MoveToNode(string nodeName, CancellationToken cancellationToken);
///
/// Moves the robot to a target node with a specific orientation at the endpoint.
///
/// The name of the target node. Cannot be null or empty.
/// The required orientation angle in radians at the endpoint. Range: [-Pi ... Pi].
/// A cancellation token that can be used to cancel the operation.
///
/// A task that represents the asynchronous operation.
/// The task result contains a indicating success or failure of the movement command.
///
Task MoveToNode(string nodeName, double lastAngle, CancellationToken cancellationToken);
///
/// Moves the robot to a target station node and executes the specified action (pick, drop, or none).
///
/// The name of the target station node. Cannot be null or empty.
/// The action to perform at the station: , , or .
/// A cancellation token that can be used to cancel the operation.
///
/// A task that represents the asynchronous operation.
/// The task result contains a indicating success or failure of the movement and action execution.
///
Task MoveToStation(string nodeName, StationAction action, CancellationToken cancellationToken);
///
/// Aborts or cancels the ongoing robot movement action, if one exists.
///
///
/// A task that represents the asynchronous operation.
///
Task AbortMovement();
///
/// Immediately executes an instant action on the robot, bypassing any waiting period.
/// Instant actions are executed immediately without requiring the robot to be at a specific location.
///
/// The VDA5050 instant action to execute. Cannot be null.
/// A cancellation token that can be used to cancel the operation.
///
/// A task that represents the asynchronous operation.
/// The task result contains a indicating success or failure of the action execution.
///
Task Execute(RobotNet.VDA5050.InstantAction.Action action, CancellationToken cancellationToken);
}