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  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: PV Gateway
From: Andrew Johnson <[email protected]>
To: Dirk Zimoch <[email protected]>
Cc: [email protected]
Date: Wed, 27 Aug 2008 14:26:41 -0500
Hi Dirk,

On Friday 22 August 2008 02:55:06 Dirk Zimoch wrote:
>
> It would be nice to have a getEventMask() method instead. Should I add this
> to Mantis?

Given that apparently the only reason you needed those headers was to be able 
to get the event mask, that API change to the CAS would appear to be the real 
solution to this issue.  Please submit a Mantis bug report requesting that 
API change.  If you wish to submit a patch with the bug report to implement 
this it may happen a bit faster as well.

> Also note that the code needs modification for R3.14.9 because of an other
> "private" thing in base: Byte order handling.
...
> Will this be fixed in 3.14.10? Should I add this to Mantis?

We changed the way in which we detect the CPU byte order to use information 
from the OS for R3.14.10; I think all OSs except Windows provide headers with 
this information, and AFAIK Windows only runs on little-endian machines so I 
think we're now covered.  The way this will work is as follows:

Any C or C++ code can #include "epicsEndian.h" which defines four macros.  The 
main one is EPICS_BYTE_ORDER and is defined to be either EPICS_ENDIAN_LITTLE 
or EPICS_ENDIAN_BIG (these are numeric constants 1234 and 4321 respectively).  
The fourth macro is called EPICS_FLOAT_WORD_ORDER and is needed because some 
ARM systems use mixed-endian format floats.

Note that just knowing the CPU's endianness doesn't tell you the complete 
story about the byte order that your hardware registers will present to the 
CPU; byte swapping is often performed automatically by PCI to VME bridge 
devices and by other kinds of bus converter, so "portable" drivers aren't 
always.

- Andrew
-- 
Talk is cheap. Show me the code. -- Linus Torvalds

References:
PV Gateway David Dudley
Re: PV Gateway Andrew Johnson
Re: PV Gateway Dirk Zimoch

Navigate by Date:
Prev: CAN232 Szalata, Zenon M.
Next: RE: accessing a slice of an array field Jeff Hill
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: PV Gateway Dirk Zimoch
Next: db question about S7-PLC driver marco_hair
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·