Door

Classes

Door

Inheritance diagram of Door
class Door(dclass, name)[source]

Bases: SardanaDevice

init(name)[source]

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

Parameters:

name – device name

get_door()[source]
set_door(door)[source]
property door
property macro_server_device
property 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

get_id()[source]

Returns the door id from database (name or numeric id).

Return type:

Union[str, int]

Returns:

the door id

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_door_changed(event_source, event_type, event_value)[source]
property macro_executor
getRunningMacro()[source]
always_executed_hook(self)[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

Raises:

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

dev_status(self) str[source]

Get device status.

Default method to get device status. It returns the contents of the device dev_status field. If the device state is ALARM, alarm messages are added to the device status. This method can be redefined in sub-classes in case of the default behaviour does not fullfill the needs.

Returns:

the device status

Return type:

str

Raises:

DevFailed – If it is necessary to read attribute(s) and a problem occurs during the reading

readLogAttr(attr)[source]
read_Critical(attr)
read_Error(attr)
read_Warning(attr)
read_Info(attr)
read_Output(attr)
read_Debug(attr)
read_Trace(attr)
read_Input(attr)[source]
write_Input(attr)[source]
sendRecordData(format, data)[source]
getLogAttr(name)[source]
read_Result(attr)[source]
read_RecordData(attr)[source]
read_MacroStatus(attr)[source]
read_ReservedElements(attr)[source]
AbortMacro()[source]
ReleaseMacro()[source]
is_ReleaseMacro_allowed()[source]
PauseMacro()[source]
is_PauseMacro_allowed()[source]
StopMacro()[source]
is_StopMacro_allowed()[source]
ResumeMacro()[source]
is_ResumeMacro_allowed()[source]
RunMacro(par_str_list)[source]
is_RunMacro_allowed()[source]
SimulateMacro(par_str_list)[source]
GetMacroEnv(<macro name>[, <env var. name>]) [<env var name>, <value>][source]
is_GetMacroEnv_allowed()[source]

DoorClass

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

Bases: SardanaDeviceClass

class_property_list = {}

Sardana device class properties definition

device_property_list = {'Id': [tango._tango.CmdArgType.DevLong64, 'Internal ID', [0]], 'MacroServerName': [tango._tango.CmdArgType.DevString, 'Name of the macro server device to connect to. [default: None, meaning connect to the first registered macroserver', None], 'MaxMsgBufferSize': [tango._tango.CmdArgType.DevLong, 'Maximum size for the Output, Result, Error, Warning, Debug and Info buffers', [512]]}

Sardana device properties definition

cmd_list = {'AbortMacro': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVoid, '']], 'GetMacroEnv': [[tango._tango.CmdArgType.DevVarStringArray, 'Macro name followed by an optional list of environment names'], [tango._tango.CmdArgType.DevVarStringArray, 'Macro environment as a list of JSON-encoded keys-value pairs']], 'PauseMacro': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVoid, '']], 'ReleaseMacro': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVoid, '']], 'ResumeMacro': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVoid, '']], 'RunMacro': [[tango._tango.CmdArgType.DevVarStringArray, 'Macro name and parameters'], [tango._tango.CmdArgType.DevVarStringArray, 'Macro Result']], 'SimulateMacro': [[tango._tango.CmdArgType.DevVarStringArray, 'Macro name and parameters'], [tango._tango.CmdArgType.DevVarStringArray, 'Macro statistics']], 'StopMacro': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVoid, '']]}

Sardana device command definition

attr_list = {'Critical': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SPECTRUM, tango._tango.AttrWriteType.READ, 512], {'label': 'Macro critical error message'}], 'Debug': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SPECTRUM, tango._tango.AttrWriteType.READ, 512], {'label': 'Macro debug message'}], 'Error': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SPECTRUM, tango._tango.AttrWriteType.READ, 512], {'label': 'Macro error message'}], 'Info': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SPECTRUM, tango._tango.AttrWriteType.READ, 512], {'label': 'Macro information message'}], 'Input': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ_WRITE], {'label': 'Macro input prompt'}], 'MacroStatus': [[tango._tango.CmdArgType.DevEncoded, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ], {'label': 'Macro Status'}], 'Output': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SPECTRUM, tango._tango.AttrWriteType.READ, 512], {'label': 'Macro output message'}], 'RecordData': [[tango._tango.CmdArgType.DevEncoded, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ], {'label': 'Record Data'}], 'ReservedElements': [[tango._tango.CmdArgType.DevEncoded, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ], {'label': 'Reserved macro elements'}], 'Result': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SPECTRUM, tango._tango.AttrWriteType.READ, 512], {'label': 'Result for the last macro'}], 'Warning': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SPECTRUM, tango._tango.AttrWriteType.READ, 512], {'label': 'Macro warning message'}]}

Sardana device attribute definition