Experimental Physics and
| |||||||||||||||
|
If I have in statements in StreamDevice protocols that, when reading the input strings "FFFF" and "8000" using the string "%4X" conversion, results in the value 65535 and 32768 (at least when using a longin record). Given that the end result IS a long integer, this makes some sense. However, from the point of view of the device that produces these strings, they are 2-byte signed values, so they represent the values -1 and -32678. Is there some way to get StreamDevice to interpret these as negative values? I see that later versions of the StreamDevice doco includes this statement regarding the Standard LONG Converters: "With the - negative octal and hexadecimal values
are accepted."But what does that mean? I tried changing the protocol to -4X rather than 4X but it made no difference. How would the '-' option be used, and under what circumstances would it result in a negative long integer value that (without the "-" prefix) would have been a positive value? NOTE: For now I am just using a calc record to handle the 2-byte 2's complement format used by the device.
| ||||||||||||||
ANJ, 16 Apr 2020 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |