add_attribute : it is possible to use non compiant attribute names

with add_attribute() it is possible to create dynamic attributes with non compliant names,
for example A-B.01 . (By the way pogo forbids to creata a static attribute with that name).

In python it is possible to read the dynamic attribute with
my_mval = device.read_attrbute("A-B.01").value

but not with:

my_val = device.A-B.01 #illegal in python

Same for writing.

The formal specification for Attribute name is:

attribute-name = ALPHA *254acceptable-char
acceptable-char = ALPHA / DIGIT / underscore
underscore = %x5F

I think this a topic that should be clarified.
Hi Claudio

Good question, but I'm not sure where you want the clarification. Are you asking why PyTango and cppTango allows creation of dynamic attributes with names that differ from the formal (RFC) specification?

I think the RFC specification defines attribute names that are expected to work with all the kernel software and other tools in the Tango ecosystem (e.g., cpptango, pytango, jtango, tango database, jive, taurus, etc.). As you show, not all software validates the names against this specification.

Attribute names should adhere to the RFC spec as Anton pointed out. Unfortunately existing packages don't validate the attribute names, but you should expect future versions to reject invalid atribute names.
Register or login to create to post a reply.