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  <20182019  2020  2021  2022  2023  2024  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  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: streamDevice 32-Bit ULONG endianess
From: Dirk Zimoch <[email protected]>
To: <[email protected]>, <[email protected]>
Date: Mon, 6 Aug 2018 10:35:33 +0200
Hello Martin,

Please try the current StreamDevice commit on github:
https://github.com/paulscherrerinstitute/StreamDevice

This is not yet a release, because I am still working on some stuff.

If you prefer a patch for an older version, please tell me which version you are using.

Dirk


On 03.08.2018 14:18, Dirk Zimoch wrote:
Hi Martin,

I did some tests and indeed I get:
                             32 bit IOC          64 bit IOC
big endian signed:          2283351134     18446744071697936384
little endian signed:       2283351134     18446744071697936384
big endian unsigned:       -2011616162               2283351134
little endian unsigned:    -2011616162              -2011616162

This seems all quite wrong. I will have a look.
Dirk

On 02.08.2018 21:57, Martin L. Smith wrote:
Hi,

I'm being sent a ULONG such as 2283351134 (base 10) and asyn shows
me in hex the number coming across as 5e 2c 19 88 and it should be
88 19 2c 5e so the order is reversed when the number is sent to the
IOC.

When I use the format converter %04r
     I get the number 1579948424 (base 10) which is 5e 2c 19 88

When I use the format converter %#4r
     I get the number -2011616162 which I think would be the correct
     number if it was unsigned.

What I really want to do is something like a format converter %#04r
but combining the # and the 0 flags doesn't seem to do what I want.
I need the value to be unsigned AND 32 bits byte order swapped.

Has anyone else run across this issue and if so how did you make it
work?

We are going to try sending a char array instead and see if that helps.

Thanks,
Marty

References:
streamDevice 32-Bit ULONG endianess Martin L. Smith
Re: streamDevice 32-Bit ULONG endianess Dirk Zimoch

Navigate by Date:
Prev: Re: dbGetPdbAddrFromLink dropped from 3.15 again Johnson, Andrew N.
Next: Re: Delta Tau motor control problem Mark Davis
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  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: streamDevice 32-Bit ULONG endianess Dirk Zimoch
Next: Stream Device: Parse response that includes checksum of command string David Vine
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  <20182019  2020  2021  2022  2023  2024 
ANJ, 06 Aug 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·