sardanabase

This module is part of the Python Sardana library. It defines the base classes for Sardana object

Classes

SardanaBaseObject

Inheritance diagram of SardanaBaseObject
class SardanaBaseObject(**kwargs)[source]

The Sardana most abstract object. It contains only two members:

  • _manager : a weak reference to the manager (pool or ms) where it belongs
  • _name : the name
  • _full_name : the name (usually a tango device name, but can be anything else.)
get_manager()[source]

Return the sardana.Manager which owns this sardana object.

Returns:the manager which owns this pool object.
Return type:sardana.Manager
get_name()[source]

Returns this sardana object name

Returns:this sardana object name
Return type:str
set_name(name)[source]

Sets sardana object name

Param:sardana object name
Type:str
get_full_name()[source]

Returns this sardana object full name

Returns:this sardana object full name
Return type:str
get_type()[source]

Returns this sardana object type.

Returns:this sardana object type
Return type:ElementType
get_parent()[source]

Returns this pool object parent.

Returns:this objects parent
Return type:SardanaBaseObject
get_parent_name()[source]

Returns this sardana object parent’s name.

Returns:this objects parent
Return type:str
get_frontend()[source]

Returns this sardana frontend object or None if no frontend is registered

Returns:this objects frontend
Return type:object
fire_event(event_type, event_value, listeners=None, protected=True)[source]
get_interfaces()[source]

Returns the set of interfaces this object implements.

Returns:The set of interfaces this object implements.
Return type:class:set <sardana.sardanadefs.Interface>
get_interface()[source]

Returns the interface this object implements.

Returns:The interface this object implements.
Return type:sardana.sardanadefs.Interface
get_interface_names()[source]

Returns a sequence of interface names this object implements.

Returns:The sequence of interfaces this object implements.
Return type:sequence<str>
serialize(*args, **kwargs)[source]
serialized(*args, **kwargs)[source]
str(*args, **kwargs)[source]
manager

reference to the sardana.Manager

name

object name

full_name

object full name

frontend

the object frontend

Critical = 50
Debug = 10
DftLogLevel = 20
DftLogMessageFormat = '%(threadName)-14s %(levelname)-8s %(asctime)s %(name)s: %(message)s'
Error = 40
Fatal = 50
Info = 20
Trace = 5
Warning = 30
add_listener(listener)

Adds a new listener for this object.

Parameters:listener – a listener
are_events_blocked()
block_events()
flush_queue()
has_listeners()

Returns True if anybody is listening to events from this object

Returns:True is at least one listener is listening or False otherwise
log_level = 20
queue_event(event_type, event_value, listeners=None)
remove_listener(listener)

Removes an existing listener for this object.

Parameters:listener – the listener to be removed
Returns:True is succeeded or False otherwise
root_inited = True
unblock_events()

SardanaObjectID

Inheritance diagram of SardanaObjectID
class SardanaObjectID(id=0)[source]

To be used by sardana objects which have an ID associated to them.

get_id()[source]

Returns this sardana object ID

Returns:this sardana object ID
Return type:int
serialize(*args, **kwargs)[source]
id

object ID