initial commit
This commit is contained in:
24
Lab505.Script/DobotFacade.cs
Normal file
24
Lab505.Script/DobotFacade.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Lab505.Script.Facades;
|
||||
|
||||
namespace Lab505.Script;
|
||||
|
||||
/// <summary>Script facade for Dobot — Pickup delegates to IMR VDA.</summary>
|
||||
public class DobotFacade : IDobotFacade
|
||||
{
|
||||
private readonly IDobotRaw _dobot;
|
||||
private readonly IImrRaw _imr;
|
||||
|
||||
public DobotFacade(IDobotRaw dobot, IImrRaw imr)
|
||||
{
|
||||
_dobot = dobot;
|
||||
_imr = imr;
|
||||
}
|
||||
|
||||
public Task PowerOn(CancellationToken t = default) => _dobot.PowerOn(t);
|
||||
public Task GoHome(CancellationToken t = default) => _dobot.GoHome(t);
|
||||
public Task Continue(CancellationToken t = default) => _dobot.Continue(t);
|
||||
public Task Cancel(CancellationToken t = default) => _dobot.Cancel(t);
|
||||
|
||||
public Task Pickup(int ok, int ng, CancellationToken t = default)
|
||||
=> _imr.PickUp_Vda(ok, ng, t);
|
||||
}
|
||||
Reference in New Issue
Block a user