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: | NORD on a char waveform record |
From: | Thomas Willemsen - UKRI STFC via Tech-talk <tech-talk at aps.anl.gov> |
To: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Tue, 3 Mar 2020 13:05:50 +0000 |
Hi, We have recently updated several support modules, including streamdevice, and have noticed the following change in behaviour: We have a device whose stream device protocol file looks like: InTerminator = CR; OutTerminator = CR; get_MEASUREMENTS { out "MM,1111111111111111"; in "MM,1111111111111111%s"; } Linked to a record that looks like: record(waveform, "$(P)STATUS:RAW") { field(DTYP, "stream") field(FTVL, "CHAR") field(NELM, "512") field(INP, "@kynctm3k.proto get_MEASUREMENTS $(PORT)") field(SCAN, "1 second") } The messages to and from the device look as follows: 2020/03/03 11:55:09.948 localhost:52209 write 20 MM,1111111111111111\r 2020/03/03 11:55:09.951 localhost:52209 read 164 MM,1111111111111111,+FFFFFFF,+004.000,-FFFFFFF,+008.000,-FFFFFFF,+012.000,+FFFFFFF,+016.000,+FFFFFFF,+020.000,-FFFFFFF,+024.000,+FFFFFFF,+028.000,-FFFFFFF,+032.000\r Under streamdevice 2.5.10, this sets the NORD field of the waveform to 144. Under streamdevice 2.8.10, the NORD field is set to 145 - but
the actual string is unchanged, suggesting that the NULL terminator may now be being included in the NORD count. Unfortunately this broke
one of our drivers, which checked the length of the response before doing some processing. What is the expected behaviour here - in general should NORD on a char waveform be including the NULL terminator or not? Thanks, Tom |