Dictionary

class ingenialink.dictionary.Dictionary(dictionary_path: str)[source]

Ingenia dictionary Abstract Base Class.

Parameters

dictionary_path – Dictionary file path.

Raises

ILCreationError – If the dictionary could not be created.

read_dictionary()None[source]

Reads the dictionary file and initializes all its components.

registers(subnode: int)Dict[str, ingenialink.register.Register][source]

Gets the register dictionary to the targeted subnode.

Parameters

subnode – Identifier for the subnode.

Returns

Dictionary of all the registers for a subnode.

categories: Optional[ingenialink.dictionary.DictionaryCategories]

Instance of all the categories in the dictionary.

errors: Optional[ingenialink.dictionary.DictionaryErrors]

Instance of all the errors in the dictionary.

firmware_version: Optional[str]

Firmware version declared in the dictionary.

image: Optional[str]

Drive’s encoded image.

interface: Optional[str]

Interface declared in the dictionary.

moco_image: Optional[str]

Motion CORE encoded image. Only available when using a COM-KIT.

part_number: Optional[str]

Part number declared in the dictionary.

path

Path of the dictionary.

product_code: Optional[int]

Product code declared in the dictionary.

revision_number: Optional[int]

Revision number declared in the dictionary.

subnodes: int

Number of subnodes in the dictionary.

version

Version of the dictionary.

class ingenialink.dictionary.DictionaryCategories(list_xdf_categories: List[xml.etree.ElementTree.Element])[source]

Contains all categories from a Dictionary.

Parameters

list_xdf_categories – List of Elements from xdf file

labels(cat_id: str)Dict[str, str][source]

Obtain labels for a certain category ID.

Args: cat_id: Category ID

Returns

Labels dictionary.

load_cat_ids()None[source]

Load category IDs from dictionary.

property category_ids

Category IDs.

class ingenialink.dictionary.DictionaryErrors(list_xdf_errors: List[xml.etree.ElementTree.Element])[source]

Errors for the dictionary.

Parameters

list_xdf_errors – List of Elements from xdf file

load_errors()None[source]

Load errors from dictionary.

property errors

Get the errors dictionary.

Returns

Errors dictionary.