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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Parsing problem with stream |
From: | Florian Feldbauer <[email protected]> |
To: | "Lucock, Richard M" <[email protected]>, [email protected] |
Date: | Mon, 4 Jun 2018 16:51:22 +0200 |
Hey Richard, I actually do not know, why your second solution is not working.
I have a device with a similar protocol where I use this approach
and it works. Anyhow. You could use your first solution, but exclude the ACK from the checksum with the width/precision flags. From the documentation: > The width field is the byte number from which to
start
calculating the checksum.
Default is 0, i.e. the first byte of the input or output of the
current
command.
The last byte is precision bytes before the checksum
(default 0).
For example in So in your case you could use: in ACK, STX, "001 f%[^\003]", ETX, "%1<xor8ff>";
Hope this helps! Florian On 06/04/2018 04:30 PM, Lucock, Richard
M wrote:
Hi, -- ---------------------------------------- | Dr. Florian Feldbauer | | | | Ruhr-Universität Bochum | | Experimentalphysik I AG | | Universitätsstr 150 | | D-44801 Bochum | | | | Office: NB 2/134 | | Phone: (+49)234 / 32-23563 | ---------------------------------------- |