using RobotNet.VDA5050.Type; using RobotNet10.RobotApp.Interfaces; namespace RobotNet10.RobotApp.Services.Robot.Actions; [RobotAction(ActionType.STATE_REQUEST, [ActionScope.INSTANT, ActionScope.NODE, ActionScope.EDGE], [BlockingType.NONE, BlockingType.SOFT, BlockingType.HARD], "Yêu cầu gửi trạng thái robot ngay lập tức.", "Robot đã gửi trạng thái ngay lập tức.")] public class RobotStateRequestAction(IServiceProvider ServiceProvider) : RobotAction(ServiceProvider) { protected override async Task StartAction() { var RobotStates = ServiceProvider.GetRequiredService(); await RobotStates.PubState(); SetStatus(ActionEvent.FINISHED); ResultDescription = string.IsNullOrEmpty(ActionAttribute.ResultDescription) ? ResultDescription : ActionAttribute.ResultDescription; } protected override Task ExecuteAction() { return base.ExecuteAction(); } }