Hi all,
I have the following problem (EPICS 3.14.10 / Debian 4.0)
with this tiny database (minimized to my problem) .
Why don't I see the Value/Raw Value of "HAD:RPC:S1:M0:C9:ToTL" at the
input D of the sub record "HAD:RPC:S1:M0:C9:stToTL", which I try to
access at c-code.
1) The ingredients:
record(ao, HAD:RPC:S1:M0:C9:ToTL) {
field(DESC, "0 0 0 2")
field(DTYP, "Raw Soft Channel")
field(FLNK, "HAD:RPC:S1:M0:C9:stToTL")
field(OUT, "HAD:RPC:S1:M0:C9:stToTL")
field(EOFF, "0")
field(LOPR, "0")
field(HOPR, "199")
field(DRVH, "250")
field(DRVL, "0")
field(LINR, "LINEAR")
field(OMSL, "supervisory")
}
record(sub, HAD:RPC:S1:M0:C9:stToTL) {
field(DESC, "store 0 0 0 2")
field(INAM, "mySubInit")
field(SNAM, "myStoreFcn")
field(INPA, "0")
field(INPB, "0")
field(INPC, "2")
field(INPD, "HAD:RPC:S1:M0:C9:ToTL.RVAL")
field(INPE, "0")
}
The referenced C-Code:
static long myStoreFcn(subRecord *precord)
{
...
short thr;
...
thr = precord->d;
...
printf( "Record %s called myStoreFcn(%p), thr %d, precord->d %f\n",
precord->name, (void*) precord, thr, precord->d);
...
return(0);
}
...
epicsRegisterFunction(myStoreFcn);
...
2.) The test: (caput / dbpf)
epics> dbgf HAD:RPC:S1:M0:C9:ToTL
DBR_DOUBLE: 0
epics> dbpf HAD:RPC:S1:M0:C9:ToTL 200
Record HAD:RPC:S1:M0:C9:stToTL called myStoreFcn(0x80577b0), thr 0,
precord->d 0.000000
DBR_DOUBLE: 200
epics>dbpr HAD:RPC:S1:M0:C9:stToTL
A: 0 ASG: B: 0 C: 2
D: 0 DESC: store 0 0 0 2 DISA: 0 DISP: 0
DISV: 1 E: 0 F: 0 G: 0
H: 0 I: 0 J: 0 K: 0
L: 0 NAME: HAD:RPC:S1:M0:C9:stToTL SEVR: NO_ALARM
STAT: NO_ALARM TPRO: 0 VAL: 200
3. ) The (stupid) question: Why don't I get the value of
HAD:RPC:S1:M0:C9:ToTL at D? At VAL I see it.
Thanks for any explanation.
Peter