43 lines
997 B
C#
43 lines
997 B
C#
using RobotApp.Interfaces;
|
|
using RobotApp.VDA5050.State;
|
|
|
|
namespace RobotApp.Services.Robot;
|
|
|
|
public class RobotLoads(IPeripheral PeriperalManager) : ILoad
|
|
{
|
|
//public Load[] Load => PeriperalManager.HasLoad ? [GetLoad()] : [];
|
|
public Load[] Load { get; private set; } = [];
|
|
private static Load GetLoad()
|
|
{
|
|
return new()
|
|
{
|
|
LoadId = Guid.NewGuid().ToString(),
|
|
LoadDimensions = new VDA5050.Factsheet.LoadDimensions
|
|
{
|
|
Length = 0.5,
|
|
Width = 0.5,
|
|
Height = 0.5
|
|
},
|
|
LoadPosition = "on_top",
|
|
LoadType = "box",
|
|
BoundingBoxReference = new VDA5050.Factsheet.BoundingBoxReference
|
|
{
|
|
X = 0,
|
|
Y = 0,
|
|
Z = 0,
|
|
},
|
|
Weight = 999
|
|
};
|
|
}
|
|
|
|
public void AddLoad()
|
|
{
|
|
Load = [new()];
|
|
}
|
|
|
|
public void ClearLoad()
|
|
{
|
|
Load = [];
|
|
}
|
|
}
|