Generic Sardana Tango device module
Classes
#.. inheritance-diagram:: SardanaDevice # :parts: 1
Bases: PyTango._PyTango.Device_4Impl, taurus.core.util.log.Logger
SardanaDevice represents the base class for all Sardana PyTango.DeviceImpl classes
initialize the device once in the object lifetime. Override when necessary but always call the method from your super class
Parameters: | name (str) – device name |
---|
the device alias name
Returns the device full name in format dbname:dbport/<domain>/<family>/<member>
Returns: | this device full name |
---|---|
Return type: | str |
Initialize the device. Called during startup after init() and every time the tango Init command is executed. Override when necessary but always call the method from your super class
Internal method. Initialize the device when tango database is not being used (example: in demos)
Clean the device. Called during shutdown and every time the tango Init command is executed. Override when necessary but always call the method from your super class
Helper method to set change events on attributes
Parameters: |
|
---|
Initialize dynamic attributes. Default implementation does nothing. Override when necessary.
Return the ThreadPool used by sardana to send tango events.
Returns: | the sardana ThreadPool |
---|---|
Return type: | ThreadPool |
Gets the attribute for the given name.
Parameters: | attr_name (str) – attribute name |
---|---|
Returns: | the attribute object |
Return type: | Attribute |
Gets the writable attribute for the given name.
Parameters: | attr_name (str) – attribute name |
---|---|
Returns: | the attribute object |
Return type: | WAttribute |
Helper method to return a reference to the current tango database
Returns: | the Tango database |
---|---|
Return type: | Database |
Sets the given attribute value. If timestamp is not given, now is used as timestamp. If quality is not given VALID is assigned. If error is given an error event is sent (with no value and quality INVALID). If priority is > 1, the event filter is temporarily disabled so the event is sent for sure. If synch is set to True, wait for fire event to finish
Parameters: |
|
---|
Synchronous internal implementation of set_attribute() (synch is passed to this method because it might need to know if it is being executed in a synchronous or asynchronous context).
Calculate tango state based on the controller state.
Parameters: |
|
---|---|
Returns: | the corresponding tango state |
Return type: | PyTango.DevState |
Calculate tango status based on the controller status.
Parameters: |
|
---|---|
Returns: | the corresponding tango state |
Return type: | str |
#.. inheritance-diagram:: SardanaDeviceClass # :parts: 1
Bases: PyTango.device_class.DeviceClass
SardanaDeviceClass represents the base class for all Sardana PyTango.DeviceClass classes
Sardana device class properties definition
See also
server
Sardana device properties definition
See also
server
Sardana device command definition
See also
server
Sardana device attribute definition
See also
server
Write class properties ProjectTitle, Description, doc_url, InheritedFrom and __icon
Invoked to create dynamic attributes for the given devices. Default implementation calls SardanaDevice.initialize_dynamic_attributes() for each device
Parameters: | dev_list (PyTango.DeviceImpl) – list of devices |
---|