EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  <20002001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  <20002001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: native type of gdd object
From: [email protected] (Kay Kasemir)
To: Vladimir Sirotenko <[email protected]>
Cc: [email protected]
Date: Wed, 23 Feb 2000 10:56:56 -0700
At 11:27 AM 2/23/00 -0600, you wrote:
>Hi,
>
>Could someone advise me please how to control the native type of PV created
>in portable CA server
>with use of  gdd library ( pVV =  new gddScalar(gddAppType_value,
>aitEnumFloat32); )
>I mean native type which can be asked using  ca_field_type() function ..
>I have two servers running with the same PV creation, but one gives native
>type = 2 (float) and
>another gives 0 (string). Is there any way to change native type from 0 to
>2, for example? Thanks,
>
>Vladimir
> 

Hi Vladimir:

When you derive from casPV,
you can overload bestExternalType().
An example would be this:

// What should be used to retrieve the native type?
aitEnum CEpicsPV::bestExternalType() const
{
	// We have enum strings?
	if (m_enum_strings.size() > 0)
		return aitEnumEnum16;

	// Default if value's type not known, yet
	if (! m_value)
		return aitEnumFloat64;

	return m_value->primitiveType();
}

-> If I have enum strings, I prefer to be looked at as a aitEnumEnum16.
When I have a gdd, I return its type.

When I don't know yet, I return aitEnumFloat64
(Special situation here because in my case the PV
 might just have been created but has not received a value, yet.
 I won't admit that this is a bit crummy)

-Kay


References:
native type of gdd object Vladimir Sirotenko

Navigate by Date:
Prev: RE: native type of gdd object Jeff Hill
Next: eddCvrt1.16To2.2 Bill Brown
Index: 1994  1995  1996  1997  1998  1999  <20002001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: native type of gdd object Vladimir Sirotenko
Next: eddCvrt1.16To2.2 Bill Brown
Index: 1994  1995  1996  1997  1998  1999  <20002001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·