pylab_ml.attributes.Child
- class Child(root, instName)[source]
Bases:
create_attributesClass for child attributes. This class is used to create child attributes, which are attributes of attributes.
- __init__(root, instName)[source]
Initialize the Child instance.
- Parameters:
root (object) – The root object to which this child belongs.
instName (str) – The name of the instance.
Methods
__init__(root, instName)Initialize the Child instance.
createattributes(dictionary[, parent, ...])Create attributes or methods from a dictionary.
read()Read method for the child instance.
write(msg)Write method for the child instance.
Attributes
if something wrong with your called methode, than set the result to self.ATTR_ERROR
last set/get attribute name.
last set attribute value.
- ATTR_ERROR
if something wrong with your called methode, than set the result to self.ATTR_ERROR
- attrLast
last set/get attribute name.
- attrLastvalue
last set attribute value.
- createattributes(dictionary, parent=None, child=None, childname='')
Create attributes or methods from a dictionary.
Syntax from the dictionary see example in the class documentation.
- Parameters:
dictionary (dict) – The dictionary with the syntax: {attribute/methode name : (Device command for read/write) , range, call functions}.
parent (create_attributes, optional) – If you want to create a child, than you have to set the parent, otherwise None, by default None.
child (str, optional) – The name of the child, by default None.
childname (str, optional) – The name of the child, by default ‘’.
- Return type:
None.