Files
Denso/srcs/RobotNet10/RobotApp/Communication/Sick.SafetyScanners/DataStructures/ScanPoint.cs
2026-07-03 16:31:37 +07:00

67 lines
2.0 KiB
C#

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;
}
}