Class Register
Class representing a register. Implements INCT_Register and INCT_RegisterValues interfaces.
Inherited Members
Namespace: DotNet.Interpreter.Helper
Assembly: DotNet.Interpreter.Helper.dll
Syntax
public sealed class Register : INCT_Register, INCT_RegisterValues
Remarks
Register constructor.
Constructors
Register(string, string, string, string, TNCSign, TNCPoint, int, int, bool, bool, TNCValueAvailType, double[], bool, RegisterCommandHandler)
Class representing a register. Implements INCT_Register and INCT_RegisterValues interfaces.
Declaration
public Register(string address, string id, string name, string comment, TNCSign sign, TNCPoint point, int beforePoint, int afterPoint, bool leadingZeros, bool trailingZeroes, TNCValueAvailType valueAvailability, double[] values, bool isModal, RegisterCommandHandler commandHandler)
Parameters
| Type | Name | Description |
|---|---|---|
| string | address | Register address. |
| string | id | Register identifier in the machine kinematic schema. |
| string | name | Unique register name. |
| string | comment | Register comment. |
| TNCSign | sign | Register sign type (unsigned / negative only / positive and negative). |
| TNCPoint | point | Register decimal point type (no point / point may or may not be present / point always present). |
| int | beforePoint | Number of digits before the decimal point. |
| int | afterPoint | Number of digits after the decimal point. |
| bool | leadingZeros | Flag indicating the presence of leading zeros. |
| bool | trailingZeroes | Flag indicating the presence of trailing (non-significant) zeros. |
| TNCValueAvailType | valueAvailability | Register type (register consists of address and value / register consists of address only / register may consist of either address only or address and value). |
| double[] | values | List of register values. |
| bool | isModal | Flag indicating register modality. |
| RegisterCommandHandler | commandHandler | Executable command. |
Remarks
Register constructor.
Properties
Addr
Property for accessing the register address.
Declaration
public string Addr { get; }
Property Value
| Type | Description |
|---|---|
| string |
AfterPoint
Property for accessing the number of digits after the decimal point.
Declaration
public int AfterPoint { get; }
Property Value
| Type | Description |
|---|---|
| int |
BeforePoint
Property for accessing the number of digits before the decimal point.
Declaration
public int BeforePoint { get; }
Property Value
| Type | Description |
|---|---|
| int |
CommandHandler
Property for accessing the executable command.
Declaration
public RegisterCommandHandler CommandHandler { get; }
Property Value
| Type | Description |
|---|---|
| RegisterCommandHandler |
Comment
Property for accessing the register comment.
Declaration
public string Comment { get; }
Property Value
| Type | Description |
|---|---|
| string |
Count
Gets the number of values in the register.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| int |
Id
Property for accessing the register identifier in the machine kinematic schema.
Declaration
public string Id { get; }
Property Value
| Type | Description |
|---|---|
| string |
Index
Register index in the system.
Declaration
public int Index { get; }
Property Value
| Type | Description |
|---|---|
| int |
this[int]
Gets the register value at the specified index.
Declaration
public double this[int index] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The zero-based index of the register value. |
Property Value
| Type | Description |
|---|---|
| double | The register value at the specified index. |
Exceptions
| Type | Condition |
|---|---|
| IndexOutOfRangeException | Thrown when index is out of range or values array is null. |
LeadingZeros
Property for accessing the flag for leading zeros.
Declaration
public bool LeadingZeros { get; }
Property Value
| Type | Description |
|---|---|
| bool |
LinkedBaseRegister
Base register linked to this register.
Declaration
public INCT_BaseReg LinkedBaseRegister { get; set; }
Property Value
| Type | Description |
|---|---|
| INCT_BaseReg |
Modal
Property for accessing the register modality.
Declaration
public bool Modal { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Name
Property for accessing the unique register name.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
Point
Property for accessing the register decimal point type.
Declaration
public TNCPoint Point { get; }
Property Value
| Type | Description |
|---|---|
| TNCPoint |
Sign
Property for accessing the register sign type.
Declaration
public TNCSign Sign { get; }
Property Value
| Type | Description |
|---|---|
| TNCSign |
TrailingZeroes
Property for accessing the flag for trailing (non-significant) zeros.
Declaration
public bool TrailingZeroes { get; }
Property Value
| Type | Description |
|---|---|
| bool |
ValueAvail
Property for accessing the register type.
Declaration
public TNCValueAvailType ValueAvail { get; }
Property Value
| Type | Description |
|---|---|
| TNCValueAvailType |
Values
Property for accessing the list of register values.
Declaration
public INCT_RegisterValues Values { get; }
Property Value
| Type | Description |
|---|---|
| INCT_RegisterValues |
Methods
~Register()
Destructor for the Register class.
Declaration
protected ~Register()