DiamondLightSource / FastCS

Control system agnostic framework for building Device support in Python that will work for both EPICS and Tango
Apache License 2.0
1 stars 2 forks source link

Prevent truncation of EPICS PVs #15

Open GDYendell opened 8 months ago

GDYendell commented 8 months ago

It is easy when generating Attributes programmatically for the generated PVs to be too long and get truncated. I think the limit is 60 characters.

It would be good to define some logic to truncate the names in a sane way, ensuring the _RBV is preserved. This could be by truncating each individual word, removing vowels, or many other options. ADGeniCam does the former.

It might also show a warning to suggest to the developer that the name should be shortened in a way specific to the naming structure for the device.

GDYendell commented 8 months ago

@marcelldls do you know if there is a similar limit in Tango? I imagine if there is is it a much bigger number.

marcelldls commented 8 months ago

A tango attribute has a full name with the following schema: domain/family/member/attribute and according to https://tango-controls.readthedocs.io/en/latest/development/general-guidelines/naming.html the limits are 85/85/85/??. An alias can be defined to a maximum of 255 characters... I cant find specifically what the maximum attribute length is but I can ask in the Tango controls slack when I get added