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  <20112012  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  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: sequencer on 64bit linux
From: "J. Lewis Muir" <[email protected]>
To: Benjamin Franksen <[email protected]>
Cc: Benjamin Franksen <[email protected]>, [email protected]
Date: Tue, 05 Apr 2011 09:45:30 -0500
On 4/5/11 4:06 AM, Benjamin Franksen wrote:
> BTW, Ralph Lange suggested that to make it easier to write portable SNL
> code, I should allow use of the standard C fixed-size integer types in SNL.
> This would mean you can say
> 
> uint32_t x;
> assign x to "...";
> 
> and be sure that this is an unsigned 32 bit integer, regardless of
> architecture and OS. I think this is a good idea and I plan to add this to
> my development version, so it will be in 2.1, but not in 2.0.13.

Hi, Ben.

Say I have a longout record on an IOC and want to write to its
VAL field from an SNL program running in a different IOC.  What
type should I use for the SNL variable in order to be portable?
 int32_t?  Or is there actually no way to be portable because
the size of the longout record's DBF_LONG VAL field can vary
depending on the architecture for which the longout record was
built and because CA doesn't support 64-bit integer types?

It would seem to me that the only way to actually make anything
portable is to use fixed size types across the board.  That is,
in the example above, make the type of the longout record's VAL
field a 64-bit signed integer (e.g. DBF_INT64), make CA support
64-bit signed integers, and let me use int64_t as the type of
the variable in the SNL program used to write to the VAL field.

Thanks,

Lewis

-- 
J. Lewis Muir
Software Engineer
IMCA-CAT

Replies:
Re: sequencer on 64bit linux Andrew Johnson
References:
sequencer on 64bit linux Benjamin Franksen
Re: sequencer on 64bit linux Andrew Johnson
Re: sequencer on 64bit linux Benjamin Franksen

Navigate by Date:
Prev: Re: MAXv question Dirk Zimoch
Next: how to use EPICS driver of MicroResearch PMC-EVR 王林
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: sequencer on 64bit linux Benjamin Franksen
Next: Re: sequencer on 64bit linux Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·