EPICS Home

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: record field max length?
From: "Johnson, Andrew N. via Tech-talk" <[email protected]>
To: William Kirstaedter <[email protected]>, "[email protected] Talk" <[email protected]>
Date: Wed, 12 Dec 2018 16:29:38 +0000
On 12/12/18 8:59 AM, William Kirstaedter via Tech-talk wrote:
Short Question:

Whats the maximum length of a record field? how many chars?

record(ai,"record_name"){

    field(DESC, "I_mean_this")
    field(INP, "how_long_can_this_be")

}
Longer answer:

That depends on the field definition for the record type. DESC is defined in dbCommon.dbd  (a kind of super-class used by all record types) as:
        field(DESC,DBF_STRING) {
                prompt("Descriptor")
                promptgroup("10 - Common")
                size(41)
        }
That means it's a DBF_STRING and the size() entry says it can hold up to 41 characters, but there must be a zero-byte terminator so the limit is really 40 (which matches the Channel Access dbr_string_t typedef).

For something like the ZRST field of the mbbi record which defines an enumeration string, the size is given as 26 which is the size of the enumeration strings that Channel Access can send in a struct dbr_gr_enum.

An INP or OUT field is a link and for these the maximum length depends on the version of EPICS you're running; it might be 40 for older versions, 80, 256 for some or unlimited for EPICS-7.

HTH,

- Andrew
-- 
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon

Replies:
Re: record field max length? William Kirstaedter via Tech-talk
References:
record field max length? William Kirstaedter via Tech-talk

Navigate by Date:
Prev: Re: record field max length? Miguel Astrain Etxezarreta via Tech-talk
Next: motor R6-11 released Peterson, Kevin M. via Tech-talk
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: record field max length? Miguel Astrain Etxezarreta via Tech-talk
Next: Re: record field max length? William Kirstaedter via Tech-talk
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