36 lines
1.1 KiB
C#
36 lines
1.1 KiB
C#
using RobotNet.VDA5050.InstantAction;
|
|
using RobotNet.VDA5050.Order;
|
|
|
|
namespace RobotNet10.FleetManager.Services.RobotConnections;
|
|
|
|
/// <summary>
|
|
/// Service interface for managing MQTT connections to robots via VDA5050 protocol
|
|
/// </summary>
|
|
public interface IRobotConnectionsService
|
|
{
|
|
/// <summary>
|
|
/// Start MQTT connection and subscribe to topics
|
|
/// </summary>
|
|
Task StartAsync(CancellationToken? cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Stop MQTT connection
|
|
/// </summary>
|
|
Task StopAsync();
|
|
|
|
/// <summary>
|
|
/// Check if MQTT client is connected
|
|
/// </summary>
|
|
bool IsConnected { get; }
|
|
|
|
/// <summary>
|
|
/// Publish order message to a robot
|
|
/// </summary>
|
|
Task<bool> PublishOrderAsync(string robotId, OrderMsg order, CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// Publish instant actions message to a robot
|
|
/// </summary>
|
|
Task<bool> PublishInstantActionsAsync(string robotId, InstantActionsMsg instantActions, CancellationToken cancellationToken = default);
|
|
}
|