Skip to content

Conversation

@georgweiss
Copy link
Collaborator

Pointed out by user: for channel access you may specify pvname.VAL[index] and get the scalar value of the element at index. This PR adds support for the same notation in pv access.

Checklist

  • Testing:

    • The feature has automated tests
    • Tests were run
  • Documentation:

    • The feature is documented
    • The documentation is up to date
    • Release notes:
      • Added an entry if the change is breaking or significant
      • Added an entry when adding a new feature

@georgweiss georgweiss requested a review from kasemir November 27, 2025 11:32
Copy link
Collaborator

@kasemir kasemir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finding it hard to see logical changes in the flood of white space rearrangements.
Fundamental issue here is that the CA array handling is done on the server side. 'RSRV' in the IOC turns "VAL[10]" into a scalar.
With PV access, 'QSRV' on the IOC doesn't do that. We started to somewhat support this on the client side, but not all PVA clients do this, so users will be disappointed when the same PV behaves differently across tools.

@jacomago
Copy link
Contributor

jacomago commented Dec 1, 2025

Finding it hard to see logical changes in the flood of white space rearrangements. Fundamental issue here is that the CA array handling is done on the server side. 'RSRV' in the IOC turns "VAL[10]" into a scalar. With PV access, 'QSRV' on the IOC doesn't do that. We started to somewhat support this on the client side, but not all PVA clients do this, so users will be disappointed when the same PV behaves differently across tools.

Perhaps it would be a good idea to add an autoformatter such as https://github.com/diffplug/spotless/tree/main/plugin-maven or https://github.com/spotify/fmt-maven-plugin so the formatting is the same for every developer regardless of IDE.

@kasemir
Copy link
Collaborator

kasemir commented Dec 1, 2025

I prefer

      if (field instanceof PVANumber  ||
          field instanceof PVAString)

over an auto-formatters

      if (field instanceof PVANumber  ||
            field instanceof PVAString)

@georgweiss
Copy link
Collaborator Author

georgweiss commented Dec 1, 2025

@kasemir, I will close this and create a new PR without mangled code.

As for the feature proper: the pvget command line supports indexed access like pvname.VAL[index], so my user found it reasonable Phoebus should as well.

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 this pull request may close these issues.

4 participants