Skip to content

Add -S option to pvget/pvmonitor to stringify byte arrays - #105

Merged
mdavidsaver merged 1 commit into
epics-base:masterfrom
JJL772:pr-pvget-S-option
Sep 10, 2026
Merged

mdavidsaver merged 1 commit into
epics-base:masterfrom
JJL772:pr-pvget-S-option

Conversation

@JJL772

@JJL772 JJL772 commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

This emulates the behavior of the caget -S option. Byte arrays are displayed as strings.

Example (without -S):

$ pvget SIOC:TST:SYS0:APP_DIR
SIOC:TST:SYS0:APP_DIR 2026-03-17 23:09:56.242  [47,109,101,100,105,97,47,66,105,103,68,114,105,118,101,47,80,114,111,106,101,99,116,115,47,101,112,105,99,115,47,105,111,99,47,97,116,108,97,115,45,103,105,116,47,105,111,99,66,111,111,116,47,115,105,111,99,45,116,115,116,45,115,121,115,48,0]

Example (with -S):

$ pvget -S SIOC:TST:SYS0:APP_DIR
SIOC:TST:SYS0:APP_DIR 2026-03-17 22:39:05.669  /media/BigDrive/Projects/epics/ioc/atlas-git/iocBoot/sioc-tst-sys0

pvAccess PR: epics-base/pvAccessCPP#222

@AppVeyorBot

Copy link
Copy Markdown

Build pvDataCPP 1.0.72 failed (commit ec43e93fce by @JJL772)

@AppVeyorBot

Copy link
Copy Markdown

Build pvDataCPP 1.0.72 failed (commit ec43e93fce by @JJL772)

@AppVeyorBot

Copy link
Copy Markdown

Build pvDataCPP 1.0.72 failed (commit ec43e93fce by @JJL772)

@AppVeyorBot

Copy link
Copy Markdown

Build pvDataCPP 1.0.72 failed (commit ec43e93fce by @JJL772)

@anjohnson

Copy link
Copy Markdown
Member

Appveyor builds with older VMs need a newer version of pip. Nothing to do with this PR, I think we need to fix the CI in Base.

@ralphlange

Copy link
Copy Markdown
Contributor

Nothing to do with this PR - agreed.

The CI builds of Base don't have this issue - it's the CI configuration of this module that needs fixing.

@JJL772

JJL772 commented Mar 19, 2026

Copy link
Copy Markdown
Contributor Author

Just realized I forgot to open the corresponding PR in pvAccess to actually add the -S option...: epics-base/pvAccessCPP#222

Comment thread src/pv/pvData.h Outdated
@JJL772
JJL772 force-pushed the pr-pvget-S-option branch from 60e46ee to c49b615 Compare May 28, 2026 23:59
@codacy-production

codacy-production Bot commented May 29, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 4 complexity · 0 duplication

Metric Results
Complexity 4
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@AppVeyorBot

Copy link
Copy Markdown

Build pvDataCPP 1.0.75 failed (commit f0ac7e2c61 by @JJL772)

@AppVeyorBot

Copy link
Copy Markdown

Build pvDataCPP 1.0.75 completed (commit f0ac7e2c61 by @JJL772)

@JJL772
JJL772 force-pushed the pr-pvget-S-option branch from c49b615 to 47bd85f Compare June 30, 2026 16:16
@AppVeyorBot

Copy link
Copy Markdown

Build pvDataCPP 1.0.77 completed (commit 8c0f4011a6 by @JJL772)

Comment thread src/factory/printer.cpp Outdated
@JJL772
JJL772 force-pushed the pr-pvget-S-option branch 2 times, most recently from 8038a79 to 7a4823d Compare July 8, 2026 07:09
@AppVeyorBot

Copy link
Copy Markdown

Build pvDataCPP 1.0.78 completed (commit 9491dc27ab by @JJL772)

Comment thread src/factory/printer.cpp Outdated
@AppVeyorBot

Copy link
Copy Markdown

Build pvDataCPP 1.0.79 completed (commit 6eb459f812 by @JJL772)

@JJL772
JJL772 force-pushed the pr-pvget-S-option branch from 7a4823d to d5e09b2 Compare July 8, 2026 21:43
@AppVeyorBot

Copy link
Copy Markdown

Build pvDataCPP 1.0.80 completed (commit 5097577f2b by @JJL772)

Behaves similar to caget's '-S' option, except that NULL termination is not
respected. Instead, string length is determined solely based on the
array length, with single trailing NULLs being stripped. All other
characters within the range [0, len) are escaped and/or printed.
@AppVeyorBot

Copy link
Copy Markdown

Build pvDataCPP 1.0.96 failed (commit 630cb7f8c6 by @JJL772)

@mdavidsaver
mdavidsaver merged commit 8910526 into epics-base:master Sep 10, 2026
25 of 26 checks passed
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.

5 participants