Experimental Physics and Industrial Control System
|
FWIW, I use the following sscanf format for reading IDN strings: %39
[^\r\n]
This shares the advantage of %39c in that it will not overflow an
EPICS string variable and also trims any trailing linefeed or
carriage return characters -- useful for GPIB devices which use the
EOI line to mark the end of a message.
On May 14, 2007, at 6:30 AM, Dirk Zimoch wrote:
Hi,
The %c and %s input formats work like in scanf (the implementation
actually use sscanf). Thus, %s stops reading at the first
whitespace. This is probably not what you want. %39c only stops
reading after 39 characters or at end of string. For more
information see the manual pages for scanf.
--
Eric Norum <[email protected]>
Advanced Photon Source
Argonne National Laboratory
(630) 252-4793
- References:
- Re: problem using streams with asyn for Agilent E5810A Ethernet->GPIB Rodney R. Porter
- Re: problem using streams with asyn for Agilent E5810A Ethernet->GPIB Dirk Zimoch
- Navigate by Date:
- Prev:
Re: problem using streams with asyn for Agilent E5810A Ethernet->GPIB Dirk Zimoch
- Next:
RE: problem using streams with asyn for Agilent E5810A Ethernet->GPIB Denison, PN (Peter)
- 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
- Navigate by Thread:
- Prev:
Re: problem using streams with asyn for Agilent E5810A Ethernet->GPIB Dirk Zimoch
- Next:
RE: problem using streams with asyn for Agilent E5810A Ethernet->GPIB Denison, PN (Peter)
- 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
|
ANJ, 10 Nov 2011 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|