Hello,
I’m trying to instantiate a NTNDArray with some NTAttributes in my IOC using QSRV group PV definitions, as the example in pva2pva (https://github.com/epics-base/pva2pva/blob/master/iocBoot/iocimagedemo/image.db
).
If I set the database as the following:
record(waveform, "$(P)ArrayData") {
field(FTVL, "USHORT")
field(NELM, "262144")
info(Q:group, {
"$(N):Array":{
+id:"epics:nt/NTNDArray:1.0",
"value":{+type:"any",
+channel:"VAL",
+trigger:"*"},
"":{+type:"meta", +channel:"SEVR"}
}
})
}
record(mbbi, "$(P)FOO") {
info(Q:group, {
"$(N):Array":{
"attribute[0].value":{+type:"any", +channel:"VAL"},
"attribute[0].timeStamp":{+type:"meta", +channel:"TIME"}
}
})
}
the resulting NTNDArray PV will have the following structure in its attribute[0] field:
structure
structure timeStamp
alarm_t alarm
int severity 0
int status 0
string message NO_ALARM
time_t timeStamp
long secondsPastEpoch 1667394506
int nanoseconds 335496073
int userTag 0
any value
double 0
The timeStamp values of the top structure are correctly taken from the “ArrayData” record. However, for the “attribute[0]” field, the timestamp values are taken from the “FOO” record, but the structure of the NTAttribute
contains two other structures (alarm and timeStamp) inside the “top” timeStamp structure.
The question is: how one can set the “timeStamp” structure of the attribute[] taking the TIME information from a different record than the one used to get the array value?
Thanks in advance!
João Paulo Martins
European Spallation Source ERIC