Initial commit

This commit is contained in:
2026-07-03 16:31:37 +07:00
commit 899c7c637d
1939 changed files with 641750 additions and 0 deletions

View File

@@ -0,0 +1,133 @@
namespace Sick.SafetyScanners.DataStructures;
/// <summary>
/// Contains the configuration data from a COLA2 variable command response
/// Used for current and persistent sensor configuration
/// </summary>
public sealed class ConfigData
{
/// <summary>
/// Gets or sets the version indicator (e.g., "V" for version)
/// </summary>
public string VersionCVersion { get; init; } = string.Empty;
/// <summary>
/// Gets or sets the major version number
/// </summary>
public byte VersionMajorVersionNumber { get; init; }
/// <summary>
/// Gets or sets the minor version number
/// </summary>
public byte VersionMinorVersionNumber { get; init; }
/// <summary>
/// Gets or sets the version release number
/// </summary>
public byte VersionReleaseNumber { get; init; }
/// <summary>
/// Gets or sets the host IP address
/// </summary>
public string HostIp { get; init; } = string.Empty;
/// <summary>
/// Gets or sets the host UDP port
/// </summary>
public ushort HostUdpPort { get; init; }
/// <summary>
/// Gets or sets the channel number (0-3)
/// </summary>
public byte Channel { get; init; }
/// <summary>
/// Gets or sets whether the channel is enabled
/// </summary>
public bool Enabled { get; init; }
/// <summary>
/// Gets or sets the interface type
/// </summary>
public InterfaceType EInterfaceType { get; init; }
/// <summary>
/// Gets or sets the publishing frequency (publish every n-th scan)
/// </summary>
public ushort PublishingFrequency { get; init; }
/// <summary>
/// Gets or sets the start angle in radians
/// </summary>
public double StartAngle { get; init; }
/// <summary>
/// Gets or sets the end angle in radians
/// </summary>
public double EndAngle { get; init; }
/// <summary>
/// Gets or sets the enabled features (bit flags)
/// Bit 0: GeneralSystemState, Bit 1: DerivedSettings, Bit 2: MeasurementData,
/// Bit 3: IntrusionData, Bit 4: ApplicationData
/// </summary>
public ushort Features { get; init; }
/// <summary>
/// Gets or sets whether general system state feature is enabled
/// </summary>
public bool GeneralSystemStateEnabled { get; init; }
/// <summary>
/// Gets or sets whether derived settings feature is enabled
/// </summary>
public bool DerivedSettingsEnabled { get; init; }
/// <summary>
/// Gets or sets whether measurement data feature is enabled
/// </summary>
public bool MeasurementDataEnabled { get; init; }
/// <summary>
/// Gets or sets whether intrusion data feature is enabled
/// </summary>
public bool IntrusionDataEnabled { get; init; }
/// <summary>
/// Gets or sets whether application data feature is enabled
/// </summary>
public bool ApplicationDataEnabled { get; init; }
// Derived values (similar to DerivedValues structure)
/// <summary>
/// Gets or sets the multiplication factor for beam distances
/// </summary>
public ushort DerivedMultiplicationFactor { get; init; }
/// <summary>
/// Gets or sets the number of beams
/// </summary>
public ushort DerivedNumberOfBeams { get; init; }
/// <summary>
/// Gets or sets the scan time in milliseconds
/// </summary>
public ushort DerivedScanTime { get; init; }
/// <summary>
/// Gets or sets the derived start angle in radians
/// </summary>
public double DerivedStartAngle { get; init; }
/// <summary>
/// Gets or sets the angular beam resolution in radians
/// </summary>
public double DerivedAngularBeamResolution { get; init; }
/// <summary>
/// Gets or sets the interbeam period in microseconds
/// </summary>
public uint DerivedInterbeamPeriod { get; init; }
}