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

pvget and pvmonitor need more output options #194

Open
drm-slac opened this issue Mar 20, 2024 · 4 comments
Open

pvget and pvmonitor need more output options #194

drm-slac opened this issue Mar 20, 2024 · 4 comments
Labels
Codeathon Project suitable for an EPICS Codeathon

Comments

@drm-slac
Copy link

Output options for pvget and pvmonitor aren't as mature as caget/camonitor, including numeric formatting and more.
This comes from a Tech-talk message on 2024-Mar-06.

@anjohnson anjohnson added the Codeathon Project suitable for an EPICS Codeathon label Mar 20, 2024
@chrisalguerrero
Copy link

chrisalguerrero commented Jun 10, 2024

@anjohnson @drm-slac I am interested in looking into this issue. Are we looking for changes from the output of the client API? Does anyone have an idea of a good starting point to make the output more numerically formatted? Or if we can come up with a list of tasks that would make it easier to address the issue. Or maybe we can add a check and set wrapper which identifies which format we should be using.

@chrisalguerrero
Copy link

chrisalguerrero commented Jun 10, 2024

I just read the epics tech-talk thread, and was able to find the pvtools source code here: https://github.com/epics-base/pvAccessCPP/tree/master/pvtoolsSrc

On Line 333 of pvget.cpp, what does "T-types format mode" mean? I believe Line 334 has the variable which stores the output formatting.

@ttkorhonen
Copy link

If you look at the usage() (line 50), it says that this option, and a few others are deprecated, so it probably is not worth spending time on those options...unless somebody else here disagrees.

@anjohnson
Copy link
Member

IIRC those options were present in an earlier version of the pvtools programs, which were reimplemented from scratch and without all of the options previously supported. The deprecations were added at that time because it wasn't obvious how useful they all were in practice, and it would have taken time to reimplement them all that the developers could better spend on other work. I think the original behavior of some of those options would have been modeled on the catools programs caget/caput/camonitor etc. and to be honest the -t (terse) flag is one that I think would be good to resurrect for pvget, although it won't make sense for all channels.

I have no idea whether those old sources from the eget repo will still build or run, but it't not worth trying to fix them.

I would want the command pvget -t ai to just output the value of the ai channel without printing the channel name, timestamp or alarm info, like caget -t ai does today:

Cox$ caget ai
ai                             0
Cox$ caget -t ai
0
Cox$ pvget ai
ai <undefined>              0 INVALID DRIVER UDF 
Cox$ pvget -t ai
ai <undefined>              0 INVALID DRIVER UDF 

If you want to work on these I would recommend looking through and picking those options that might be the most useful and discussing them here before you spend much time trying to implement them.

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

No branches or pull requests

4 participants