DeviceClass#
- class tango.DeviceClass(name)#
Base class for all TANGO device-class class. A TANGO device-class class is a class where is stored all data/method common to all devices of a TANGO device class
- add_wiz_class_prop(*args, **kwargs)#
Overloaded function.
add_wiz_class_prop(self: tango._tango.DeviceClass, name: str, desc: str) -> None
For internal usage only
add_wiz_class_prop(self: tango._tango.DeviceClass, name: str, desc: str, default: str) -> None
For internal usage only
- add_wiz_dev_prop(*args, **kwargs)#
Overloaded function.
add_wiz_dev_prop(self: tango._tango.DeviceClass, name: str, desc: str) -> None
For internal usage only
add_wiz_dev_prop(self: tango._tango.DeviceClass, name: str, desc: str, default: str) -> None
For internal usage only
- create_device(device_name: str, alias: str | None = None, cb: Callable | None = None) None#
Creates a new device of the given class in the database, creates a new DeviceImpl for it and calls init_device (just like it is done for existing devices when the DS starts up)
An optional parameter callback is called AFTER the device is registered in the database and BEFORE the init_device for the newly created device is called
- Parameters:
device_name (
str) – name of the new devicealias (
str) – optional alias. Default value is None meaning do not create device aliascb (
typing.Callable) – a callback that is called AFTER the device is registered in the database and BEFORE the init_device for the newly created device is called. Typically you may want to put device and/or attribute properties in the database here. The callback must receive a parameter: device name (str). Default value is None meaning no callback
- Throws:
-
the device name exists already
the given class is not registered for this DS
the cb is not a callable
Added in version 7.1.2.
- delete_device(device_name: str) None#
Deletes an existing device from the database and from this running server
- Parameters:
- Throws:
-
the device name doesn’t exist in the database
the device name doesn’t exist in this DS.
Added in version 7.1.2.
- device_destroyer(name)#
for internal usage only
- device_factory(device_list)#
for internal usage only
- device_name_factory(dev_name_list: list[str]) None#
Create device(s) name list (for no database device server). This method can be re-defined in DeviceClass sub-class for device server started without database. Its rule is to initialise class device name. The default method does nothing.
- Parameters:
dev_name_list (list[
str]) – sequence of devices to be filled
- dyn_attr(device_list)#
Default implementation does not do anything Overwrite in order to provide dynamic attributes
- Parameters:
device_list (list[
DeviceImpl]) – sequence of devices of this class
- export_device(self: tango._tango.DeviceClass, dev: Tango::DeviceImpl, corba_dev_name: str = 'Unused') None#
For internal usage only
- Parameters:
dev (
DeviceImpl) – device objectcorba_dev_name (str) – CORBA device name. Default value is ‘Unused’
- get_class_attr(self: tango._tango.DeviceClass) Tango::MultiClassAttribute#
Returns the instance of the
tango.MultiClassAttributefor the class- Return type:
MultiClassAttribute
- get_cmd_by_name(self: tango._tango.DeviceClass, cmd_name: str) Tango::Command#
Get a reference to a command object.
- Parameters:
cmd_name (
str) – command name- Return type:
Command
Added in version 8.0.0.
- get_command_list(self: tango._tango.DeviceClass) object#
Gets the list of
Commandobjects for this class- Return type:
list[Command]
Added in version 8.0.0.
- get_cvs_location(self: tango._tango.DeviceClass) str#
Gets the cvs localtion
- get_cvs_tag(self: tango._tango.DeviceClass) str#
Gets the cvs tag
- get_device_list(self: tango._tango.DeviceClass) object#
Gets the list of tango.DeviceImpl objects for this class
- Return type:
list[DeviceImpl]
- get_doc_url(self: tango._tango.DeviceClass) str#
Get the TANGO device class documentation URL.
- get_name(self: tango._tango.DeviceClass) str#
Get the TANGO device class name.
- get_type(self: tango._tango.DeviceClass) str#
Gets the TANGO device type name.
- register_signal(*args, **kwargs)#
Overloaded function.
register_signal(self: tango._tango.DeviceClass, signo: typing.SupportsInt | typing.SupportsIndex) -> None
Register a signal. Register this class as class to be informed when signal signo is sent to to the device server process. The second version of the method is available only under Linux.
- Parameters:
signo (int) – signal identifier
- Throws:
DevFailed: - if the signal number is out of range - if the operating system failed to register a signal for the process
register_signal(self: tango._tango.DeviceClass, signo: typing.SupportsInt | typing.SupportsIndex, own_handler: bool) -> None
Register a signal. Register this class as class to be informed when signal signo is sent to to the device server process. The second version of the method is available only under Linux.
- Parameters:
- Throws:
DevFailed: - if the signal number is out of range - if the operating system failed to register a signal for the process
- set_type(self: tango._tango.DeviceClass, dev_type: str) None#
Set the TANGO device type name.
- Parameters:
dev_type (
str) – the new TANGO device type name
- signal_handler(self: tango._tango.DeviceClass, signo: SupportsInt | SupportsIndex) None#
Signal handler.
The method executed when the signal arrived in the device server process. This method is defined as virtual and then, can be redefined following device class needs.
- Parameters:
signo (int) – signal identifier
- unregister_signal(self: tango._tango.DeviceClass, signo: SupportsInt | SupportsIndex) None#
Unregister a signal. Unregister this class as class to be informed when signal signo is sent to to the device server process
- Parameters:
signo (int) – signal identifier