26 lines
1.0 KiB
C#
26 lines
1.0 KiB
C#
using RobotNet.VDA5050.Type;
|
|
using RobotNet10.RobotApp.Interfaces;
|
|
|
|
namespace RobotNet10.RobotApp.Services.Robot.Actions;
|
|
|
|
[RobotAction(ActionType.FACTSHEET_REQUEST,
|
|
[ActionScope.INSTANT, ActionScope.NODE, ActionScope.EDGE],
|
|
[BlockingType.NONE, BlockingType.SOFT, BlockingType.HARD],
|
|
"Yêu cầu gửi Factsheet robot ngay lập tức.",
|
|
"Robot đã gửi Factsheet ngay lập tức.")]
|
|
public class RobotFactsheetRequestAction(IServiceProvider ServiceProvider) : RobotAction(ServiceProvider)
|
|
{
|
|
protected override async Task StartAction()
|
|
{
|
|
var RobotFactsheet = ServiceProvider.GetRequiredService<IFactsheet>();
|
|
await RobotFactsheet.PubFactsheet();
|
|
SetStatus(ActionEvent.FINISHED);
|
|
ResultDescription = string.IsNullOrEmpty(ActionAttribute.ResultDescription) ? ResultDescription : ActionAttribute.ResultDescription;
|
|
}
|
|
|
|
protected override Task ExecuteAction()
|
|
{
|
|
return base.ExecuteAction();
|
|
}
|
|
}
|