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

Subject: Re: convert DBR value to string
From: Ralph Lange <[email protected]>
To: [email protected]
Date: Fri, 08 Oct 2010 17:42:52 -0400
On 08.10.2010 16:42, Patrick Thomas wrote:
Hi,

I was wondering if there is a function supplied in base that takes a dbr type, value and count and returns the value as a string?

Thank you,
Patrick

Well ... yes and no.


All conversion is done on the server side, so the IOC libraries contain a matrix with conversion functions from any database field type (DBF_...) into any CA request basic type (DBR_...) and vice versa. (The - admittedly old and not really beautiful - code is in (BASE)/src/db/dbConvert.c)

If your question is about the client side, you can of course simply request the value as a string (and one of the mentioned functions will be called on the server). If you already have the value and want to convert to string locally, you're pretty much on your own. No one keeps you from using the server side code for that, of course, but - depending on the language your client is using - there might be easier ways to achieve the same thing.

Hope this helps,
Ralph


References:
convert DBR value to string Patrick Thomas

Navigate by Date:
Prev: convert DBR value to string Patrick Thomas
Next: subscription updates Patrick Thomas
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: convert DBR value to string Patrick Thomas
Next: subscription updates Patrick Thomas
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 08 Oct 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·