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  <20122013  2014  2015  2016  2017  2018  2019  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019 
<== Date ==> <== Thread ==>

Subject: Re: menuFtype for 64 bit integers aka. long long and unsigned long long
From: Hinko Kocevar <hinko.kocevar@i-tech.si>
To: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Mon, 26 Mar 2012 09:45:08 +0200
Thank you all for replies.

I was afraid that this might not be so trivial to address.

Our instrument natively uses 64-bit integers for some parameter, so I reckon that using casted epicsFloat64 back to integer 64 would not cut it.

Right the only solution I see using two 32-bit integers in an array.


Best regards,
Hinko

On 03/22/2012 08:29 PM, Mark Rivers wrote:
If you have a specific application that needs an integer with more than 32-bits but fewer than 54-bits you may be able to just use a epicsFloat64.  I believe an epicsFloat64 can exactly represent integers up to 53 (or 54) bits.

Mark


-----Original Message-----
From: tech-talk-bounces@aps.anl.gov [mailto:tech-talk-bounces@aps.anl.gov] On Behalf Of Andrew Johnson
Sent: Tuesday, March 20, 2012 6:15 PM
To: Hinko Kocevar
Cc: tech-talk@aps.anl.gov
Subject: Re: menuFtype for 64 bit integers aka. long long and unsigned long long

Hi Hinko,

On 2012-03-15 Hinko Kocevar wrote:
Are there any plans on adding support for 64-bit types to menuFtype (for
3.14.x branch)?

This will definitely never happen on the 3.14.x branch, and probably not on
the 3.15.x branch either (there should be a 3.15.0 release out this summer).

Are there any workarounds for this issue?

This idea is really horrible but it should work as long as you're very
careful: If you are responsible for the device support and all the CA client
programs and you can do any IOC-based processing that is necessary inside a
subroutine or aSub record then you could pretend to the IOC code that your 64-
bit data types are epicsFloat64 (i.e. double) values and use casts to convert
them back and forth.  However you won't be able to use any of the standard
tools to look at the values, and I really don't recommend doing this.

I guess this change would affect basic EPICS type handling code - not
record, driver or device support code.

Adding new data types to EPICS is not easy, even just within the IOC, because
there are function-tables and case statements all over the place.  If you also
want to transmit that information over CA then there are even more
complications.

The simplest way to handle 64-bit values is probably to split them into 2x32-
bit values that you pass around in arrays.

HTH,

- Andrew


--
Hinko Kocevar
Software development engineer
Instrumentation Technologies d.d.
Velika pot 22, SI-5250 Solkan - Slovenia
T:+386 5 3352600, F:+386 5 3352601
mailto: hinko.kocevar@i-tech.si

http://www.i-tech.si - When your users demand stability

The information transmitted is intended solely for the
addressee and may contain confidential and/or privileged
information. Any review, retention, disclosure or other use
by persons other than the intended recipient is prohibited.
If you received this in error, please notify the sender and
delete all copies.

Replies:
Re: menuFtype for 64 bit integers aka. long long and unsigned long long Andrew Johnson
References:
menuFtype for 64 bit integers aka. long long and unsigned long long Hinko Kocevar
Re: menuFtype for 64 bit integers aka. long long and unsigned long long Andrew Johnson
RE: menuFtype for 64 bit integers aka. long long and unsigned long long Mark Rivers

Navigate by Date:
Prev: carrier card Hy8002 error huili
Next: Cothread 2.6 release michael.abbott
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019 
Navigate by Thread:
Prev: RE: menuFtype for 64 bit integers aka. long long and unsigned long long Mark Rivers
Next: Re: menuFtype for 64 bit integers aka. long long and unsigned long long Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019 
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 ·