Class RegisterManager
Class responsible for working with a list of registers. Implements the INCT_RegisterList interface.
Implements
Inherited Members
Namespace: DotNet.Interpreter.Helper
Assembly: DotNet.Interpreter.Helper.dll
Syntax
public sealed class RegisterManager : INCT_RegisterList
Remarks
Constructor that initializes the register list with an axis movement command.
Constructors
RegisterManager(RegisterCommandHandler)
Class responsible for working with a list of registers. Implements the INCT_RegisterList interface.
Declaration
public RegisterManager(RegisterCommandHandler axisMoveCommandHandler)
Parameters
| Type | Name | Description |
|---|---|---|
| RegisterCommandHandler | axisMoveCommandHandler | Handler for the axis movement command. |
Remarks
Constructor that initializes the register list with an axis movement command.
Fields
OnLinkAdded
Event for adding a connection between a register index in the system and a register in the local list.
Declaration
public RegisterManager.RegisterLinkAddedHandler OnLinkAdded
Field Value
| Type | Description |
|---|---|
| RegisterManager.RegisterLinkAddedHandler |
Properties
Count
Number of registers in the list.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| int |
this[int]
Indexer for accessing registers.
Declaration
public INCT_Register this[int index] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | Register index. |
Property Value
| Type | Description |
|---|---|
| INCT_Register | Register object. |
Methods
AddArgument(string, string, string, RegisterCommandHandler?, double[], string, TNCSign, TNCPoint, int, int, bool, bool, TNCValueAvailType, bool)
Adds an argument register to the list.
Declaration
public void AddArgument(string address, string name, string comment, RegisterCommandHandler? command = null, double[] values = null, string id = "", TNCSign sign = TNCSign.sgnMinus, TNCPoint point = TNCPoint.pntAlwaysPoint, int beforePoint = 5, int afterPoint = 3, bool isLeadingZeros = false, bool isTrailingZeroes = false, TNCValueAvailType valueAvailability = TNCValueAvailType.vatValue, bool isModal = false)
Parameters
| Type | Name | Description |
|---|---|---|
| string | address | Register address. |
| string | name | Unique register name. |
| string | comment | Register comment. |
| RegisterCommandHandler | command | Executable command handler. |
| double[] | values | List of register values. |
| string | id | Register identifier in the machine kinematic schema. |
| 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 | isLeadingZeros | Flag indicating the presence of leading zeros. |
| bool | isTrailingZeroes | 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). |
| bool | isModal | Flag indicating register modality. |
AddAuxFunction(string, string, string, double[], RegisterCommandHandler?, string, TNCSign, TNCPoint, int, int, bool, bool, TNCValueAvailType, bool)
Adds an auxiliary function register to the list.
Declaration
public void AddAuxFunction(string address, string name, string comment, double[] values, RegisterCommandHandler? command, string id = "", TNCSign sign = TNCSign.sgnNoSign, TNCPoint point = TNCPoint.pntNoPoint, int beforePoint = 2, int afterPoint = 0, bool isLeadingZeros = true, bool isTrailingZeroes = false, TNCValueAvailType valueAvailability = TNCValueAvailType.vatValue, bool isModal = true)
Parameters
| Type | Name | Description |
|---|---|---|
| string | address | Register address. |
| string | name | Unique register name. |
| string | comment | Register comment. |
| double[] | values | List of register values. |
| RegisterCommandHandler | command | Executable command handler. |
| string | id | Register identifier in the machine kinematic schema. |
| 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 | isLeadingZeros | Flag indicating the presence of leading zeros. |
| bool | isTrailingZeroes | 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). |
| bool | isModal | Flag indicating register modality. |
AddLinearMotionRegister(INCT_BaseReg)
Adds a register linked to an axis for movements, if it is not already registered.
Declaration
public void AddLinearMotionRegister(INCT_BaseReg baseRegister)
Parameters
| Type | Name | Description |
|---|---|---|
| INCT_BaseReg | baseRegister | System base register. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If |
AddPrepFunction(string, string, string, double[], RegisterCommandHandler?, string, TNCSign, TNCPoint, int, int, bool, bool, TNCValueAvailType, bool)
Adds a preparatory function register to the list.
Declaration
public void AddPrepFunction(string address, string name, string comment, double[] values, RegisterCommandHandler? command, string id = "", TNCSign sign = TNCSign.sgnNoSign, TNCPoint point = TNCPoint.pntPoint, int beforePoint = 2, int afterPoint = 1, bool isLeadingZeros = false, bool isTrailingZeroes = false, TNCValueAvailType valueAvailability = TNCValueAvailType.vatValue, bool isModal = true)
Parameters
| Type | Name | Description |
|---|---|---|
| string | address | Register address. |
| string | name | Unique register name. |
| string | comment | Register comment. |
| double[] | values | List of register values. |
| RegisterCommandHandler | command | Executable command handler. |
| string | id | Register identifier in the machine kinematic schema. |
| 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 | isLeadingZeros | Flag indicating the presence of leading zeros. |
| bool | isTrailingZeroes | 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). |
| bool | isModal | Flag indicating register modality. |
AddRegister(string, string, string, string, TNCSign, TNCPoint, int, int, bool, bool, TNCValueAvailType, double[], bool, RegisterCommandHandler)
Adds a new register to the list.
Declaration
public void AddRegister(string address, string id, string name, string comment, TNCSign sign, TNCPoint point, int beforePoint, int afterPoint, bool isLeadingZeros, bool isTrailingZeroes, TNCValueAvailType valueAvailability, double[] values, bool isModal, RegisterCommandHandler command)
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 | isLeadingZeros | Flag indicating the presence of leading zeros. |
| bool | isTrailingZeroes | 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 | command | Executable command. |
ExecuteRegisterCommand(INCT_BaseReg)
Executes the command linked to the base register.
Declaration
public void ExecuteRegisterCommand(INCT_BaseReg baseRegister)
Parameters
| Type | Name | Description |
|---|---|---|
| INCT_BaseReg | baseRegister | Base register for which the command is executed. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If |
~RegisterManager()
Destructor for the RegisterManager class.
Declaration
protected ~RegisterManager()
Initialize(INCT_SysState)
Initializes the list of registers, linking them to base system registers.
Declaration
public void Initialize(INCT_SysState systemState)
Parameters
| Type | Name | Description |
|---|---|---|
| INCT_SysState | systemState | System state interface. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If |
ItemByName(string)
Returns a register by name.
Declaration
public Register ItemByName(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Register name. |
Returns
| Type | Description |
|---|---|
| Register | Found register or |
ItemBySystemStateIndex(int)
Returns a register by its system index.
Declaration
public Register ItemBySystemStateIndex(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | Register index in the system. |
Returns
| Type | Description |
|---|---|
| Register | Found register or |
UpdateEmptyValue(INCT_BaseReg, string)
Updates the value of a base register if it is empty and if the register type allows it.
Declaration
public void UpdateEmptyValue(INCT_BaseReg baseRegister, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| INCT_BaseReg | baseRegister | Base register. |
| string | value | New value to be set. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If |