Registers
- class ingenialink.ethernet.register.EthernetRegister(address: int, dtype: REG_DTYPE, access: REG_ACCESS, identifier: str | None = None, units: str | None = None, cyclic: RegCyclicType = RegCyclicType.CONFIG, phy: REG_PHY = REG_PHY.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: REG_ADDRESS_TYPE | None = None, description: str | None = None, default: bytes | None = None, bitfields: Dict[str, BitField] | None = None)[source]
Ethernet Register.
- Parameters:
address – Address of the register.
dtype – Data type.
access – Access type.
identifier – Identifier.
units – Units.
cyclic – Cyclic typed register.
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 Type.
description – Register description.
default – Register default value.
bitfields – Fields that specify groups of bits
- Raises:
TypeError – If any of the parameters has invalid type.
ILValueError – If the register is invalid.
ILAccessError – Register with wrong access type.
- property access: REG_ACCESS
Access type of the register.
- property address: int
Register address.
- property address_type: REG_ADDRESS_TYPE | None
Address type of the register.
- property cat_id: str | None
Category ID
- property cyclic: RegCyclicType
Defines if the register is cyclic.
- property default: None | int | float | str | bytes
Register default value
- property description: str | None
Register description.
- property dtype: REG_DTYPE
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 mapped_address: int
Register mapped address used for monitoring/disturbance.
- property phy: REG_PHY
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.