MacroServer

The MacroServer tango module

Classes

MacroServer

Inheritance diagram of MacroServer
class MacroServer(cl, name)[source]

Bases: sardana.tango.core.SardanaDevice.SardanaDevice

The MacroServer tango class

ElementsCache = None
EnvironmentCache = None
init(name)[source]

initialize the device once in the object lifetime. Override when necessary but always call the method from your super class

:param str name: device name

macro_server
delete_device()[source]

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

init_device()[source]

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

on_macro_server_changed(evt_src, evt_type, evt_value)[source]
always_executed_hook(self) → None[source]
Hook method. Default method to implement an action necessary on a device before any command is executed. This method can be redefined in sub-classes in case of the default behaviour does not fullfill the needs

Parameters : None Return : None

Throws : DevFailed This method does not throw exception but a redefined method can.

read_attr_hardware(self, attr_list) → None[source]
Read the hardware to return attribute value(s). Default method to implement an action necessary on a device to read the hardware involved in a a read attribute CORBA call. This method must be redefined in sub-classes in order to support attribute reading
Parameters :
attr_list : (sequence<int>) list of indices in the device object attribute vector
of an attribute to be read.

Return : None

Throws : DevFailed This method does not throw exception but a redefined method can.

read_DoorList(attr)[source]
read_MacroList(**kwargs)[source]
read_MacroLibList(attr)[source]
read_TypeList(attr)[source]
getElements(cache=True)[source]
read_Elements(attr)[source]
is_Elements_allowed(req_type)[source]
is_DoorList_allowed(req_type)
is_MacroList_allowed(req_type)
is_MacroLibList_allowed(req_type)
is_TypeList_allowed(req_type)
GetMacroInfo(macro_names)[source]

GetMacroInfo(list<string> macro_names):

Returns a list of string containing macro information. Each string is a JSON encoded.

Params:
  • macro_name: a list of strings with the macro(s) name(s)
Returns:
  • a list of string containing macro information.
ReloadMacro(macro_names)[source]

ReloadMacro(list<string> macro_names):

ReloadMacroLib(lib_names)[source]

ReloadMacroLib(sequence<string> lib_names):

GetMacroCode(<module name>[, <macro name>]) → full filename, code, line_nb[source]
SetMacroCode(argin)[source]
getEnvironment(cache=True)[source]
read_Environment(attr)[source]
write_Environment(attr)[source]
is_Environment_allowed(req_type)[source]

MacroServerClass

Inheritance diagram of MacroServerClass
class MacroServerClass(name)[source]

Bases: sardana.tango.core.SardanaDevice.SardanaDeviceClass

MacroServer Tango class class