Class Sealed
public sealed class ParsedTableField

Namespace: SharpMeter.Core.Tables

A deserialized table field with its raw bytes and human-readable value.

Properties

NameDescription
BitFields Gets parsed bit sub-fields (for BitField type only).
Definition Gets the field definition.
DisplayValue Gets the interpreted value as a string.
HexValue Gets the raw hex representation.
NumericValue Gets the numeric value (if applicable, otherwise -1).
RawBytes Gets the raw bytes for this field.

BitFields

ImmutableArray<ParsedBitField> ParsedTableField.BitFields { get; init; }

Gets parsed bit sub-fields (for BitField type only).

Definition

TableFieldDefinition ParsedTableField.Definition { get; init; }

Gets the field definition.

DisplayValue

string ParsedTableField.DisplayValue { get; init; }

Gets the interpreted value as a string.

HexValue

string ParsedTableField.HexValue { get; }

Gets the raw hex representation.

NumericValue

long ParsedTableField.NumericValue { get; init; }

Gets the numeric value (if applicable, otherwise -1).

RawBytes

ReadOnlyMemory<byte> ParsedTableField.RawBytes { get; init; }

Gets the raw bytes for this field.

View Source
/// <summary>
///     A deserialized table field with its raw bytes and human-readable value.
/// </summary>
public sealed class ParsedTableField
{
#region Properties
    /// <summary>Gets the field definition.</summary>
    public required TableFieldDefinition Definition { get; init; }
    /// <summary>Gets the raw bytes for this field.</summary>
    public required ReadOnlyMemory<byte> RawBytes { get; init; }
    /// <summary>Gets the interpreted value as a string.</summary>
    public required string DisplayValue { get; init; }
    /// <summary>Gets the raw hex representation.</summary>
    public string HexValue => Convert.ToHexString(RawBytes.Span);
    /// <summary>Gets the numeric value (if applicable, otherwise -1).</summary>
    public long NumericValue { get; init; } = -1;
    /// <summary>Gets parsed bit sub-fields (for BitField type only).</summary>
    public ImmutableArray<ParsedBitField> BitFields { get; init; } = [];
#endregion
}
Was this page helpful?