Registers¶
-
class
ingenialink.registers.
REG_ACCESS
(value)[source]¶ Access Type.
-
RO
= 1¶ Read-only.
-
RW
= 0¶ Read/Write.
-
WO
= 2¶ Write-only.
-
-
class
ingenialink.registers.
REG_DTYPE
(value)[source]¶ Data Type.
-
DOMAIN
= 15¶ Domain.
-
FLOAT
= 8¶ Float.
-
S16
= 3¶ Signed 16-bit integer.
-
S32
= 5¶ Signed 32-bit integer.
-
S64
= 7¶ Signed 64-bit integer.
-
S8
= 1¶ Signed 8-bit integer.
-
STR
= 9¶ String.
-
U16
= 2¶ Unsigned 16-bit integer.
-
U32
= 4¶ Unsigned 32-bit integer.
-
U64
= 6¶ Unsigned 64-bit integer.
-
U8
= 0¶ Unsigned 8-bit integer.
-
-
class
ingenialink.registers.
REG_PHY
(value)[source]¶ Physical Units.
-
ACC
= 4¶ Acceleration.
-
NONE
= 0¶ None.
-
POS
= 2¶ Position.
-
RAD
= 6¶ Radians.
-
TORQUE
= 1¶ Torque.
-
VEL
= 3¶ Velocity.
-
VOLT_REL
= 5¶ Relative voltage (DC).
-
-
class
ingenialink.registers.
Register
(identifier, units, cyclic, address, dtype, access, phy=<REG_PHY.NONE: 0>, subnode=1, storage=None, range=None, labels={}, enums=[], enums_count=0, cat_id=None, scat_id=None, internal_use=0)[source]¶ Register.
- Parameters
identifier (str) – Identifier.
units (str) – Units.
address (int) – Address.
dtype (REG_DTYPE) – Data type.
access (REG_ACCESS) – Access type.
phy (REG_PHY, optional) – Physical units.
subnode (int) – Subnode
storage (any, optional) – Storage.
range (tuple, optional) – Range (min, max).
labels (dict, optional) – Register labels.
enums (dict, optional) – Enumeration values.
cat_id (str, optional) – Category ID.
scat_id (str, optional) – Sub-category ID.
internal_use (int, optional) – Internal use.
- Raises
TypeError – If any of the parameters has invalid type.
-
property
access
¶ Obtain register access.
- Returns
Register access type.
- Return type
int
-
property
address
¶ Obtain register address.
- Returns
Register address.
- Return type
int
-
property
cat_id
¶ Category identifier.
- Returns
Current category identifier.
- Return type
str | None
-
property
cyclic
¶ Obtain register cyclic.
- Returns
Register cyclic type.
- Return type
str
-
property
dtype
¶ Obtain register dtype.
- Returns
Register data type.
- Return type
int
-
property
enums
¶ Obtain enumerations list of the register.
- Returns
Enumerations of the register.
- Return type
array
-
property
enums_count
¶ Obtain number of enumerations of the register.
- Returns
Register Enumerations count.
- Return type
int
-
property
identifier
¶ Obtain register identifier.
- Returns
Register identifier
- Return type
str
-
property
internal_use
¶ Internal use check.
- Returns
Register internal_use.
- Return type
int
-
property
labels
¶ Obtains register labels.
- Returns
Labels dictionary.
- Return type
LabelsDictionary
-
property
phy
¶ Obtain register physical units.
- Returns
Register physical units.
- Return type
int
-
property
range
¶ Obtains register range.
- Returns
Register range (min, max), None if undefined.
- Return type
tuple
-
property
scat_id
¶ Subcategory identifier.
- Returns
Current subcategory identifier.
- Return type
str | None
-
property
storage
¶ Obtain register storage.
- Returns
Register storage.
- Return type
int
-
property
subnode
¶ Obtain register subnode.
- Returns
Register subnode.
- Return type
int
-
property
units
¶ Obtain register units.
- Returns
Register units
- Return type
str