nxsrecconfig package¶
Submodules¶
nxsrecconfig.CheckerThread module¶
Component CheckerThread - thread which checks tango server attributes
- nxsrecconfig.CheckerThread.ATTRIBUTESTOCHECK = ['Value', 'Position', 'Counts', 'Data', 'Voltage', 'Energy', 'SampleTime']¶
- exception nxsrecconfig.CheckerThread.AlarmStateError[source]¶
Bases:
Exception
Alarm State Exception class
- class nxsrecconfig.CheckerThread.CheckerItem(name)[source]¶
Bases:
list
Checker list Item
constructor
- Parameters:
name (
str
) – checker item name
- class nxsrecconfig.CheckerThread.CheckerThread(index, queue)[source]¶
Bases:
Thread
Single CheckerThread
constructor
- Brief:
It creates ElementThread from the runnable element
- Parameters:
index (
int
) – the current thread indexqueue (
Queue.Queue
) – queue with tasks
- exception nxsrecconfig.CheckerThread.FaultStateError[source]¶
Bases:
Exception
Fault State Exception class
- exception nxsrecconfig.CheckerThread.OffStateError[source]¶
Bases:
Exception
Off State Exception class
nxsrecconfig.Converter module¶
Selection version converter
- class nxsrecconfig.Converter.Converter(ver)[source]¶
Bases:
object
selection version converter
contstructor
- Parameters:
ver (
str
) – the required selection version
- allkeys(selection)[source]¶
- Parameters:
selection (nxsrecconfig.Selection.Selection) – selection dictionary object
- Returns:
selection keys
- Return type:
- down¶
(
list
<ConverterXtoY
>) converter down sequence
- up¶
(
list
<ConverterXtoY
>) converter up sequence
- class nxsrecconfig.Converter.Converter1to2[source]¶
Bases:
ConverterXtoY
Selection converter from version 1 to 2
constructor
- class nxsrecconfig.Converter.Converter2to1[source]¶
Bases:
ConverterXtoY
Selection converter from version 2 to 1
constructor
- class nxsrecconfig.Converter.Converter2to3[source]¶
Bases:
ConverterXtoY
Selection converter from version 2 to 3
converter
- class nxsrecconfig.Converter.Converter3to2[source]¶
Bases:
ConverterXtoY
Selection converter from version 3 to 2
constructor
nxsrecconfig.Describer module¶
Component Describer
- class nxsrecconfig.Describer.DSItem(name=None, dstype=None, record=None, dsitem=None, parentobj=None)[source]¶
Bases:
object
Basic DataSource item
constructor
- Parameters:
- class nxsrecconfig.Describer.Describer(nexusconfig_device, tree=False, pyevalfromscript=False)[source]¶
Bases:
object
Lists datasources, strategy, dstype and record name of given component
constructor
- Parameters:
nexusconfig_device (
tango.DeviceProxy
ornxsconfigserver.XMLConfigurator.XMLConfigurator
) – configserver configuration servertree (
bool
) – flag for output tree dictionarypyevalfromscript (
bool
) – if evalulate PYEVAL datasources from script
- components(components=None, strategy='', dstype='', cfvars=None)[source]¶
describes given components. If
tree
= True it returns[{ cpname : { dsname : [ | (strategy, dstype, record, nxstype, shape), …] } } ]else
[{“dsname”: dsname, “strategy”: strategy, “dstype”: dstype, | “record”: record, “nxstype”: nxstype, “shape”: shape , | “cpname”: cpname}, …]- Parameters:
components (
list
<str
>) – given components. If None all available ones are takenstrategy (
str
) – list datasets only with given strategy. If ‘’ all available ones are takendstype (
str
) – list datasets only with given datasource type. If ‘’ all available ones are takencfvars (
str
) – configuration variables in JSON dictionary
- Returns:
list of dictionary with description of components
- Return type:
[
dict
<str
,dict
<str
,list
<(str
,str
,str
,str
,list
<int
>)> > > ] or [{“dsname”:str
, “strategy”:str
, “dstype”:str
, “record”:str
, “nxstype”:str
, “shape”:list
<int
> , “cpname”:str
}, …]
- class nxsrecconfig.Describer.ExDSDict(*args, **kw)[source]¶
Bases:
dict
Extended DataSource Dictionary
constructor
nxsrecconfig.DynamicComponent module¶
Dynamic Component
- class nxsrecconfig.DynamicComponent.DynamicComponent(nexusconfig_device, defaultpath="/$var.entryname#'scan'$var.serialno:NXentry/NXinstrument/collection", defaulttype='NX_CHAR', defaultuserpath="/$var.entryname#'scan'$var.serialno:NXentry/user_data:NXparameters")[source]¶
Bases:
object
Creates dynamic component of given component
constructor
- Parameters:
nexusconfig_device (
tango.DeviceProxy
ornxsconfigserver.XMLConfigurator.XMLConfigurator
) – configserver configuration serverdefaultpath (
str
) – default dynamic component path
- setDefaultLinkPath(dynamicLinks, dynamicPath, dynamicInitLinks=None)[source]¶
sets default nexus path and link flag for dynamic components
- setLabelParams(labels, paths, links, types, shapes)[source]¶
sets label parameters for specific dynamic components
nxsrecconfig.MacroServerPools module¶
Selection state
- class nxsrecconfig.MacroServerPools.MacroServerPools(numberOfThreads)[source]¶
Bases:
object
sardanamacro server and pools
constructor
- Parameters:
numberOfThreads (
str
) – number of threads
- checkChannels(door, configdevice, channels, componentgroup, datasourcegroup, channelerrors)[source]¶
checks component channels
- Parameters:
door (
str
) – door device nameconfigdevice (
tango.DeviceProxy
ornxsconfigserver.XMLConfigurator.XMLConfigurator
) – configuration servercomponentgroup (
dict
<str
,bool
>) – preselected component groupchannelerrors (
list
<str
>) – list of deactivated component errors
- Returns:
json dictionary with selected active components
- Return type:
- getPools(door)[source]¶
door pool device proxies
- Parameters:
door (
str
) – door device name- Returns:
pool device proxies
- Return type:
nxsrecconfig.NXSConfig module¶
Selector Server for NeXus Sardana Recorder
- class nxsrecconfig.NXSConfig.NXSRecSelector(cl, name)[source]¶
Bases:
LatestDeviceImpl
NXSRecSelector server interface
- Brief:
Tango Server for Nexus Sardana Recorder Settings. Device States Description: DevState.ON - Server is ON, DevState.RUNNING - Performing a query
Device constructor
- ComponentDescription()[source]¶
ComponentDescription command
- Brief:
Return a list of available component names
- Returns:
DevString list of available component names
- Return type:
- CreateDataSources(argin)[source]¶
It creates new DataSources on the ConfigServer
- Parameters:
argin (
str
) – JSON dictionary with {dsname
:tangosource
, …}
- DeleteAllProfiles()[source]¶
DeleteAllProfiles command
- Brief:
Delete all profiles from Configuration Server
- DeleteProfile(argin)[source]¶
DeleteProfile command
- Brief:
Delete the given mntgrp
- Parameters:
argin (
str
) – DevString measurement group name
- FullDeviceNames()[source]¶
FullDeviceNames command
- Brief:
Return a JSON with full device names for all aliases
- Returns:
DevString JSON dictionary with full device names
- Return type:
- MntGrpConfiguration()[source]¶
MntGrpConfiguration command
- Brief:
returns mntgrp configuration
- Returns:
Provide mntgrp configuration in json string
- Return type:
- RemoveDynamicComponent(argin)[source]¶
RemoveDynamicComponent command
- Brief:
Delete the given dynamic component
- Parameters:
argin (
str
) – DevString dynamic component name
- ResetPreselectedComponents()[source]¶
ResetPreselectedComponents command
- Brief:
reset PreselectedComponents to DefaultPreselectedComponents
- ScanEnvVariables()[source]¶
ScanEnvVariables command
- Brief:
Fetch ScanDir, ScanFile, ScanID and NeXusSelectorDevice in environment variables
- Returns:
DevString json dictionary with environment data
- Return type:
- UpdateConfigVariables()[source]¶
UpdateConfigVariables command
- Brief:
Send ConfigVariables into ConfigServer and update serialno if appendEntry selected
- UpdateMntGrp()[source]¶
UpdateMntGrp command
- Brief:
Update mntgrp configuration
- Returns:
mntgrp configuration string
- Return type:
- UpdateProfile()[source]¶
UpdateProfile command
- Brief:
Update mntgrp configuration
- Returns:
JSON string with mntgrp configuration info
- Return type:
- VariableComponents()[source]¶
VariableComponents command
- Brief:
Returns a list of available component names
- Returns:
DevString list of available component names
- Return type:
- is_AdministratorDataNames_allowed()[source]¶
AdministratorDataNames command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_AvailableComponents_allowed()[source]¶
AvailableComponents command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_AvailableDataSources_allowed()[source]¶
AvailableDataSources command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_AvailableMntGrps_allowed()[source]¶
AvailableMntGrps command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_AvailableProfiles_allowed()[source]¶
AvailableProfiles command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_AvailableTimers_allowed()[source]¶
AvailableTimers command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_CanFailDataSources_write_allowed()[source]¶
CanFailDataSources attribute Write State Machine
- Returns:
True if the operation allowed
- Return type:
- is_ChannelProperties_allowed()[source]¶
ChannelProperties command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_ComponentClientSources_allowed()[source]¶
ComponentClientSources command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_ComponentDataSources_allowed()[source]¶
ComponentDataSources command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_ComponentDescription_allowed()[source]¶
ComponentDescription command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_ComponentSources_allowed()[source]¶
ComponentSources command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_CreateDataSources_allowed()[source]¶
CreateDataSources command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_CreateDynamicComponent_allowed()[source]¶
CreateDynamicComponent command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_CreateWriterConfiguration_allowed()[source]¶
CreateWriterConfiguration command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_DataSourceDescription_allowed()[source]¶
DataSourceDescription command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_DeleteAllProfiles_allowed()[source]¶
DeleteAllProfiles command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_DeleteProfile_allowed()[source]¶
DeleteProfile command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_ExportEnv_allowed()[source]¶
ExportMntGrp command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_FetchProfile_allowed()[source]¶
FetchProfile command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_FullDeviceNames_allowed()[source]¶
FullDeviceNames command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_ImportEnv_allowed()[source]¶
ImportMntGrp command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_ImportMntGrp_allowed()[source]¶
ImportMntGrp command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_IsMntGrpUpdated_allowed()[source]¶
IsMntGrpUpdated command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_LinkDataSources_write_allowed()[source]¶
LinkDataSources attribute Write State Machine
- Returns:
True if the operation allowed
- Return type:
- is_LoadProfile_allowed()[source]¶
LoadProfile command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_MandatoryComponents_allowed()[source]¶
MandatoryComponents command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_MntGrpConfiguration_allowed()[source]¶
MntGrpConfiguration command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_MutedChannels_allowed()[source]¶
MutedChannels command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_PoolElementNames_allowed()[source]¶
PoolElementNames command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_PreselectComponents_allowed()[source]¶
PreselectComponents command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_PreselectedComponents_allowed()[source]¶
PreselectedComponents command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_PreselectedDataSources_allowed()[source]¶
PreselectedDataSources command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_RemoveDynamicComponent_allowed()[source]¶
RemoveDynamicComponent command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_ResetPreselectedComponents_allowed()[source]¶
ResetPreselectedComponents command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_SaveProfile_allowed()[source]¶
SaveProfile command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_ScanEnvVariables_allowed()[source]¶
ScanEnvVariables command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_SelectedComponents_allowed()[source]¶
SelectedComponents command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_SetChannelProperties_allowed()[source]¶
SetChannelProperties command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_SetScanEnvVariables_allowed()[source]¶
SetScanEnvVariables command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_StepDataSources_write_allowed()[source]¶
StepDataSources attribute Write State Machine
- Returns:
True if the operation allowed
- Return type:
- is_StoreProfile_allowed()[source]¶
StoreProfile command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_SwitchProfile_allowed()[source]¶
SwitchProfile command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_UpdateConfigVariables_allowed()[source]¶
UpdateConfigVariables command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_UpdateMntGrp_allowed()[source]¶
UpdateMntGrp command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_UpdateProfile_allowed()[source]¶
UpdateProfile command State Machine
- Returns:
True if the operation allowed
- Return type:
- is_VariableComponents_allowed()[source]¶
VariableComponents command State Machine
- Returns:
True if the operation allowed
- Return type:
- read_AppendEntry(attr)[source]¶
Read AppendEntry attribute
- Parameters:
attr (
tango.Attribute
) – read attribute
- read_CanFailDataSources(attr)[source]¶
Read CanFailDataSources attribute
- Parameters:
attr (
tango.Attribute
) – read attribute
- read_Components(attr)[source]¶
Read Components attribute
- Parameters:
attr (
tango.Attribute
) – read attribute
- read_ConfigDevice(attr)[source]¶
Read ConfigDevice attribute
- Parameters:
attr (
tango.Attribute
) – read attribute
- read_ConfigVariables(attr)[source]¶
Read ConfigVariables attribute
- Parameters:
attr (
tango.Attribute
) – read attribute
- read_DataSources(attr)[source]¶
Read DataSources attribute
- Parameters:
attr (
tango.Attribute
) – read attribute
- read_DescriptionErrors(attr)[source]¶
Read DescriptionErrors attribute
- Parameters:
attr (
tango.Attribute
) – read attribute
- read_DeviceGroups(attr)[source]¶
Read DeviceGroups attribute
- Parameters:
attr (
tango.Attribute
) – read attribute
- read_Door(attr)[source]¶
Read Door attribute
- Parameters:
attr (
tango.Attribute
) – read attribute
- read_LinkDataSources(attr)[source]¶
Read LinkDataSources attribute
- Parameters:
attr (
tango.Attribute
) – read attribute
- read_MacroServer(attr)[source]¶
Read MacroServer attribute
- Parameters:
attr (
tango.Attribute
) – read attribute
- read_MntGrp(attr)[source]¶
Read MntGrp attribute
- Parameters:
attr (
tango.Attribute
) – read attribute
- read_ProfileConfiguration(attr)[source]¶
Read ProfileConfiguration attribute
- Parameters:
attr (
tango.Attribute
) – read attribute
- read_ProfileFile(attr)[source]¶
Read ProfileFile attribute
- Parameters:
attr (
tango.Attribute
) – read attribute
- read_ScanDir(attr)[source]¶
Read ScanDir attribute
- Parameters:
attr (
tango.Attribute
) – read attribute
- read_ScanFile(attr)[source]¶
Read ScanFile attribute
- Parameters:
attr (
tango.Attribute
) – read attribute
- read_ScanID(attr)[source]¶
Read ScanID attribute
- Parameters:
attr (
tango.Attribute
) – read attribute
- read_StepDataSources(attr)[source]¶
Read StepDataSources attribute
- Parameters:
attr (
tango.Attribute
) – read attribute
- read_UserData(attr)[source]¶
Read UserData attribute
- Parameters:
attr (
tango.Attribute
) – read attribute
- read_Version(attr)[source]¶
Read Version attribute
- Parameters:
attr (
tango.Attribute
) – read attribute
- read_WriterDevice(attr)[source]¶
Read WriterDevice attribute
- Parameters:
attr (
tango.Attribute
) – read attribute
- write_AppendEntry(attr)[source]¶
Write AppendEntry attribute
- Parameters:
attr (
tango.Attribute
) – written attribute
- write_CanFailDataSources(attr)[source]¶
Write CanFailDataSources attribute
- Parameters:
attr (
tango.Attribute
) – written attribute
- write_ConfigDevice(attr)[source]¶
Write ConfigDevice attribute
- Parameters:
attr (
tango.Attribute
) – written attribute
- write_ConfigVariables(attr)[source]¶
Write ConfigVariables attribute
- Parameters:
attr (
tango.Attribute
) – written attribute
- write_DeviceGroups(attr)[source]¶
Write DeviceGroups attribute
- Parameters:
attr (
tango.Attribute
) – written attribute
- write_Door(attr)[source]¶
Write Door attribute
- Parameters:
attr (
tango.Attribute
) – written attribute
- write_LinkDataSources(attr)[source]¶
Write LinkDataSources attribute
- Parameters:
attr (
tango.Attribute
) – written attribute
- write_MntGrp(attr)[source]¶
Write MntGrp attribute
- Parameters:
attr (
tango.Attribute
) – written attribute
- write_ProfileConfiguration(attr)[source]¶
Write ProfileConfiguration attribute
- Parameters:
attr (
tango.Attribute
) – written attribute
- write_ProfileFile(attr)[source]¶
Write ProfileFile attribute
- Parameters:
attr (
tango.Attribute
) – written attribute
- write_ScanDir(attr)[source]¶
Write ScanDir attribute
- Parameters:
attr (
tango.Attribute
) – written attribute
- write_ScanFile(attr)[source]¶
Write ScanFile attribute
- Parameters:
attr (
tango.Attribute
) – written attribute
- write_ScanID(attr)[source]¶
Write ScanID attribute
- Parameters:
attr (
tango.Attribute
) – written attribute
- write_StepDataSources(attr)[source]¶
Write StepDataSources attribute
- Parameters:
attr (
tango.Attribute
) – written attribute
- write_UserData(attr)[source]¶
Write UserData attribute
- Parameters:
attr (
tango.Attribute
) – written attribute
- write_WriterDevice(attr)[source]¶
Write WriterDevice attribute
- Parameters:
attr (
tango.Attribute
) – written attribute
- class nxsrecconfig.NXSConfig.NXSRecSelectorClass(name)[source]¶
Bases:
DeviceClass
NXSRecSelectorclass Constructor
- attr_list = {'AppendEntry': [[tango._tango.CmdArgType.DevBoolean, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ_WRITE], {'label': 'Append Entry', 'description': 'flag for entry appending'}], 'CanFailDataSources': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ_WRITE], {'label': 'list of datasources to be switch into canfail mode', 'description': 'list of datasources to be switched into canfail mode', 'Display level': tango._tango.DispLevel.EXPERT}], 'Components': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SPECTRUM, tango._tango.AttrWriteType.READ, 10000], {'label': 'Selected Components', 'description': 'list of Selected Components'}], 'ConfigDevice': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ_WRITE], {'label': 'Configuration Device', 'description': 'Configuration device name', 'Memorized': 'true'}], 'ConfigVariables': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ_WRITE], {'label': 'Configuration Variables', 'description': 'JSON dictionary with configuration variablesfor templated components', 'Display level': tango._tango.DispLevel.EXPERT}], 'DataSources': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SPECTRUM, tango._tango.AttrWriteType.READ, 10000], {'label': 'Selected Datasources', 'description': 'list of Selected Datasources'}], 'DescriptionErrors': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SPECTRUM, tango._tango.AttrWriteType.READ, 10000], {'label': 'Descriptive Component Errors', 'description': 'list of Descriptive Component Errors'}], 'DeviceGroups': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ_WRITE], {'label': 'Device groups', 'description': 'JSON dictionary with device groups', 'Memorized': 'true', 'Display level': tango._tango.DispLevel.EXPERT}], 'Door': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ_WRITE], {'label': 'Door', 'description': 'Door device name', 'Memorized': 'true'}], 'LinkDataSources': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ_WRITE], {'label': 'list of datasources to which a link will be added', 'description': 'list of datasources to which a link will be added', 'Display level': tango._tango.DispLevel.EXPERT}], 'MacroServer': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ], {'label': 'MacroServer', 'description': 'Macro Server device name'}], 'MntGrp': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ_WRITE], {'label': ' Measurement Group', 'description': ' Measurement Group name'}], 'ProfileConfiguration': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ_WRITE], {'label': 'Profile Configuration', 'description': 'JSON dict of server configuration', 'Display level': tango._tango.DispLevel.EXPERT}], 'ProfileFile': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ_WRITE], {'label': 'Profile File with its Path', 'description': 'config file with its full path', 'Memorized': 'true'}], 'ScanDir': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ_WRITE], {'label': 'Scan Directory', 'description': 'Scan Directory'}], 'ScanFile': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ_WRITE], {'label': 'Scan File(s)', 'description': 'Scan File(s)'}], 'ScanID': [[tango._tango.CmdArgType.DevLong, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ_WRITE], {'label': 'Scan ID', 'description': 'Scan ID'}], 'StepDataSources': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ_WRITE], {'label': 'list of datasources to be switch into step mode', 'description': 'list of datasources to be switched into step mode', 'Display level': tango._tango.DispLevel.EXPERT}], 'UserData': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ_WRITE], {'label': 'Client Data', 'description': 'JSON dictionary with User Data', 'Display level': tango._tango.DispLevel.EXPERT}], 'Version': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ], {'label': 'Version', 'description': 'server version'}], 'WriterDevice': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ_WRITE], {'label': 'Writer Device', 'description': 'Writer device device name'}]}¶
- class_property_list = {}¶
(
dict
<str
, [str
,tango.CmdArgType
, [list
<int
> ] ] > ) Class Properties
- cmd_list = {'AddStepDataSources': [[tango._tango.CmdArgType.DevVarStringArray, 'list of required datasources'], [tango._tango.CmdArgType.DevVarStringArray, 'list of datasources not found in components']], 'AdministratorDataNames': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVarStringArray, 'administrator data names']], 'AvailableComponents': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVarStringArray, 'list of available component names']], 'AvailableDataSources': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVarStringArray, 'list of available DataSource names']], 'AvailableMntGrps': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVarStringArray, 'list of available mntgrp names']], 'AvailableProfiles': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVarStringArray, 'list of available selection names']], 'AvailableTimers': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVarStringArray, 'list of available timers']], 'ChannelProperties': [[tango._tango.CmdArgType.DevString, 'property type'], [tango._tango.CmdArgType.DevString, 'JSON dictionary with channel properties {channel:property}']], 'ComponentClientSources': [[tango._tango.CmdArgType.DevVarStringArray, 'list of component client datasources'], [tango._tango.CmdArgType.DevString, 'JSON with description of component CLIENT Datasources']], 'ComponentDataSources': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVarStringArray, 'profile component datasources']], 'ComponentDescription': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevString, 'JSON component description']], 'ComponentSources': [[tango._tango.CmdArgType.DevVarStringArray, 'list of components'], [tango._tango.CmdArgType.DevString, 'JSON with description of component Datasources']], 'CreateDataSources': [[tango._tango.CmdArgType.DevString, 'JSON dictionary with {``dsname``: ``tangosource``, ...}'], [tango._tango.CmdArgType.DevVoid, '']], 'CreateDynamicComponent': [[tango._tango.CmdArgType.DevVarStringArray, 'list of JSON strings with datasource parameters'], [tango._tango.CmdArgType.DevString, 'name of dynamic Component']], 'CreateWriterConfiguration': [[tango._tango.CmdArgType.DevVarStringArray, 'list of required components'], [tango._tango.CmdArgType.DevString, 'XML Settinges']], 'DataSourceDescription': [[tango._tango.CmdArgType.DevVarStringArray, 'list of required datasources'], [tango._tango.CmdArgType.DevVarStringArray, 'list of JSON with description of CLIENT Datasources']], 'DeleteAllProfiles': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVoid, '']], 'DeleteProfile': [[tango._tango.CmdArgType.DevString, 'mntgrp name'], [tango._tango.CmdArgType.DevVoid, '']], 'ExportEnvProfile': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVoid, '']], 'FetchProfile': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVoid, '']], 'FullDeviceNames': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevString, 'JSON Dictionary with full device names for all aliases ']], 'ImportEnvProfile': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVoid, '']], 'ImportMntGrp': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVoid, '']], 'IsMntGrpUpdated': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevBoolean, 'true if mntgrp changed']], 'LoadProfile': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVoid, '']], 'MandatoryComponents': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVarStringArray, 'component names']], 'MntGrpConfiguration': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevString, 'mntgrp configuration string']], 'MutedChannels': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVarStringArray, 'list of muted channels']], 'PoolElementNames': [[tango._tango.CmdArgType.DevString, 'pool list attribute name'], [tango._tango.CmdArgType.DevVarStringArray, 'list of available pool elements']], 'PreselectComponents': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVoid, '']], 'PreselectedComponents': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVarStringArray, 'component names']], 'PreselectedDataSources': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVarStringArray, 'datasources names']], 'RemoveDynamicComponent': [[tango._tango.CmdArgType.DevString, 'name of dynamic Component'], [tango._tango.CmdArgType.DevVoid, '']], 'ResetPreselectedComponents': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVoid, '']], 'SaveProfile': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVoid, '']], 'ScanEnvVariables': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevString, 'environment data']], 'SelectedComponents': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVarStringArray, 'component names']], 'SelectedDataSources': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVarStringArray, 'profile datasources']], 'SetChannelProperties': [[tango._tango.CmdArgType.DevVarStringArray, 'a two element list with a property type and JSON value dictionary {channel:property}'], [tango._tango.CmdArgType.DevVoid, '']], 'SetScanEnvVariables': [[tango._tango.CmdArgType.DevString, 'environment data'], [tango._tango.CmdArgType.DevLong, 'scanID']], 'StoreProfile': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVoid, '']], 'SwitchProfile': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVoid, '']], 'UpdateConfigVariables': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVoid, '']], 'UpdateMntGrp': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevString, 'configuration']], 'UpdateProfile': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevString, 'mntgrp configuration string']], 'VariableComponents': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevString, 'JSON Dictionary with all Components for configuration variable']]}¶
(
dict
<str
, [[tango.CmdArgType
,str
]] >) Command definitions
- device_property_list = {'AdminDataNames': [tango._tango.CmdArgType.DevVarStringArray, 'list of administrator data names', []], 'ClientRecordKeys': [tango._tango.CmdArgType.DevVarStringArray, 'list of record keys for CLIENT datasources', []], 'DefaultCanFailDataSources': [tango._tango.CmdArgType.DevVarStringArray, 'list of default datasources in the CanFail mode', []], 'DefaultMntGrp': [tango._tango.CmdArgType.DevString, 'default measurement group name', ['nxsmntgrp']], 'DefaultNeXusPath': [tango._tango.CmdArgType.DevString, 'default NeXus path', ["/$var.entryname#'scan'$var.serialno:NXentry/NXinstrument/collection"]], 'DefaultNeXusType': [tango._tango.CmdArgType.DevString, 'default dynamic component NeXus data type', ['NX_CHAR']], 'DefaultPreselectedComponents': [tango._tango.CmdArgType.DevVarStringArray, 'list of default preselected components', []], 'DefaultTimeZone': [tango._tango.CmdArgType.DevString, 'default Time Zone', ['Europe/Berlin']], 'DefaultUserDataPath': [tango._tango.CmdArgType.DevString, 'default NeXus User Data path', ["/$var.entryname#'scan'$var.serialno:NXentry/user_data:NXparameters"]], 'MasterTimer': [tango._tango.CmdArgType.DevBoolean, 'set the master timer/monitor channel for older MG', [False]], 'MasterTimerFirst': [tango._tango.CmdArgType.DevBoolean, 'the master timer channel of MG with the index: 0', [True]], 'MergeProfilesToMntGrps': [tango._tango.CmdArgType.DevBoolean, 'merge profiles to available measurement groups', [False]], 'MutedChannelFilters': [tango._tango.CmdArgType.DevVarStringArray, 'list of muted channel filters', []], 'MutedPreScanAttrFilters': [tango._tango.CmdArgType.DevVarStringArray, 'list of muted attribute channel filters for PreScanSnapshot', []], 'NumberOfThreads': [tango._tango.CmdArgType.DevLong, 'maximal number of threads', [20]], 'PoolBlacklist': [tango._tango.CmdArgType.DevVarStringArray, 'blacklist of pools', []], 'ResetInvalidDoor': [tango._tango.CmdArgType.DevBoolean, 'reset Door when it is invalid', [True]], 'SyncSnapshot': [tango._tango.CmdArgType.DevBoolean, 'preselection merges the current ScanSnapshot', [False]], 'TangoSourceErrorStates': [tango._tango.CmdArgType.DevVarStringArray, 'list of tango error states for tango datasources', ['OFF', 'INIT', 'INSERT', 'CLOSE', 'UNKNOWN', 'FAULT']], 'TangoSourceWarningStates': [tango._tango.CmdArgType.DevVarStringArray, 'list of tango warning states for tango datasources', ['ALARM', 'DISABLE']], 'TimerFilters': [tango._tango.CmdArgType.DevVarStringArray, 'list of timer device name filters', []], 'WritePoolMotorPositions': [tango._tango.CmdArgType.DevBoolean, 'add dynamic components for all pool motor positions', [False]]}¶
(
dict
<str
, [str
,tango.CmdArgType
, [list
<int
> ] ] > ) Device Properties
nxsrecconfig.ProfileManager module¶
ProfileManager
- nxsrecconfig.ProfileManager.DEFAULT_RECORD_KEYS = ['serialno', 'end_time', 'start_time', 'point_nb', 'timestamps', 'scan_title', 'filename']¶
- class nxsrecconfig.ProfileManager.ProfileManager(selector, syncsnapshot=False, writepoolmotorpositions=False)[source]¶
Bases:
object
Manages Measurement Group and Profile from Selector
constructor
- Parameters:
selector (
nxsrecconfig.Selector.Selector
) – selector objectsyncsnapshot (
bool
) – preselection merges current ScanSnapshotwritepoolmotorpositions (
bool
) – add dynamic components for all pool motor positions
- cpdescription(full=False)[source]¶
provides description of components
- Parameters:
full (
bool
) – if True describes all available ones are taken otherwise selectect, preselected and mandatory- Returns:
description of required components
- Return type:
[
dict
<str
,dict
<str
,list
<(str
,str
,str
,str
,list
<int
>)> > > ] or [{“dsname”:str
, “strategy”:str
, “dstype”:str
, “record”:str
, “nxstype”:str
, “shape”:list
<int
> , “cpname”:str
}, …]
- isMntGrpUpdated()[source]¶
check if active measurement group was changed
- Returns:
True if it is different to the current setting
- Return type:
- mntGrpConfiguration()[source]¶
provides configuration of mntgrp
- Returns:
string with mntgrp configuration
- Return type:
- switchProfile(toActive=True)[source]¶
switchProfile to active measurement
- Parameters:
toActive (
bool
) – if False update the current profile
nxsrecconfig.Release module¶
NeXus Sardana Recorder Settings - Release
nxsrecconfig.Selection module¶
Selection state
- class nxsrecconfig.Selection.Selection(*args, **kw)[source]¶
Bases:
dict
Selection Dictionary which contains the following records: { “Timer”: ‘[]’, “OrderedChannels”: ‘[]’, “ComponentSelection”: ‘{}’, “DataSourceSelection”: ‘{}’, “DataSourcePreselection”: ‘{}’, “ComponentPreselection”: ‘{}’, “PreselectingDataSources”: ‘[]’, “OptionalComponents”: ‘[]’, “AppendEntry”: False, “ComponentsFromMntGrp”: False, “ConfigVariables”: ‘{}’, “UserData”: ‘{}’, “ChannelProperties”: ‘{}’, “UnplottedComponents”: ‘[]’, “DynamicComponents”: True, “DefaultDynamicLinks”: True, “DefaultDynamicPath”: ‘/$var.entryname#’scan’$var.serialno:NXentry/NXinstrument/collection’, “TimeZone”: self.__defaultzone, “ConfigDevice”: ‘’, “WriterDevice”: ‘’, “Door”: ‘’, “MntGrp”: ‘’, “Version”: self.__version, “MntGrpConfiguration”: ‘’ }
constructor
- resetMntGrp()[source]¶
reset method for mntGrp attribute
- Brief:
If MntGrp not defined set it to default value
- resetPreselectedComponents(components)[source]¶
resets Preselected Components with given components and set them to not active :param components: list of components to be set :type components:
list
<str
>
- resetTimeZone()[source]¶
reset method for timeZone attribute
- Brief:
If TimeZone not defined set it to default value
- updateChannelProperties(devicecontrollers, triggergate)[source]¶
update method for orderedChannels attribute
- updateComponentSelection()[source]¶
update method for componentGroup attribute
- Brief:
It removes datasource components from component group
- updateDataSourceSelection(channels, datasources)[source]¶
update method for dataSourceGroup attribute
nxsrecconfig.Selector module¶
Selection state
- class nxsrecconfig.Selector.Selector(macroserverpools, version, defaultpath="/$var.entryname#'scan'$var.serialno:NXentry/NXinstrument/collection", defaulttimezone='Europe/Berlin', defaultmntgrp='nxsmntgrp')[source]¶
Bases:
object
access class to Selection dictionary and Config Device
constructor
- Parameters:
macroserverpools (
nxsrecconfig.MacroServerPools.MacroServerPools
) – MacroServerPools objectversion (
str
) – selector versiondefaultpath (
str
) – default dynamic component pathdefaultpath – default dynamic component path
defaulttimezone (
str
) – default time zonedefaultmntgrp (
str
) – default measurement group name
- configCommand(command, *var)[source]¶
executes command on configuration server
- Parameters:
command (
str
) – command namevar ([ any ]) – parameter list
- Returns:
command result
- Return type:
any
- getScanEnvVariables()[source]¶
gets Scan Environment Data
- Returns:
JSON String with important variables
- Return type:
- preselect()[source]¶
updates active state of preselected components
- Brief:
It provides new group of preselected components
- resetPreselectedComponents(components)[source]¶
resets preselected components to set of given components
- setConfigInstance()[source]¶
sets config instances
- Returns:
set config instance
- Return type:
tango.DeviceProxy
ornxsconfigserver.XMLConfigurator.XMLConfigurator
nxsrecconfig.Settings module¶
NeXus Sardana Recorder Settings implementation
- class nxsrecconfig.Settings.Settings(server=None, numberofthreads=None, defaultnexuspath=None, defaulttimezone=None, defaultmntgrp=None, syncsnapshot=False, writepoolmotorpositions=False, defaultnexustype=None, defaultudatapath=None)[source]¶
Bases:
object
NeXus Sardana Recorder settings
contructor
- Parameters:
server (
nxsrecconfig.NXSConfig.NXSRecSelector
) – NXSRecSelector servernumberofthreads (
str
) – number of threads used to check device statedefaultnexuspath (
str
) – default dynamic component pathsyncsnapshot (
bool
) – preselection merges current ScanSnapshotwritepoolmotorpositions (
bool
) – add dynamic components for all pool motor positionsdefaultnexustype (
str
) – default dynamic component nexus typedefaultudatapath (
str
) – default user data dynamic component path
- componentDescription()[source]¶
provides description of all components
- Returns:
JSON string with description of all components
- Return type:
- createDataSources(datasources)[source]¶
describe datasources
- Parameters:
datasources (
str
) – JSON dictionary with {dsname
:tangosource
, …}
- createWriterConfiguration(cps)[source]¶
create configuration and clean stepdatasources and linkdatasources
- fullDeviceNames()[source]¶
provides full names of pool devices
- Returns:
JSON string with full names of pool devices
- Return type:
- isMntGrpUpdated()[source]¶
check if active measurement group was changed
- Returns:
True if it is different to the current setting
- Return type:
- mntGrpConfiguration()[source]¶
provides configuration of mntgrp
- Returns:
string with mntgrp configuration
- Return type:
- removeDynamicComponent(name)[source]¶
removes dynamic component
- Parameters:
name (
str
) – dynamic component name
- property scanDir¶
the json data string
- scanEnvVariables()[source]¶
gets Scan Environment Data
- Returns:
JSON String with important variables
- Return type:
- selectedDataSources()[source]¶
provides selected datasources
- Returns:
list of available selected datasources
- setScanEnvVariables(jdata)[source]¶
sets Scan Environment Data
- Parameters:
jdata (
str
) – JSON String with important variables
- switchProfile(toActive=True)[source]¶
switch to active measurement
- Parameters:
toActive (
bool
) – if False update the current profile
- updateConfigVariables()[source]¶
sends ConfigVariables into ConfigServer and updates serialno if appendEntry selected
- updateMntGrp()[source]¶
set active measurement group from components
- Returns:
string with mntgrp configuration
- Return type:
- updateProfile()[source]¶
update profile and measurement group
- Returns:
string with mntgrp configuration
- Return type:
- value(name)[source]¶
provides values of the required variable
- Parameters:
name (
str
) – name of the required variable- Returns:
values of the required variable
- Return type:
any
nxsrecconfig.StreamSet module¶
labels to Tango Streams
- class nxsrecconfig.StreamSet.StreamSet(streams)[source]¶
Bases:
object
streamset constractor
- Parameters:
streams (
StreamSet
ortango.LatestDeviceImpl
) – tango-like steamset class
- log_debug¶
(
tango.log4tango.TangoStream
) Tango debug log stream
- log_error¶
(
tango.log4tango.TangoStream
) Tango error log stream
- log_fatal¶
(
tango.log4tango.TangoStream
) Tango fatal log stream
- log_info¶
(
tango.log4tango.TangoStream
) Tango info log stream
- log_warn¶
(
tango.log4tango.TangoStream
) Tango warn log stream
nxsrecconfig.Utils module¶
Tango Utilities
- class nxsrecconfig.Utils.MSUtils[source]¶
Bases:
object
MacroServer Utilities
- classmethod getMacroServer(db, door, find=True)[source]¶
provides macro server of given door
- Parameters:
db (
tango.Database
) – tango databasedoor (
str
) – given doorfind (
bool
) – find new macroserver if door does not exist
- Returns:
first MacroServer of the given door
- Return type:
- exception nxsrecconfig.Utils.OldTangoError[source]¶
Bases:
Exception
Old Tango version Exception class
- nxsrecconfig.Utils.PYTG_BUG_213 = False¶
(
bool
) tango bug #213 flag related to EncodedAttributes in python3
- class nxsrecconfig.Utils.PoolUtils[source]¶
Bases:
object
Pool Utilities
- classmethod getDeviceControllers(pools, devices=None)[source]¶
provides device controller full names
- classmethod getElementNames(pools, listattr, typefilter=None)[source]¶
provides experimental Channels
- classmethod getMntGrpName(pools, alias)[source]¶
find measurement group name from alias
- Parameters:
pools (
list
<tango.DeviceProxy
>) – list of pool devicesalias (
str
) – mntgrp alias
- Returns:
full name of the measurement group alias
- Return type:
- class nxsrecconfig.Utils.TangoUtils[source]¶
Bases:
object
Tango Utilities
- classmethod command(server, command, *var)[source]¶
executes command on server on python package
- Parameters:
server (
tango.DeviceProxy
ornxsconfigserver.XMLConfigurator.XMLConfigurator
) – tango server name or package namecommand (
str
) – command namevar ([ any ]) – command variable list
- Returns:
command result
- Return type:
any
- classmethod getDeviceName(db, cname)[source]¶
finds device of give class
- Parameters:
db (
tango.DeviceProxy
) – tango databasecname (
str
) – device class name
- Returns:
device name if exists
- Return type:
- classmethod getFullAttrName(source, fqdn=False)[source]¶
provides tango device full name with host and port
- classmethod getProxies(names)[source]¶
provides proxies of given device names
- Parameters:
- Returns:
list of device DeviceProxies
- Return type:
- classmethod openProxy(device, counter=1000)[source]¶
opens device proxy of the given device
- Parameters:
device (
str
) – device name- Returns:
DeviceProxy of device
- Return type:
- tTnp = {tango._tango.CmdArgType.DevBoolean: 'bool', tango._tango.CmdArgType.DevShort: 'int16', tango._tango.CmdArgType.DevLong: 'int32', tango._tango.CmdArgType.DevFloat: 'float32', tango._tango.CmdArgType.DevDouble: 'float64', tango._tango.CmdArgType.DevUShort: 'uint16', tango._tango.CmdArgType.DevULong: 'uint32', tango._tango.CmdArgType.DevString: 'string', tango._tango.CmdArgType.DevUChar: 'uint8', tango._tango.CmdArgType.DevLong64: 'int64', tango._tango.CmdArgType.DevULong64: 'uint64', tango._tango.CmdArgType.DevEncoded: 'encoded'}¶
(
dict
<tango.CmdArgType
,str
>) map of Tango:Numpy types
- classmethod wait(proxy, counter=100, state='RUNNING')[source]¶
waits for device proxy not running
- Parameters:
proxy (
tango.DeviceProxy
) – device proxy- Returns:
if proxy device ready
- Return type:
- class nxsrecconfig.Utils.Utils[source]¶
Bases:
object
Miscellaneous Utilities
- classmethod getRecord(node)[source]¶
provides datasource record from xml dom node
- Parameters:
node (
lxml.etree.Element
) – xml DOM node- Returns:
datasource record
- Return type:
- classmethod getText(node)[source]¶
collects text from text child nodes
- Parameters:
node (
xml.etree.ElementTree.Element
) – parent node
- classmethod pickleloads(bytestr)[source]¶
loads pickle byte string :param bytestr: byte string to convert :type bytesstr:
bytes
:returns: loaded bytestring :rtype:any
Module contents¶
NeXus Sardana Recorder Settings - Tango Server