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

118 lines
3.4 KiB
C#

namespace Sick.SafetyScanners.DataStructures;
/// <summary>
/// Contains the content of the data header of a UDP data packet
/// </summary>
public sealed class DataHeader
{
/// <summary>
/// Gets or sets the version indicator (capital letter 'V' or 'R' for releases)
/// </summary>
public byte VersionIndicator { get; init; }
/// <summary>
/// Gets or sets the major version number
/// </summary>
public byte VersionMajor { get; init; }
/// <summary>
/// Gets or sets the minor version number
/// </summary>
public byte VersionMinor { get; init; }
/// <summary>
/// Gets or sets the release of the version
/// </summary>
public byte VersionRelease { get; init; }
/// <summary>
/// Gets or sets the serial number of the device
/// </summary>
public uint SerialNumberOfDevice { get; init; }
/// <summary>
/// Gets or sets the serial number of the system plug
/// </summary>
public uint SerialNumberOfSystemPlug { get; init; }
/// <summary>
/// Gets or sets the channel number (0-3)
/// </summary>
public byte ChannelNumber { get; init; }
/// <summary>
/// Gets or sets the sequence number (increases with each measurement)
/// </summary>
public uint SequenceNumber { get; init; }
/// <summary>
/// Gets or sets the scan number
/// </summary>
public uint ScanNumber { get; init; }
/// <summary>
/// Gets or sets the timestamp date
/// </summary>
public ushort TimestampDate { get; init; }
/// <summary>
/// Gets or sets the timestamp time
/// </summary>
public uint TimestampTime { get; init; }
/// <summary>
/// Gets or sets the general system state block offset
/// </summary>
public ushort GeneralSystemStateBlockOffset { get; init; }
/// <summary>
/// Gets or sets the general system state block size
/// </summary>
public ushort GeneralSystemStateBlockSize { get; init; }
/// <summary>
/// Gets or sets the derived values block offset
/// </summary>
public ushort DerivedValuesBlockOffset { get; init; }
/// <summary>
/// Gets or sets the derived values block size
/// </summary>
public ushort DerivedValuesBlockSize { get; init; }
/// <summary>
/// Gets or sets the measurement data block offset
/// </summary>
public ushort MeasurementDataBlockOffset { get; init; }
/// <summary>
/// Gets or sets the measurement data block size
/// </summary>
public ushort MeasurementDataBlockSize { get; init; }
/// <summary>
/// Gets or sets the intrusion data block offset
/// </summary>
public ushort IntrusionDataBlockOffset { get; init; }
/// <summary>
/// Gets or sets the intrusion data block size
/// </summary>
public ushort IntrusionDataBlockSize { get; init; }
/// <summary>
/// Gets or sets the application data block offset
/// </summary>
public ushort ApplicationDataBlockOffset { get; init; }
/// <summary>
/// Gets or sets the application data block size
/// </summary>
public ushort ApplicationDataBlockSize { get; init; }
/// <summary>
/// Gets whether the data header is empty
/// </summary>
public bool IsEmpty { get; init; }
}