Class Sealed
public sealed class PsemTableAttribute : Attribute

Namespace: SharpMeter.Core.Tables.Attributes

Marks a class or record as a PSEM table definition for attribute-based deserialization.

Inheritance

Inherits from: Attribute

Constructors

NameDescription
PsemTableAttribute(ushort tableId, string name) Marks a class or record as a PSEM table definition for attribute-based deserialization.

PsemTableAttribute(ushort tableId, string name)

PsemTableAttribute.PsemTableAttribute(ushort tableId, string name)

Marks a class or record as a PSEM table definition for attribute-based deserialization.

Parameters

NameTypeDescription
tableIdushortThe table ID (0-4095).
namestringThe table name.

Properties

NameDescription
Description Gets or sets the table description.
ExpectedSize Gets or sets the expected table size in bytes. 0 means variable-length.
Name Gets the table name.
TableId Gets the table ID.

Description

string PsemTableAttribute.Description { get; set; }

Gets or sets the table description.

ExpectedSize

int PsemTableAttribute.ExpectedSize { get; set; }

Gets or sets the expected table size in bytes. 0 means variable-length.

Name

string PsemTableAttribute.Name { get; }

Gets the table name.

TableId

ushort PsemTableAttribute.TableId { get; }

Gets the table ID.

Type Relationships
classDiagram
                    style PsemTableAttribute fill:#f9f,stroke:#333,stroke-width:2px
                    PsemTableAttribute --|> Attribute : inherits
                
View Source
/// <summary>
///     Marks a class or record as a PSEM table definition for attribute-based deserialization.
/// </summary>
/// <param name = "tableId">The table ID (0-4095).</param>
/// <param name = "name">The table name.</param>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false)]
public sealed class PsemTableAttribute(ushort tableId, string name) : Attribute
{
#region Properties
    /// <summary>Gets the table ID.</summary>
    public ushort TableId { get; } = tableId;
    /// <summary>Gets the table name.</summary>
    public string Name { get; } = name;
    /// <summary>Gets or sets the table description.</summary>
    public string Description { get; set; } = string.Empty;
    /// <summary>Gets or sets the expected table size in bytes. 0 means variable-length.</summary>
    public int ExpectedSize { get; set; }
#endregion
}
Was this page helpful?