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: hex stream processing with StreamDevice? |
From: | Dirk Zimoch <[email protected]> |
To: | Mark Rivers <[email protected]> |
Cc: | "Barker, Alan M." <[email protected]>, [email protected] |
Date: | Thu, 19 Aug 2010 17:09:56 +0200 |
Alan,
You may be able to do everything by just writing a streamDevice protocol
file. streamDevice can calculate a number of CRCs, it can build and
parse strings, etc.
For example, here is a simple protocol file for an Alcatel pressure gauge:
InTerminator = CR LF; ENQ = \005; ACK = \006;
readPressure { out "PR1\r\n"; in "\${ACK}"; out "\${ENQ}"; in "%*d, %f"; }
Mark, StreamDevice understands ACK and ENQ.
readPressure { out "PR1\r\n"; in ACK; out ENQ; in "%*d, %f"; }