Emmanuel Mayssat wrote:
Hello,
I would like to create a stringin PV that takes an aiRecord and format
it. For example, ai could be the number of clock ticks, while the
stringIn is the formatted date.
1/ I want a simple solution with standard records
2/ I need to link the stringin to the ai
I immediately thought that putting the ai in the inp field and declaring
the device as device(stringin, PV_LINK, <dsetCode>,
<dsetStringIdentifier>) would do the trick.
But dbGetLink(psi->inp,..., &localVariable, ..., DBF_DOUBLE,...,0,0) (or
something like that) complains that inp has an invalid type.
How can I link the stringin to the ai correctly ?
Make sure you're passing a pointer to the link field:
dbGetLink(&psi->inp, DBR_DOUBLE, &localDoubleVariable,0,0)
By the way, you example problem is treated in Ned Arnold's devTimeOfDay.c.
I snuck a copy of this into the synApps std module, if you're interested.
For the general problem, the simplest solution I can think of is the sCalcout
record (in the synApps calc module), because you don't have to write device
support to do what you're describing.
--
Tim Mooney ([email protected]) (630)252-5417
Beamline Controls & Data Acquisition Group
Advanced Photon Source, Argonne National Lab.
- Replies:
- Re: Device with INP as a PV_LINK Andrew Johnson
- References:
- Device with INP as a PV_LINK Emmanuel Mayssat
- Navigate by Date:
- Prev:
StripTool2_5_10_0 display of waveform records? Jon Brinkmann
- Next:
RE: Fedora Core 6 to drop OpenMotif Pedersen, UK (Ulrik)
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
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:
Device with INP as a PV_LINK Emmanuel Mayssat
- Next:
Re: Device with INP as a PV_LINK Andrew Johnson
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
<2006>
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|