EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: FLNK length limit
From: "Johnson, Andrew N." <[email protected]>
To: "J. Lewis Muir" <[email protected]>
Cc: EPICS Tech Talk <[email protected]>
Date: Fri, 9 Feb 2018 19:34:44 +0000
Hi Lewis,

On Feb 9, 2018, at 10:44 AM, J. Lewis Muir <[email protected]> wrote:

Andrew answered a similar question in 2006 in:

 https://epics.anl.gov/tech-talk/2006/msg01310.php

There he said:

 I would also suggest that you try *really* hard to limit your record
 names to the maximum recommended 28 characters.  You *can* make them
 longer (up to 60 characters), but until the EPICS 40 character string
 length limit goes away (which means until the Channel Access protocol
 gets revised and the database and all of the tools are modified to use
 variable length strings) using longer names *will* end up causing you
 difficulties.

Since it's 2018 now, all those modifications have occurred, right?

Effectively yes, since we can now get/put string fields as char arrays. This didn’t actually require changes to the CA wire protocol and we don't now plan to ever enlarge the Channel Access 40 character DBF_STRING type.

In the same post, Andrew went on to say:

 Why is the recommended limit only 28 characters?  Well if you want to
 change a link field via Channel Access you only have 40 characters to
 hold the complete link value, and as well as the record name the link
 might need dot field name (5 chars with the standard record types) and
 the flags NPP/PP/CA/CP/CPP and NMS/MS which will need another 7 chars
 (you can omit the space between them if necessary, but not the one
 that terminates the field name).  That leaves just 28 characters for
 the name, and yes I am allowed to leave the terminating \0 byte out of
 that calculation.

Applying the same logic to allow for the dot, field name, and flags,
would make for a new effective *record name* length limit of 48 (60 -
12) characters.

No, the record name length is the independent variable and is currently 60 chars plus the nil terminator. Your 60-12 calculation would only apply if it was the size of CA’s DBF_STRING type we were changing to 60, but inside the IOC we can make string fields any size we like (if you look at the mbb* records the **ST fields are now all 26 characters long for example, because the internal dbAccess API supports enum strings up to that size, although CA only transports up to 16 characters). The CA protocol allows channel names to be any length, but there is probably a limit if you get too close to the maximum UDP packet size though.

However, with support for writing a link field over
Channel Access as a byte waveform, I do not need to allow for the dot,
field name, and flags anymore.  So, the effective *record name* length
limit is still 60 characters (excluding the terminating null character).
The byte waveform written over Channel Access to a link field could be
72 characters (or more if there are spaces between the flags).  All
correct?

Yes, although I prefer the term “char array” to “waveform” which is the name of a record type with an array as its VAL field.

Note that in earlier Base versions there is still a limit to the size of string you can put to a link field, which matters when you’re adding JSON field modifiers to the link address text – in 3.14.12 it’s 80 characters, 3.15.5 allows up to 256 characters. From 3.16 that fixed size buffer has gone away though.

HTH,

- Andrew


References:
FLNK length limit Hinko Kocevar
Re: FLNK length limit Kasemir, Kay
Re: FLNK length limit J. Lewis Muir

Navigate by Date:
Prev: Re: AreaDetector repository inconsistent Mooney, Tim M.
Next: Re: cross-compiling for ppc64 with seq 2.1 and 2.2 Jeong Han Lee
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: FLNK length limit J. Lewis Muir
Next: Question about values of historic PVs dislpayed in CSS XY Graph widget lzf neu
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
ANJ, 10 Feb 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·