Record
public record BitFieldDefinition : System.ValueType, System.IEquatable<SharpMeter.Core.Tables.BitFieldDefinition>
Namespace: SharpMeter.Core.Tables
Defines a sub-field within a bit field, specifying which bits to extract.
Inheritance
Inherits from: System.ValueType
Implements: System.IEquatable<SharpMeter.Core.Tables.BitFieldDefinition>
Constructors
| Name | Description |
|---|---|
BitFieldDefinition(…) |
Defines a sub-field within a bit field, specifying which bits to extract. |
BitFieldDefinition(string Name, int StartBit, int BitCount, ImmutableDictionary? EnumValues)
BitFieldDefinition.BitFieldDefinition(string Name, int StartBit, int BitCount, ImmutableDictionary<int, string>? EnumValues = null)
Defines a sub-field within a bit field, specifying which bits to extract.
Parameters
| Name | Type | Description |
|---|---|---|
Name | string | The bit sub-field name. |
StartBit | int | The starting bit position (0-based, LSB). |
BitCount | int | The number of bits in this sub-field. |
EnumValues | ImmutableDictionary<int, string>? | Optional enum mappings for the extracted value. |
Properties
| Name | Description |
|---|---|
BitCount |
The number of bits in this sub-field. |
EnumValues |
Optional enum mappings for the extracted value. |
Name |
The bit sub-field name. |
StartBit |
The starting bit position (0-based, LSB). |
BitCount
int BitFieldDefinition.BitCount { get; init; }
The number of bits in this sub-field.
EnumValues
ImmutableDictionary<int, string>? BitFieldDefinition.EnumValues { get; init; }
Optional enum mappings for the extracted value.
Name
string BitFieldDefinition.Name { get; init; }
The bit sub-field name.
StartBit
int BitFieldDefinition.StartBit { get; init; }
The starting bit position (0-based, LSB).
Type Relationships
classDiagram
style BitFieldDefinition fill:#f9f,stroke:#333,stroke-width:2px
BitFieldDefinition --|> ValueType : inherits
BitFieldDefinition ..|> BitFieldDefinition~ : implements
View Source
/// <summary>
/// Defines a sub-field within a bit field, specifying which bits to extract.
/// </summary>
/// <param name = "Name">The bit sub-field name.</param>
/// <param name = "StartBit">The starting bit position (0-based, LSB).</param>
/// <param name = "BitCount">The number of bits in this sub-field.</param>
/// <param name = "EnumValues">Optional enum mappings for the extracted value.</param>
public readonly record struct BitFieldDefinition(string Name, int StartBit, int BitCount, ImmutableDictionary<int, string>? EnumValues = null);