Experimental Physics and Industrial Control System
|
Others have dealt with the original question, but I’d like to add a followup.Conversion strings like the one shown in the original message are unsafe and should never be used. They can lead to buffer overflows and weird IOC behaviour. The capacity of the destination buffer should always be specified. Here, from the ASYN streamSCPI template, are the ’short’ and ‘long’ string versions of records to read SCPI identification strings:
record(stringin, "$(P)$(R)IDN") field(DESC, "SCPI identification string") field(INP, "@dev_NAME_.proto getIDN(39) $(PORT) $(A)") record(waveform, "$(P)$(R)IDNwf") field(DESC, "SCPI identification string") field(INP, "@dev_NAME_.proto getIDN(199) $(PORT) $(A)")
Hi all, I have a .db e .proto made in this way:
.db record(lsi, "RF:getString") { field(DESC, "String more than 40 chars") field(SIZV, "80") field(INP, "@MDO.proto getString L0") field(SCAN, ".2 second") }
.proto getString { out "STT?"; in "%s"; }
I want to get a String that is more than 40 characters, and I use a lsi record but I got always 40 chars. There is something wrong in my code? Thank you
-- Eric Norum [email protected] “Ah, the chance to be pedantic first thing on a Monday morning — what a great way to start the week."
|
- Replies:
- Re: lsi record for more than 40 characters doesn't work Zimoch Dirk (PSI) via Core-talk
- Navigate by Date:
- Prev:
Re: lsi record for more than 40 characters doesn't work Ralph Lange via Core-talk
- Next:
Re: lsi record for more than 40 characters doesn't work Zimoch Dirk (PSI) via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
<2019>
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: lsi record for more than 40 characters doesn't work Ralph Lange via Core-talk
- Next:
Re: lsi record for more than 40 characters doesn't work Zimoch Dirk (PSI) via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
<2019>
2020
2021
2022
2023
2024
|
ANJ, 02 Dec 2019 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|