Initial commit
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
namespace Sick.SafetyScanners.DataStructures;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a single scan point from the SICK Safety Scanner
|
||||
/// </summary>
|
||||
public sealed class ScanPoint
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the angle in sensor coordinates (radians)
|
||||
/// </summary>
|
||||
public double Angle { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the distance of the measured scanpoint (mm)
|
||||
/// </summary>
|
||||
public ushort Distance { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the reflectivity value (0-255)
|
||||
/// </summary>
|
||||
public byte Reflectivity { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether the scanpoint is valid
|
||||
/// </summary>
|
||||
public bool IsValid { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether the scanpoint is infinite (no object detected)
|
||||
/// </summary>
|
||||
public bool IsInfinite { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether there is glare in the scanpoint
|
||||
/// </summary>
|
||||
public bool HasGlare { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether the scanpoint detects a reflector
|
||||
/// </summary>
|
||||
public bool IsReflector { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether the scanpoint is contaminated
|
||||
/// </summary>
|
||||
public bool IsContaminated { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether there is a contamination warning
|
||||
/// </summary>
|
||||
public bool HasContaminationWarning { get; init; }
|
||||
|
||||
public ScanPoint(double angle, ushort distance, byte reflectivity, bool isValid,
|
||||
bool isInfinite, bool hasGlare, bool isReflector, bool isContaminated, bool hasContaminationWarning)
|
||||
{
|
||||
Angle = angle;
|
||||
Distance = distance;
|
||||
Reflectivity = reflectivity;
|
||||
IsValid = isValid;
|
||||
IsInfinite = isInfinite;
|
||||
HasGlare = hasGlare;
|
||||
IsReflector = isReflector;
|
||||
IsContaminated = isContaminated;
|
||||
HasContaminationWarning = hasContaminationWarning;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user