maxon.DataDictionary

Description

Reference class of maxon.DataDictionaryInterface.

Inheritance diagram

Inheritance

Parent Class:

Methods Signature

__contains__(item)

Returns True if there is data stored under the #item# specific key.

__delitem__(key)

Erases the value stored under the given key.

__getitem__(item)

Gets the data stored under the given key.

__iter__()

Iterates keys, values of the dictionary.

__len__()

Returns the number of entries in the dictionary.

__maxon_convert__([expected])

Converts a Python dictionary to a Maxon DataDictionary.

__setitem__(key, value)

Sets the value stored under the given key.

__str__()

Return str(self).

Methods Definition

DataDictionary.__contains__(item)

Returns True if there is data stored under the #item# specific key.

Parameters

item (maxon.Data) – Key under which the data should be stored.

Returns

True if existent.

Return type

bool

DataDictionary.__delitem__(key)
Erases the value stored under the given key.

Does not check if the dictionary contains the given key and values can be erased in two ways:
  1. Using a FId: dict.Erase(maxon.MAXCHINEINFO.COMPUTERNAME, “data”)

  2. Using a registered data type: dict.Erase(maxon.Int32(5))

Parameters

key (maxon.Data) – Key under which the data is stored.

DataDictionary.__getitem__(item)
Gets the data stored under the given key.

Will return None when the given key does not exist.
Parameters

item (maxon.Data) – Key under which the data is stored.

Returns

Data converted to the right type on success.

Return type

maxon.Data

DataDictionary.__iter__()

Iterates keys, values of the dictionary.

DataDictionary.__len__()

Returns the number of entries in the dictionary.

Returns

Number of entries in the dictionary.

Return type

int

DataDictionary.__maxon_convert__(expected=None)

Converts a Python dictionary to a Maxon DataDictionary.

Parameters

expected (Optional[type]) – The expected output type, only dict is support for the moment.

Returns

A Python dictionary filled with data contained from the Maxon DataDictionary

Return type

dict

DataDictionary.__setitem__(key, value)
Sets the value stored under the given key.

Values can be set in two ways:
  1. Using a FId: dict.Set(maxon.MAXCHINEINFO.COMPUTERNAME, “data”)

  2. Using a registered data type: dict.Set(maxon.Int32(5), “data”)

Parameters
DataDictionary.__str__()

Return str(self).