1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 <2014> 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 | 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 2018 2019 2020 2021 2022 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: Does the record type lsi support a long string longer than 40 bytes? |
From: | Yun Sangwon <[email protected]> |
To: | "Mooney, Tim M." <[email protected]>, "[email protected]" <[email protected]>, "[email protected]" <[email protected]> |
Date: | Mon, 15 Sep 2014 15:14:37 +0000 |
Dear Tim and Nick, Thank you so much. Through using ‘$’ and ‘-S’ option, I could read/write a long string as following: // 50 bytes $ caput -S my:lso.VAL$ 12345678901234567890123456789012345678901234567890 Old : my:lso.VAL$
New : my:lso.VAL$ 12345678901234567890123456789012345678901234567890 $ caget -S my:lso.VAL$ my:lso.VAL$ 12345678901234567890123456789012345678901234567890 // OK For the information, 1)
In case of other usages for the long string record $ caget my:lso my:lso 123456789012345678901234567890123456789 $ caget -S my:lso my:lso 123456789012345678901234567890123456789 $ caget my:lso.VAL my:lso.VAL 123456789012345678901234567890123456789 $ caget my:lso.VAL$ my:lso.VAL$ 64 49 50 51 52 53 54 55 56 57 48 49 50 51 52 53 54 55 56 57 48 49 50 51 52 53 54 55 56 57 48 49 50 51 52 53 54 55 56 57 48 49 50 51 52 53 54 55 56 57 48 0 0 0 0 0 0 0 0
0 0 0 0 0 0 2)
In case of a waveform record $ caput -S my:wave 12345678901234567890123456789012345678901234567890 Old : my:wave \003 New : my:wave 12345678901234567890123456789012345678901234567890 $ caget -S my:wave my:wave 12345678901234567890123456789012345678901234567890 $ caget my:wave my:wave 64 49 50 51 52 53 54 55 56 57 48 49 50 51 52 53 54 55 56 57 48 49 50 51 52 53 54 55 56 57 48 49 50 51 52 53 54 55 56 57 48 49 50 51 52 53 54 55 56 57 48 0 0 0 0 0 0 0 0 0 0
0 0 0 0 3)
A record of the lso record type record (lso, "$(user):lso") { field (DESC, "Long String Output Test") field (FLNK, "$(user):lsi") field (SIZV, "64") } In this case, I think the waveform is easier than the lsi or lso. Thanks again. Regards, Sangwon From: Mooney, Tim M. [mailto:[email protected]]
You have to append '$' to the PV name of a long string, so everybody knows to treat it as an array of characters. Tim Mooney ([email protected]) (630)252-5417 From:
[email protected] [[email protected]] on behalf of Yun Sangwon [[email protected]] Dear Nick, Thanks for your kind reply. For your information, in my case the result of caput with –S option for a lso record is same as below: $ caput -S my:lso 12345 Old : myt:lso
New : my:lso $ caget -S my:lso my:lso
Regards, Sangwon From:
[email protected] [mailto:[email protected]]
Hi Sangwon, I think you need the –S option, not the –a option to caput. caput –h describes the –S option as: -S: Put string as an array of char (long string) Cheers, Nick Rees Principal Software Engineer Phone: +44 (0)1235-778430 Diamond Light Source Fax: +44 (0)1235-446713 From: Yun Sangwon [mailto:[email protected]]
Dear All, I understand new record types such as printf, lsi and lso are added in EPICS v3.15. So, I’m considering to use the record type lsi (long string input) to store a string value longer than 40 bytes. But in my test case, it seems that maximum length supported by lsi is 40 bytes including ‘\0’ as the string record type. $ caput my:lsiout 12345678901234567890123456789012345678901234567890 Old : my:lsiout New : my:lsiout 123456789012345678901234567890123456789 $ caput -a my:lsiout 3 1 2 3 Old : my:lsiout New : my:lsiout Does the record type lsi support a long string longer than 40 bytes? If so, how can I read and write a long string value to a lsi record? If not, could anyone let me know the difference between lsi and stringin and any suggestion for my purpose? Thanks in advance. Sangwon -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee
please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. |