How we might to pvi tags in databases to serve the structure over PVA
Do softIocPVA -d test.db
then in another terminal:
# pvget PANDAQSRV:PVI
PANDAQSRV:PVI structure
structure record
structure _options
uint queueSize 0
boolean atomic true
structure pvi
structure pulse1
string d PANDAQSRV:PULSE1:PVI
structure seq1
string d PANDAQSRV:SEQ1:PVI
This says that PandA has 2 blocks, PULSE1 and SEQ1, with their pvs.
# pvget PANDAQSRV:PULSE1:PVI
PANDAQSRV:PULSE1:PVI structure
structure record
structure _options
uint queueSize 0
boolean atomic true
structure pvi
structure delay
string rw PANDAQSRV:PULSE1:DELAY
structure width
string rw PANDAQSRV:PULSE1:WIDTH
Getting the first, we see the Pulse block has 2 read-write fields.
# pvget PANDAQSRV:SEQ1:PVI
PANDAQSRV:SEQ1:PVI structure
structure record
structure _options
uint queueSize 0
boolean atomic true
structure pvi
structure table
string rw PANDAQSRV:SEQ1:TABLE
Getting the second we see a single read-write field.
# pvget -v PANDAQSRV:SEQ1:TABLE
PANDAQSRV:SEQ1:TABLE epics:nt/NTTable:1.0
structure record
structure _options
uint queueSize 0
boolean atomic true
structure value
ubyte[] oute1 [1,0,1,0]
string[] trigger [POSA>=POSITION, POSA<=POSITION, Immediate, Immediate]
uint[] time2 [0,10,10,11]
uint[] time1 [5,0,10,10]
ushort[] repeats [1,1,1,32]
int[] position [3222,-565,0,0]
ubyte[] outf2 [1,0,0,0]
ubyte[] outf1 [1,0,0,0]
ubyte[] oute2 [1,0,1,0]
ubyte[] outd2 [1,1,0,1]
ubyte[] outd1 [1,1,0,1]
ubyte[] outc2 [0,1,1,0]
ubyte[] outc1 [0,1,1,0]
ubyte[] outb2 [0,0,1,1]
ubyte[] outb1 [0,0,1,1]
ubyte[] outa2 [1,0,0,1]
ubyte[] outa1 [1,0,0,1]
alarm_t alarm INVALID DRIVER UDF
int severity 3
int status 2
string message UDF
time_t timeStamp <undefined>
long secondsPastEpoch 631152000
int nanoseconds 0
int userTag 0
string[] labels [Repeats, Trigger, Position, Time1, OutA1, OutB1, OutC1, OutD1, OutE1, OutF1, Time2, OutA2, OutB2, OutC2, OutD2, OutE2, OutF2]
Getting this field we see an NTTable field. Note that the labels don't match the value structure order at the moment, this will change after epics-base/pva2pva#53
- Get the
pvi
substructure (there's arecord
element at the top level) - For each k, v in it:
- If it has an
x
it is anEpicsSignalX
withvalue
of the default record type - If it has an
r
and aw
or anrw
it is anEpicsSignalRW
- If it has only an
r
it is anEpicsSignalR
- If it has only a
w
it is anEpicsSignalW
- If it has an