fioblisswriter package¶
Submodules¶
fioblisswriter.FIOFile module¶
Provides the access to a database with NDTS configuration files
- class fioblisswriter.FIOFile.FIOFile(scan, fpath, streams, skip_final_parameters=False, max_string_parameter_size=300, snapshot_blacklist=None, max_write_interval=1)[source]¶
Bases:
objectconstructor
- Parameters:
scan (
blissdata.redis_engine.scan.Scan) – blissdata scanfpath (
pathlib.Path) – nexus file pathstreams (
StreamSetortango.LatestDeviceImpl) – tango-like steamset classmax_write_interval (
int) – max write interval
- property channels¶
- property labels¶
- fioblisswriter.FIOFile.create_fio_file(scan, streams, skip_final_parameters=False, max_string_parameter_size=300, snapshot_blacklist=None)[source]¶
open fio file
- Parameters:
scan (
blissdata.redis_engine.scan.Scan) – blissdata scanstreams (
StreamSetortango.LatestDeviceImpl) – tango-like steamset class
- Returns:
nexus file object
- Return type:
fioblisswriter.Release module¶
release version module
fioblisswriter.FIOBlissWriter module¶
FIO Bliss Writer
FIO Bliss Writer stores (meta)data from blissdata provided by FIODataWriter
- class fioblisswriter.FIOBlissWriter.FIOBlissWriter(cl, name)[source]¶
Bases:
DeviceFIO Bliss Writer stores (meta)data from blissdata provided by FIODataWriter
Properties:
- Device Property
- RedisUrl
Dlissdata redis url
Type:’str’
- Session
session to be recorder
Type:’str’
- NextScanTimeout
timeout for next scan writing
Type:’int’
- SkipFinalParameters
do not store parameters with the FINAL strategy
Type:’bool’
- MaxStringParameterSize
maximal value size of string parameters
Type:’int’
- SnapshotBlacklist
a list of snapshot keys to skip
Type:’DevVarStringArray’
- PointSleepTime
sleep time between write_point command calls
Type:’float’
- MaxStringParameterSize¶
maximal value size of string parameters
- NextScanTimeout¶
timeout for next scan writing
- PointSleepTime¶
sleep time between write_point command calls
- RedisUrl¶
Blissdata redis url
- Session¶
session to be recorder
- SkipFinalParameters¶
do not store parameters with the FINAL strategy
- SnapshotBlacklist¶
a list of snapshot keys to skip
- Start()[source]¶
‘Start’ TANGO command
- Parameters:
arg (DevVoid) – (not documented)
- Returns:
(not documented)
- Return type:
DevVoid
- Stop()[source]¶
‘Stop’ TANGO command
- Parameters:
arg (DevVoid) – (not documented)
- Returns:
(not documented)
- Return type:
DevVoid
- TangoClassClass¶
alias of
FIOBlissWriterClass
- TangoClassName = 'FIOBlissWriter'¶
- 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:
- Raises:
DevFailed – If it is necessary to read attribute(s) and a problem occurs during the reading
fioblisswriter.FIOWriterService module¶
Provides the access to a database with NDTS configuration files
- class fioblisswriter.FIOWriterService.FIOWriterService(redis_url, session, next_scan_timeout, skip_final_parameters=False, max_string_parameter_size=300, snapshot_blacklist=None, point_sleep_time=0.01, server=None)[source]¶
Bases:
objectconstructor
- Parameters:
redis_url (
str) – blissdata redis urlsession (
str) – blissdata session namenext_scan_timeout (
int) – timeout between the scans in secondsskip_final_parameters (
bool) – skip final parametersmax_string_parameter_size (
int) – maximal string parameter sizepoint_sleep_time (
float) – sleep time between write point callsserver (
tango.LatestDeviceImpl) – NXSConfigServer instance
Module contents¶
Implementation of FIO Blissdata writer Server
- fioblisswriter.run(classes, args=None, msg_stream=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, verbose=False, util=None, event_loop=None, pre_init_callback=None, post_init_callback=None, green_mode=None, raises=False, err_stream=<_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>)[source]¶
Provides a simple way to run a tango server. It handles exceptions by writting a message to the msg_stream.
- Examples:
Example 1: registering and running a PowerSupply inheriting from
Device:from tango.server import Device, run class PowerSupply(Device): pass run((PowerSupply,))
Example 2: registering and running a MyServer defined by tango classes MyServerClass and MyServer:
from tango import Device_4Impl, DeviceClass from tango.server import run class MyServer(Device_4Impl): pass class MyServerClass(DeviceClass): pass run({'MyServer': (MyServerClass, MyServer)})
Example 3: registering and running a MyServer defined by tango classes MyServerClass and MyServer:
from tango import Device_4Impl, DeviceClass from tango.server import Device, run class PowerSupply(Device): pass class MyServer(Device_4Impl): pass class MyServerClass(DeviceClass): pass run([PowerSupply, [MyServerClass, MyServer]]) # or: run({'MyServer': (MyServerClass, MyServer)})
Note
the order of registration of tango classes defines the order tango uses to initialize the corresponding devices. if using a dictionary as argument for classes be aware that the order of registration becomes arbitrary. If you need a predefined order use a sequence or an OrderedDict.
- Parameters:
classes (Sequence[tango.server.Device] | dict) –
Defines for which Tango Device Classes the server will run. If
dictis provided, it’s key is the tango class name and value is either:two element sequence:DeviceClass,DeviceImplargs (list) – list of command line arguments [default: None, meaning use sys.argv]
msg_stream – stream where to put messages [default: sys.stdout]
util (
Util) – PyTango Util object [default: None meaning create a Util instance]event_loop (callable) – event_loop callable
pre_init_callback (callable or tuple) – an optional callback that is executed between the calls Util.init and Util.server_init The optional pre_init_callback can be a callable (without arguments) or a tuple where the first element is the callable, the second is a list of arguments (optional) and the third is a dictionary of keyword arguments (also optional).
post_init_callback (callable or tuple) – an optional callback that is executed between the calls Util.server_init and Util.server_run The optional post_init_callback can be a callable (without arguments) or a tuple where the first element is the callable, the second is a list of arguments (optional) and the third is a dictionary of keyword arguments (also optional).
raises (bool) – Disable error handling and propagate exceptions from the server
err_stream – stream where to put catched exceptions [default: sys.stderr]
- Returns:
The Util singleton object
- Return type:
New in version 8.1.2.
Changed in version 8.1.4: when classes argument is a sequence, the items can also be a sequence <TangoClass, TangoClassClass>[, tango class name]
Changed in version 9.2.2: raises argument has been added
Changed in version 9.5.0: pre_init_callback argument has been added
Changed in version 10.0.0: err_stream argument has been added