Dictionary

class ingenialink.canopen.dictionary.CanopenDictionary(dictionary_path)[source]

Contains all registers and information of a CANopen dictionary.

Parameters

dictionary_path (str) – Path to the Ingenia dictionary.

read_dictionary()[source]

Reads the dictionary file and initializes all its components.

read_register(register)[source]

Reads a register from the dictionary and creates a Register instance.

Parameters

register (Element) – Register instance from the dictionary.

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

Categories

errors

Instance of all the errors in the dictionary.

Type

Errors

path

Path of the dictionary.

Type

str

subnodes

Number of subnodes in the dictionary.

Type

int

version

Version of the dictionary.

Type

str

class ingenialink.canopen.dictionary.Categories(dict_)[source]

Contains all categories from a CANopen Dictionary.

Parameters

dict (str) – Path to the Ingenia dictionary.

labels(cat_id)[source]

Obtain labels for a certain category ID.

Returns

Labels dictionary.

Return type

dict

load_cat_ids()[source]

Load category IDs from dictionary.

property cat_ids

Category IDs.

Type

list

class ingenialink.canopen.dictionary.Errors(dict_)[source]

Errors for the CANopen dictionary.

Parameters

dict (str) – Path to the Ingenia dictionary.

load_errors()[source]

Load errors from dictionary.

property errors

Errors dictionary.

Type

dict