DeviceClass¶
-
class
PyTango.
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
(self, str, str) → None¶ add_wiz_class_prop (self, str, str, str) ->
None
For internal usage onlyParameters: None Return: None
-
add_wiz_dev_prop
(self, str, str) → None¶ add_wiz_dev_prop (self, str, str, str) ->
None
For internal usage onlyParameters: None Return: None
-
create_device
(self, device_name, alias=None, cb=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
- Throws PyTango.DevFailed:
- the device name exists already or
- the given class is not registered for this DS.
- the cb is not a callable
New in PyTango 7.1.2
Parameters: device_name: ( str
) the device namealias: ( str
) optional alias. Default value is None meaning do not create device aliascb: ( 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 callbackReturn: None
-
delete_device
(self, klass_name, device_name) → None¶ Deletes an existing device from the database and from this running server
- Throws PyTango.DevFailed:
- the device name doesn’t exist in the database
- the device name doesn’t exist in this DS.
New in PyTango 7.1.2
Parameters: klass_name: ( str
) the device class namedevice_name: ( str
) the device nameReturn: None
-
device_destroyer
(name)¶ for internal usage only
-
device_factory
(device_list)¶ for internal usage only
-
device_name_factory
(self, dev_name_list) → 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: ( seq
) sequence of devices to be filledReturn: None
-
dyn_attr
(self, device_list) → None¶ - Default implementation does not do anything Overwrite in order to provide dynamic attributes
Parameters: device_list: ( seq
) sequence of devices of this classReturn: None
-
export_device
(self, dev, corba_dev_name = 'Unused') → None¶ - For internal usage only
Parameters: dev: ( DeviceImpl
) device objectcorba_dev_name: ( str
) CORBA device name. Default value is ‘Unused’Return: None
-
get_cmd_by_name
(self, (str)cmd_name) → PyTango.Command¶ - Get a reference to a command object.
Parameters: cmd_name: ( str
) command nameReturn: (
PyTango.Command
) PyTango.Command objectNew in PyTango 8.0.0
-
get_command_list
(self) → sequence<PyTango.Command>¶ - Gets the list of PyTango.Command objects for this class
Parameters: None Return: (sequence< PyTango.Command
>) list of PyTango.Command objects for this classNew in PyTango 8.0.0
-
get_device_list
(self) → sequence<PyTango.DeviceImpl>¶ - Gets the list of PyTango.DeviceImpl objects for this class
Parameters: None Return: (sequence< PyTango.DeviceImpl
>) list of PyTango.DeviceImpl objects for this class
-
get_doc_url
(self) → str¶ - Get the TANGO device class documentation URL.
Parameters: None Return: ( str
) the TANGO device type name
-
get_name
(self) → str¶ - Get the TANGO device class name.
Parameters: None Return: ( str
) the TANGO device class name.
-
get_type
(self) → str¶ - Gets the TANGO device type name.
Parameters: None Return: ( str
) the TANGO device type name
-
register_signal
(self, signo) → None¶ register_signal (self, signo, own_handler=false) ->
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.- Throws PyTango.DevFailed:
- if the signal number is out of range
- if the operating system failed to register a signal for the process.
Parameters: signo: ( int
) signal identifierown_handler: ( bool
) true if you want the device signal handler to be executed in its own handler instead of being executed by the signal thread. If this parameter is set to true, care should be taken on how the handler is written. A default false value is providedReturn: None
-
set_type
(self, dev_type) → None¶ - Set the TANGO device type name.
Parameters: dev_type: ( str
) the new TANGO device type nameReturn: None
-