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  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  2025  <2026 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  <2026
<== Date ==> <== Thread ==>

Subject: Question About Calculating Checksum in a StreamDevice Protocol
From: Huishan via Tech-talk <tech-talk at aps.anl.gov>
To: tech-talk at aps.anl.gov
Date: Mon, 29 Jun 2026 12:17:07 +0800

Hello everyone,

    I have a question about writing a StreamDevice protocol for the following command: 55 AA 05 04 byte1 byte2 byte3.

    The last three bytes of the command need to change dynamically. The first two bytes represent the current value in hexadecimal format. The third byte is a checksum, which is calculated by adding 0x05, 0x04, byte1, and byte2 using hexadecimal addition.Is there a way to have the checksum calculated automatically in a StreamDevice protocol? If so, what should I use in the protocol file as a placeholder for the calculated value?

    If StreamDevice doesn't support calculations like this, does that mean I have to calculate the checksum manually every time before sending the command?

    Any suggestions or examples would be greatly appreciated.Thank you!

                                                                                                                         Huishan                                                                                                                                      


Replies:
Re: Question About Calculating Checksum in a StreamDevice Protocol Zimoch, Dirk via Tech-talk

Navigate by Date:
Prev: Re: Problems with Dante (XGLab) Driver Mark Rivers via Tech-talk
Next: Re: EPICS support for Fastech motors Torsten Bögershausen via Tech-talk
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  <2026
Navigate by Thread:
Prev: Re: RFC: add a mechanism to call epicsExit when signals are received Michael Davidsaver via Tech-talk
Next: Re: Question About Calculating Checksum in a StreamDevice Protocol Zimoch, Dirk via Tech-talk
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  <2026
ANJ, 29 Jun 2026 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·