30 lines
858 B
C#
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;
|
|
}
|
|
}
|