Moved interfaces and abstracts to external package ln.motion.interfaces

master
Harald Wolff 2021-08-20 21:10:33 +02:00
parent 12333b804d
commit a5b2baf8c2
6 changed files with 5 additions and 70 deletions

View File

@ -1,25 +0,0 @@
namespace ln.motion
{
public abstract class Ax
{
public virtual float CurrentSpeed { get; }
public virtual float CurrentPosition { get; }
public virtual AxValues CurrentValues => new AxValues() {Speed = CurrentSpeed, Position = CurrentPosition};
public virtual float TargetSpeed { get; set; }
public virtual float TargetPosition { get; set; }
public virtual AxValues TargetValues
{
get => new AxValues() {Speed = TargetSpeed, Position = TargetPosition};
set
{
TargetPosition = value.Position;
TargetSpeed = value.Speed;
}
}
public virtual bool IsEnabled { get; }
public virtual bool IsFaulted { get; }
}
}

View File

@ -1,8 +0,0 @@
namespace ln.motion
{
public struct AxValues
{
public float Speed;
public float Position;
}
}

View File

@ -1,23 +0,0 @@
namespace ln.motion
{
public abstract class DriveController
{
public abstract void Initialize();
public abstract bool IsOnline { get; }
public abstract bool GetAxCurrentValues(out AxValues[] axValuesArray);
public abstract bool GetAxTargetValues(out AxValues[] axValuesArray);
public abstract bool SetAxTargetValues(AxValues[] axValuesArray);
public virtual bool SetAxTargetValues(int ax, AxValues axValues)
{
if (GetAxTargetValues(out AxValues[] axValuesArray))
{
axValuesArray[ax] = axValues;
return SetAxTargetValues(axValuesArray);
}
return false;
}
}
}

View File

@ -1,14 +0,0 @@
using System.Numerics;
namespace ln.motion
{
public abstract class Kinematic
{
public Kinematic()
{
}
public abstract bool Direct(AxValues[] axValuesArray, out Matrix4x4 position);
public abstract bool Inverse(Matrix4x4 position, AxValues[] axValues);
}
}

View File

@ -1,4 +1,5 @@
using System;
using ln.motion.interfaces;
namespace ln.motion
{

View File

@ -4,4 +4,8 @@
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ln.motion.interfaces" Version="0.1.0" />
</ItemGroup>
</Project>