maxon.DataDictionary¶
Description¶
Reference class of maxon.DataDictionaryInterface
.
Methods Signature¶
|
Returns True if there is data stored under the #item# specific key. |
|
Erases the value stored under the given key.
|
|
Gets the data stored under the given key.
|
|
Iterates keys, values of the dictionary. |
|
Returns the number of entries in the dictionary. |
|
Converts a Python dictionary to a Maxon DataDictionary. |
|
Sets the value stored under the given key.
|
|
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:
Using a FId: dict.Erase(maxon.MAXCHINEINFO.COMPUTERNAME, “data”)
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
-
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:
Using a FId: dict.Set(maxon.MAXCHINEINFO.COMPUTERNAME, “data”)
Using a registered data type: dict.Set(maxon.Int32(5), “data”)
- Parameters
key (
maxon.Data
) –maxon.Id
under which the data is stored.value (
maxon.Data
) – Move reference to the data.
-
DataDictionary.
__str__
()¶ Return str(self).