PandABlocks / PandABlocks-ioc

Create an IOC from a PandA
Apache License 2.0
0 stars 5 forks source link

Change structure of pvi PV #120

Open coretl opened 2 weeks ago

coretl commented 2 weeks ago

At the moment we have a structure like:

$ pvget -v BL45P-MO-PANDA-01:TTLOUT1:PVI
BL45P-MO-PANDA-01:TTLOUT1:PVI structure 
    structure record
        structure _options
            boolean atomic true
    structure pvi
        structure label
            string rw BL45P-MO-PANDA-01:TTLOUT1:LABEL
        structure val
            string rw BL45P-MO-PANDA-01:TTLOUT1:VAL
        structure val_delay
            string rw BL45P-MO-PANDA-01:TTLOUT1:VAL:DELAY

Which is very different from the underlying records:

$ pvget -v BL45P-MO-PANDA-01:TTLOUT1:VAL
BL45P-MO-PANDA-01:TTLOUT1:VAL epics:nt/NTScalar:1.0 
    string value ZERO
    alarm_t alarm 
        int severity 0
        int status 0
        string message 
    time_t timeStamp 2024-06-08 15:34:04.600  
        long secondsPastEpoch 1717857244
        int nanoseconds 600281953
        int userTag 0
    structure display
        string description TTL output value

It would be nicer to have value, alarm and timeStamp, and give it a structure ID. I suggest we do this:

$ pvget -v BL45P-MO-PANDA-01:TTLOUT1:PVI
BL45P-MO-PANDA-01:TTLOUT1:PVI epics:nt/NTPVI:1.0 
    structure value
        structure label
            string rw BL45P-MO-PANDA-01:TTLOUT1:LABEL
        structure val
            string rw BL45P-MO-PANDA-01:TTLOUT1:VAL
        structure val_delay
            string rw BL45P-MO-PANDA-01:TTLOUT1:VAL:DELAY
    alarm_t alarm 
        int severity 0
        int status 0
        string message 
    time_t timeStamp 2024-06-08 15:34:04.600  
        long secondsPastEpoch 1717857244
        int nanoseconds 600281953
        int userTag 0
    structure display
        string description PVs making up Interface for TTLOUT1

This would require:

coretl commented 2 weeks ago

To be done after the June experiment is finished