Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change structure of pvi PV #120

Open
coretl opened this issue Jun 11, 2024 · 1 comment · May be fixed by #136
Open

Change structure of pvi PV #120

coretl opened this issue Jun 11, 2024 · 1 comment · May be fixed by #136
Assignees

Comments

@coretl
Copy link
Contributor

coretl commented Jun 11, 2024

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:

  • Some structure to get the metadata into the root. Something like this when the first call to add_pvi_info_to_record happens:
        pvi_pv = f"{block}:PVI"
        description = builder.StringOut(
            pvi_pv + ":DESCRIPTION",
            initial_value=f"PVs making up Interface for {block}",
        )
        description.add_info(
            "Q:group",
            {
                pvi_pv: {
                    "+id": "epics:nt/NTPVI:1.0",
                    "display.description": {"+type": "plain", "+channel": "VAL"},
                    "": {"+type": "meta", "+channel": "VAL"}
                }
            },
        )
@coretl
Copy link
Contributor Author

coretl commented Jun 11, 2024

To be done after the June experiment is finished

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants