Class
Sealed
public sealed class TableFieldDefinition
Namespace: SharpMeter.Core.Tables
Defines a single field within a PSEM table, including its offset, size, type, and optional sub-fields.
Properties
| Name | Description |
|---|---|
BitFields |
Gets sub-fields for BitField types (bit position ranges within this field). |
Description |
Gets the human-readable description. |
EnumValues |
Gets enum value mappings for Enum type fields. |
IsReadOnly |
Gets whether this field is read-only. |
Name |
Gets the field name. |
Offset |
Gets the byte offset within the table. |
Size |
Gets the field size in bytes. |
Type |
Gets the data type for interpretation. |
BitFields
ImmutableArray<BitFieldDefinition> TableFieldDefinition.BitFields { get; init; }
Gets sub-fields for BitField types (bit position ranges within this field).
Description
string TableFieldDefinition.Description { get; init; }
Gets the human-readable description.
EnumValues
ImmutableDictionary<int, string> TableFieldDefinition.EnumValues { get; init; }
Gets enum value mappings for Enum type fields.
IsReadOnly
bool TableFieldDefinition.IsReadOnly { get; init; }
Gets whether this field is read-only.
Name
string TableFieldDefinition.Name { get; init; }
Gets the field name.
Offset
int TableFieldDefinition.Offset { get; init; }
Gets the byte offset within the table.
Size
int TableFieldDefinition.Size { get; init; }
Gets the field size in bytes.
Type
FieldType TableFieldDefinition.Type { get; init; }
Gets the data type for interpretation.
View Source
/// <summary>
/// Defines a single field within a PSEM table, including its offset, size, type, and optional sub-fields.
/// </summary>
public sealed class TableFieldDefinition
{
#region Properties
/// <summary>Gets the field name.</summary>
public required string Name { get; init; }
/// <summary>Gets the byte offset within the table.</summary>
public required int Offset { get; init; }
/// <summary>Gets the field size in bytes.</summary>
public required int Size { get; init; }
/// <summary>Gets the data type for interpretation.</summary>
public required FieldType Type { get; init; }
/// <summary>Gets the human-readable description.</summary>
public string Description { get; init; } = string.Empty;
/// <summary>Gets whether this field is read-only.</summary>
public bool IsReadOnly { get; init; }
/// <summary>Gets sub-fields for BitField types (bit position ranges within this field).</summary>
public ImmutableArray<BitFieldDefinition> BitFields { get; init; } = [];
/// <summary>Gets enum value mappings for Enum type fields.</summary>
public ImmutableDictionary<int, string> EnumValues { get; init; } = ImmutableDictionary<int, string>.Empty;
#endregion
}