Panic-The Alba Alarm System

Hi,

This same "issue" has been resolved in other fandango-related packages like SimulatorDS

I can patch this parsing of dots in device names … but my question is, Does Tango support dots in device names?

As far as I remember, some versions of Jive had serious problems writing/reading properties whenever there was dots in the names. I think it was caused by dots being wildcards on regular expressions.

Sergi
Keep on dancing,

http://www.tango-controls.org/resources/howto/how-fandango/
Hi Piotr,

Actually, the problem is another one. TangoEval should be using the regexp as defined in fandango.tango.defaults; that were already modified to allow dots on names.

I'll push the change to develop on github so it can be tested,

Sergi


pgoryl
Hi,
Unfortunately, it looks like it is a way TangoEval deals with dots in names, at this moment.
Looking through fandango code, "parse_variables" is accepting only alphanumeric (a-zA-Z0-9-_) for device name parts.

Fortunately, It seems that it is enough to extend a regex in the line:
redev = '(?P<device>(?:'+alnum+':[0-9]+/{1,2})?(?:'+'/'.join([alnum]*3)+'))'
.
To:
redev = '(?P<device>(?:'+alnum+':[0-9]+/{1,2})?(?:'+'/'.join([alnum]*3)+'(?:\.[0-9]+)?))'

in fandandgo/tango/defaults.py and tangoeval.py

I will prepare a related pull request for fandango.
Keep on dancing,

http://www.tango-controls.org/resources/howto/how-fandango/
Hi Sergi,

At SOLEIL, the dots in device names are widely used. I don't remember experiencing any issues with it, neither with jive or any other tango client.

Cheers,

Gwen.
Thanks for your answers
Like gwen says at SOLEIL we have many devices with dot and i really want finish my test with a good conclusion to encourage IT Group to put PANIC in control room smile

Other question i test fomula like this
any( [ v > 0.9*t for v, t in zip( FIND( test/FC/TC*/Value ), FIND( test/FC TC*/Threshold))])
and it works well but. is it possible to do the same things for ACTION ? (write multiple attribute devices or send command to many devices ex: close all the FrontEnd).
Hi,

With the last release of fandango from github/pip you should have no problem with dots in names anymore.

The feature of allowing wildcards on actions is easy to add … but to me it seems too dangerous, as any new device created for other purpose could match an existing regexp and trigger unexpected behaviours.

If you don't want to have actions so long, you can use the PyAlarm.Phonebook class property, write there the aliases for your actions and then join them in the alarm declaration.

%ACTION1: …write_attribute1…
%ACTION2: …ex_command…
%ACTION3: …write attr2 and attr3 …

AlarmReceivers = %ACTION1, %ACTION2, %ACTION3


Sergi Rubio
Keep on dancing,

http://www.tango-controls.org/resources/howto/how-fandango/
Hi,
I have a problem with PyTango and PANIC.
There isn't python module _tango.
Edited 3 years ago
Salvo
Hi,
I have a problem with PyTango and PANIC.
There isn't python module _tango.

Sorry, I resolved it
Hi Salvo,

It seems a problem of paths when importing PyTango, could you confirm it?

Sergi
Keep on dancing,

http://www.tango-controls.org/resources/howto/how-fandango/
sergi_rubio
Hi Salvo,

It seems a problem of paths when importing PyTango, could you confirm it?

Sergi
Hi,
I confirm it
 
Register or login to create to post a reply.