Files
I150/srcs/RobotNet10/RobotApp/Communication/Sick.SafetyScanners/DataStructures/MeasurementData.cs
2026-07-03 16:37:12 +07:00

30 lines
858 B
C#

namespace Sick.SafetyScanners.DataStructures;
/// <summary>
/// Contains all scan points of a single measurement
/// </summary>
public sealed class MeasurementData
{
/// <summary>
/// Gets the number of beams in this measurement
/// </summary>
public uint NumberOfBeams { get; init; }
/// <summary>
/// Gets all scan points
/// </summary>
public IReadOnlyList<ScanPoint> ScanPoints { get; init; }
/// <summary>
/// Gets whether measurement data is empty (not enabled)
/// </summary>
public bool IsEmpty { get; init; }
public MeasurementData(uint numberOfBeams, IReadOnlyList<ScanPoint> scanPoints, bool isEmpty = false)
{
NumberOfBeams = numberOfBeams;
ScanPoints = scanPoints ?? Array.Empty<ScanPoint>();
IsEmpty = isEmpty;
}
}