Registers
- class ingenialink.register.MonDistV3(address: int, subnode: int, cyclic: RegCyclicType)[source]
Monitoring data.
- class ingenialink.register.Register(dtype: RegDtype, access: RegAccess, identifier: str | None = None, units: str | None = None, pdo_access: RegCyclicType = RegCyclicType.CONFIG, phy: RegPhy = RegPhy.NONE, subnode: int = 1, storage: Any | None = None, reg_range: tuple[None, None] | tuple[int, int] | tuple[float, float] | tuple[str, str] = (None, None), labels: dict[str, str] | None = None, enums: dict[str, int] | None = None, cat_id: str | None = None, scat_id: str | None = None, internal_use: int = 0, address_type: RegAddressType | None = RegAddressType.NVM_NONE, description: str | None = None, default: bytes | None = None, bitfields: dict[str, BitField] | None = None, monitoring: MonDistV3 | None = None)[source]
Register Base class.
- Parameters:
dtype – Data type.
access – Access type.
identifier – Identifier.
units – Units.
pdo_access – pdo access.
phy – Physical units.
subnode – Subnode.
storage – Storage.
reg_range – Range (min, max).
labels – Register labels.
enums – Enumeration registers.
cat_id – Category ID.
scat_id – Sub-category ID.
internal_use – Internal use.
address_type – Address tpye.
description – Register description.
default – Register default value.
bitfields – Fields that specify groups of bits.
monitoring – monitoring information (address, subnode, cyclic access), None if register is not monitoreable.
- Raises:
TypeError – If any of the parameters has invalid type.
ILValueError – If the register is invalid.
ILAccessError – Register with wrong access type.
- property access: RegAccess
Access type of the register.
- property address_type: RegAddressType | None
Address type of the register.
- property bit_length: int
Get the bit length of the register.
- Returns:
bit length of the register.
- Return type:
int
- property bitfields: dict[str, BitField] | None
Register bit fields.
- property cat_id: str | None
Category ID.
- property default: None | int | float | str | bytes
Register default value.
- property description: str | None
Register description.
- property dtype: RegDtype
Data type of the register.
- property enums: dict[str, int]
Containing all the enums for the register.
- property enums_count: int
The number of the enums in the register.
- property identifier: str | None
Register identifier.
- property internal_use: int
Defines if the register is only for internal uses.
- property labels: dict[str, str]
Containing the labels of the register.
- property monitoring: MonDistV3 | None
Containing the address, subnode and cyclic access.
If the register is not monitoreable, it will contain None.
- property pdo_access: RegCyclicType
Defines if the register is pdo mappable.
- property phy: RegPhy
Physical units of the register.
- property range: tuple[None, None] | tuple[int, int] | tuple[float, float] | tuple[str, str]
Containing the minimum and the maximum values of the register.
- Type:
tuple
- property scat_id: str | None
Sub-Category ID.
- property storage: Any
Defines if the register needs to be stored.
- property storage_valid: bool
Defines if the register storage is valid.
- property subnode: int
Target subnode of the register.
- property units: str | None
Units of the register.