Skip to content
Start free evaluation

PDComm.GemConstantDefinition

Class

Represents one equipment constant to register with GemEquipment.ConfigureConstants.

public sealed record GemConstantDefinition

A list constant cannot have a default, minimum or maximum. The current and default values must lie within the bounds and the count range. The items are only read during configuration; the caller keeps ownership.

Parameters

NameDescription
IdThe equipment constant ID (ECID): an ASCII item (case-sensitive, may be empty) or a scalar integer item (I1 to I8 or U1 to U8 with one value). Positive signed and unsigned IDs with the same value are the same ID.
NameThe constant name (ECNAME); ASCII only, may be empty.
UnitsThe units (UNITS); ASCII only, may be empty.
CurrentThe initial value (ECV). Its format is the declared format of the constant; later changes must use the same format. JIS-8 items and NaN floating-point values are rejected, also inside lists.
DefaultValueThe default value (ECDEF), or null when the constant has none. Must have the format of Current.
MinimumThe lower bound (ECMIN), or null for none. Must have the format of Current.
MaximumThe upper bound (ECMAX), or null for none. Must have the format of Current.
MinCountThe smallest element count that a value of the constant may have.
MaxCountThe largest element count that a value of the constant may have; must not be less than MinCount.

Members

GemConstantDefinition

Constructor

Represents one equipment constant to register with GemEquipment.ConfigureConstants.

public GemConstantDefinition(SecsItem Id, string Name, string Units, SecsItem Current, SecsItem? DefaultValue, SecsItem? Minimum, SecsItem? Maximum, nuint MinCount, nuint MaxCount)

A list constant cannot have a default, minimum or maximum. The current and default values must lie within the bounds and the count range. The items are only read during configuration; the caller keeps ownership.

Parameters

NameDescription
IdThe equipment constant ID (ECID): an ASCII item (case-sensitive, may be empty) or a scalar integer item (I1 to I8 or U1 to U8 with one value). Positive signed and unsigned IDs with the same value are the same ID.
NameThe constant name (ECNAME); ASCII only, may be empty.
UnitsThe units (UNITS); ASCII only, may be empty.
CurrentThe initial value (ECV). Its format is the declared format of the constant; later changes must use the same format. JIS-8 items and NaN floating-point values are rejected, also inside lists.
DefaultValueThe default value (ECDEF), or null when the constant has none. Must have the format of Current.
MinimumThe lower bound (ECMIN), or null for none. Must have the format of Current.
MaximumThe upper bound (ECMAX), or null for none. Must have the format of Current.
MinCountThe smallest element count that a value of the constant may have.
MaxCountThe largest element count that a value of the constant may have; must not be less than MinCount.

Current

Property

The initial value (ECV). Its format is the declared format of the constant; later changes must use the same format. JIS-8 items and NaN floating-point values are rejected, also inside lists.

public SecsItem Current { get; init; }

DefaultValue

Property

The default value (ECDEF), or null when the constant has none. Must have the format of Current.

public SecsItem? DefaultValue { get; init; }

Id

Property

The equipment constant ID (ECID): an ASCII item (case-sensitive, may be empty) or a scalar integer item (I1 to I8 or U1 to U8 with one value). Positive signed and unsigned IDs with the same value are the same ID.

public SecsItem Id { get; init; }

MaxCount

Property

The largest element count that a value of the constant may have; must not be less than MinCount.

public nuint MaxCount { get; init; }

Maximum

Property

The upper bound (ECMAX), or null for none. Must have the format of Current.

public SecsItem? Maximum { get; init; }

MinCount

Property

The smallest element count that a value of the constant may have.

public nuint MinCount { get; init; }

Minimum

Property

The lower bound (ECMIN), or null for none. Must have the format of Current.

public SecsItem? Minimum { get; init; }

Name

Property

The constant name (ECNAME); ASCII only, may be empty.

public string Name { get; init; }

Units

Property

The units (UNITS); ASCII only, may be empty.

public string Units { get; init; }