Registers

class ingenialink.canopen.registers.Register(identifier, units, cyclic, idx, subidx, dtype, access, phy=REG_PHY.NONE, subnode=1, storage=None, range=(None, 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.

  • 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.

  • ILValueError – If the register is invalid.

  • ILAccessError – Register with wrong access type.

property access

Register access type.

Type

int

property cat_id

Category ID.

property cyclic

Register cyclic type.

Type

str

property dtype

Register data type.

Type

int

property enums

Enumerations list.

property enums_count

Register Enumerations count.

Type

int

property identifier

Register identifier

Type

str

property idx

Register index.

Type

int

property internal_use

Register internal_use.

Type

int

property labels

Labels dictionary.

Type

LabelsDictionary

property phy

Register physical units.

Type

int

property range

Register range (min, max), None if undefined.

Type

tuple

property scat_id

Sub-category ID.

property storage

Register storage.

property storage_valid

If storage is valid

Type

int

property subidx

Register subindex.

Type

int

property subnode

Register subnode.

Type

int

property units

Register units

Type

str