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  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: stream device string/hex parsing
From: Dirk Zimoch <[email protected]>
To: Gerrit Kühn <[email protected]>
Cc: [email protected], [email protected]
Date: Thu, 26 Jul 2012 17:55:55 +0200
Hi Gerrit,

I would not use extrainput=Ignore except when absolutely necessary, because this may hide some errors with incomplete input strings (e.g. because of bad connections).

Better ignore a known number of digits after your payload like
%*5c%4x%*30x

Even better do not ignore the checksum but check it. What is the checksum algorithm? (sum of all bytes)&0xff as 2 hex digits? See the %<> formats.

Dirk


Gerrit Kühn wrote:
On Mon, 9 Jul 2012 17:19:25 +0000 <[email protected]> wrote about RE:
stream device string/hex parsing:

Peter,

POAU> Have you set
POAU> extrainput = Ignore; POAU> In your protocol file?

No, I did not recognize that this was needed, because matching %4c instead
of %4x worked fine.
But you are right, extrainput=ignore fixed the issue, also matching the
rest of the string by %s makes it work. Thanks!

POAU> Even so a better strategy would be to use redirection:

Yes, that's already on my list of improvements to try out. I just wanted
to get the "most simple" solution to work first, before trying something
more sophisticated. Anyway, thanks for the hint.


cu
  Gerrit



Replies:
Re: stream device string/hex parsing Gerrit Kühn
References:
stream device string/hex parsing Gerrit Kühn
RE: stream device string/hex parsing peter.owens
Re: stream device string/hex parsing Gerrit Kühn

Navigate by Date:
Prev: RE: asynPortDriver Szalata, Zenon M.
Next: waveform display John Dobbins
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: stream device string/hex parsing Gerrit Kühn
Next: Re: stream device string/hex parsing Gerrit Kühn
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·