Device¶
DeviceImpl¶
-
class
tango.
DeviceImpl
¶ Base class for all TANGO device. This class inherits from CORBA classes where all the network layer is implemented.
-
add_attribute
(self, attr, r_meth=None, w_meth=None, is_allo_meth=None) → Attr¶ - Add a new attribute to the device attribute list. Please, note that if you add an attribute to a device at device creation time, this attribute will be added to the device class attribute list. Therefore, all devices belonging to the same class created after this attribute addition will also have this attribute.
Parameters: attr: (Attr or AttrData) the new attribute to be added to the list. r_meth: ( callable
) the read method to be called on a read requestw_meth: ( callable
) the write method to be called on a write request (if attr is writable)is_allo_meth: ( callable
) the method that is called to check if it is possible to access the attribute or notReturn: (
Attr
) the newly created attribute.Throws:
-
debug_stream
(self, msg, *args) → None¶ Sends the given message to the tango debug stream.
Since PyTango 7.1.3, the same can be achieved with:
print(msg, file=self.log_debug)
Parameters: msg: ( str
) the message to be sent to the debug streamReturn: None
-
error_stream
(self, msg, *args) → None¶ Sends the given message to the tango error stream.
Since PyTango 7.1.3, the same can be achieved with:
print(msg, file=self.log_error)
Parameters: msg: ( str
) the message to be sent to the error streamReturn: None
-
fatal_stream
(self, msg, *args) → None¶ Sends the given message to the tango fatal stream.
Since PyTango 7.1.3, the same can be achieved with:
print(msg, file=self.log_fatal)
Parameters: msg: ( str
) the message to be sent to the fatal streamReturn: None
-
get_device_properties
(self, ds_class = None) → None¶ - Utility method that fetches all the device properties from the database and converts them into members of this DeviceImpl.
Parameters: ds_class: ( DeviceClass
) the DeviceClass object. Optional. Default value is None meaning that the corresponding DeviceClass object for this DeviceImpl will be usedReturn: None
Throws:
-
info_stream
(self, msg, *args) → None¶ Sends the given message to the tango info stream.
Since PyTango 7.1.3, the same can be achieved with:
print(msg, file=self.log_info)
Parameters: msg: ( str
) the message to be sent to the info streamReturn: None
-