27 lines
1009 B
C#
27 lines
1009 B
C#
using RobotNet.VDA5050.Type;
|
|
using RobotNet10.RobotApp.Interfaces;
|
|
|
|
namespace RobotNet10.RobotApp.Services.Robot.Actions;
|
|
|
|
[RobotAction(ActionType.STOP_PAUSE,
|
|
[ActionScope.INSTANT],
|
|
[BlockingType.NONE, BlockingType.SOFT, BlockingType.HARD],
|
|
"Tiếp tục hoạt động robot sau khi tạm dừng.",
|
|
"Robot đã tiếp tục hoạt động.")]
|
|
public class RobotStopPauseAction(IServiceProvider ServiceProvider) : RobotAction(ServiceProvider)
|
|
{
|
|
protected override Task StartAction()
|
|
{
|
|
var RobotController = ServiceProvider.GetRequiredService<IRobotController>();
|
|
RobotController.Resume();
|
|
SetStatus(ActionEvent.FINISHED);
|
|
ResultDescription = string.IsNullOrEmpty(ActionAttribute.ResultDescription) ? ResultDescription : ActionAttribute.ResultDescription;
|
|
return base.StartAction();
|
|
}
|
|
|
|
protected override Task ExecuteAction()
|
|
{
|
|
return base.ExecuteAction();
|
|
}
|
|
}
|