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