Dictionary

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

Ingenia dictionary Abstract Base Class.

Parameters

dictionary_path (str) – Dictionary file path.

Raises

ILCreationError – If the dictionary could not be created.

read_dictionary()[source]

Reads the dictionary file and initializes all its components.

registers(subnode)[source]

Gets the register dictionary to the targeted subnode.

Parameters

subnode (int) – Identifier for the subnode.

Returns

Dictionary of all the registers for a subnode.

Return type

dict

categories

Instance of all the categories in the dictionary.

Type

DictionaryCategories

errors

Instance of all the errors in the dictionary.

Type

DictionaryErrors

firmware_version

Firmware version declared in the dictionary.

Type

str

interface

Interface declared in the dictionary.

Type

str

part_number

Part number declared in the dictionary.

Type

str

path

Path of the dictionary.

Type

str

product_code

Product code declared in the dictionary.

Type

int

revision_number

Revision number declared in the dictionary.

Type

int

subnodes

Number of subnodes in the dictionary.

Type

int

version

Version of the dictionary.

Type

str

class ingenialink.dictionary.DictionaryCategories(list_xdf_categories)[source]

Contains all categories from a Dictionary.

Parameters

list_xdf_categories (list) – List of Elements from xdf file

labels(cat_id)[source]

Obtain labels for a certain category ID.

Args: cat_id (str): Category ID

Returns

Labels dictionary.

Return type

dict

load_cat_ids()[source]

Load category IDs from dictionary.

property category_ids

Category IDs.

Type

list

class ingenialink.dictionary.DictionaryErrors(list_xdf_errors)[source]

Errors for the dictionary.

Parameters

list_xdf_errors (list) – List of Elements from xdf file

load_errors()[source]

Load errors from dictionary.

property errors

Get the errors dictionary.

Returns

Errors dictionary.

Return type

dict