Hi Tim,
Thank you for your proposal but:
I looked in the genSub record code and I think that what I do should work ...
After deeper investigations, it turns out that when I initialize the INPH field type with FTH=STRING or CHAR it is then
assigned a CA_LINK type ((*plinkin).type)==CA_LINK instead of CONSTANT ...
That's why the Constant string is not copied at init.
When FTH=LONG then ((*plinkin).type)==CONSTANT
How can I force it to be a CONSTANT
Tim Mooney a écrit :
haquin wrote:
Hi,
I initialize the INPH (with macro substitution) of a gensub record
with a string,
but it is never transferred to the corresponding H variable ...
in the IOC shell I use the commands:
epics> dbgf MyGensub.INPH
DBR_STRING: MyString NPP NMS
epics> dbgf MyGensub.H
DBR_STRING:
The behaviour is different if I use LONG instead of STRING ...
Can someone tell me how to do retreive MyString in MyGensub.H ?
You can use a stringout record to hold the string, like so:
record(stringout, "myStringInit") {
field(VAL, "$(MYSTRINGMACRO)")
field(UDF, "0")
}
record(aSub, "myASub") {
....
field(INPH, "myStringInit")
....
}
Then, dbLoadRecords("myDatabase.db", "MYSTRINGMACRO=MyString")
begin:vcard
fn:Christophe Haquin
n:Haquin;Christophe
email;internet:[email protected]
tel;work:02 31 45 46 61
x-mozilla-html:FALSE
version:2.1
end:vcard
- Replies:
- Re: can't initialize record field with string Tim Mooney
- Re: can't initialize record field with string Andrew Johnson
- References:
- can't initialize record field with string haquin
- Re: can't initialize record field with string Tim Mooney
- Navigate by Date:
- Prev:
Re: can't initialize record field with string Tim Mooney
- Next:
Re: can't initialize record field with string Tim Mooney
- 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:
Re: can't initialize record field with string Tim Mooney
- Next:
Re: can't initialize record field with string Tim Mooney
- 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
|