Commit Graph
147 Commits
Author SHA1 Message Date
zimoch 8a5a6fcd27 Merge branch 'master' into PSI 2026-09-25 15:23:11 +02:00
Jeremy Lorelli 891052652e Add -S option to pvget/pvmonitor to stringify byte arrays
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.
2026-09-09 21:40:25 -07:00
Andrew Johnson e7c69cb5d2 Protect PVUnion selector in deserialize 2026-08-09 18:26:52 -07:00
Michael Davidsaver abc95982ed bound deserialize() recursion 2026-08-09 17:31:03 -07:00
Michael Davidsaver 777c921535 Check for match of complex element types
eg. Array of Structure must have Structure elements.
2026-08-09 17:31:03 -07:00
zimoch c6bd63efce Merge branch 'master' into PSI 2026-01-06 14:56:11 +01:00
Andrew Johnson 0c1773f25d Clang warnings: sprintf() => epicsSnprintf() 2025-12-01 18:20:27 -08:00
zimoch 4c9b294e2b Merge branch 'master' into PSI 2023-12-01 16:32:56 +01:00
JJL772 eac2a8e70f Fix use-after-destroy in epicsRefSnapshopCurrent 2023-08-06 21:30:32 -07:00
Andrew Johnson 45018a2163 Generate JSON5 when available
Fixes lp: #2029482 / GitHub #92
2023-08-06 21:28:01 -07:00
zimoch 155e8f078e Merge branch 'master' into PSI 2023-01-23 11:30:51 +01:00
Michael Davidsaver 0b424a71ec isprint() wants value in range [-1, 255]
The MSVC impl. assert()s this
2022-11-26 10:52:03 -08:00
zimoch 865840ec0c allow all chars in field names 2021-08-26 15:38:09 +02:00
Michael Davidsaver f17d2bbca1 add maybeQuote()
Something for the *NIX gurus
to light their pipes with.
2020-06-17 14:08:14 -07:00
zimoch 1038182a16 removed empty lines at end of file 2020-04-15 07:53:22 -07:00
zimoch 60091bfe56 removed spaces at end of line 2020-04-15 07:53:22 -07:00
zimoch f4de6dd9b1 replaced tabs with spaces 2020-04-15 07:53:22 -07:00
Michael Davidsaver df89135455 cleanup 2019-10-11 16:17:49 -07:00
Michael Davidsaver 95d452870c move dedup to most derived
Making virtual calls from a base class dtor is not safe.
2019-10-11 16:17:25 -07:00
Michael Davidsaver 8a82ff9fe4 Revert "dynamic_cast may not be defined during dtor"
This reverts commit dd24b2ad75.
2019-10-11 08:41:30 -07:00
Michael Davidsaver dd24b2ad75 dynamic_cast may not be defined during dtor 2019-09-30 18:24:13 -07:00
Michael Davidsaver 0ad253c6f0 Remove Base 3.14 compatibility 2019-09-23 10:14:55 -07:00
Daniel Damiani 31802a8bde Added additional explicit template instantiations to fix build problems on macos with c+11 2019-07-04 07:09:58 -07:00
Bruno Martins 4dd7a18301 Improve docs. Make getFieldT(offset) use vector::at. 2019-05-20 16:35:59 -07:00
Bruno Martins b050fbbcbe Revert {Structure,Union}::getField to previous behavior 2019-05-20 16:35:59 -07:00
Bruno Martins caa11605fc Add {Structure,Union}::getFieldT, fix {Structure,Union}::getField 2019-05-20 16:35:59 -07:00
Michael Davidsaver cd2436342d Revert "Replace display.format with .form and .precision"
This reverts commit 4ffddfa2f6.
2019-05-06 10:40:54 -07:00
Michael Davidsaver 93f0518b4b Merge remote-tracking branch 'md/display-format'
* md/display-format:
  Replace display.format with .form and .precision
2019-05-01 14:03:57 -07:00
Michael Davidsaver d746e1bfb3 minor 2019-03-11 14:04:53 -07:00
Michael Davidsaver 4ffddfa2f6 Replace display.format with .form and .precision
Remove instance accessors w/o replacement
as a prelude to deprecation.
2019-01-16 09:06:15 -08:00
Michael Davidsaver 2814c779bd StandardField::getStandardField safety 2019-01-15 21:01:38 -08:00
Michael Davidsaver 4c73607799 cleanup StandardField 2019-01-15 21:01:38 -08:00
Michael Davidsaver 77c67802a3 printer.cpp extend precision 2018-10-30 17:09:56 -07:00
Michael Davidsaver 7d68d177d7 printer.cpp update time format 2018-10-30 17:02:22 -07:00
Michael Davidsaver 9b20505dcd stream() remove comma in NTTable 2018-10-30 14:33:15 -07:00
Michael Davidsaver edd3e20f3c format NTEnum 2018-10-29 13:12:01 -07:00
Michael Davidsaver 90cffa60d6 format NTTable as CSV 2018-10-29 13:12:01 -07:00
Michael Davidsaver 6171cd6867 escape and quote PVString(Array)::dumpValue()
Escaping for both.  quote array values,
but not scalar.

Also move remaining template virtuals out of line.
2018-10-29 13:12:01 -07:00
Michael Davidsaver fa731bf6c3 helper to escape while printing strings 2018-10-29 13:12:01 -07:00
Michael Davidsaver 818fce324c Add PVStructure::stream() 2018-10-29 13:12:01 -07:00
Michael Davidsaver 45265b4f9b Add FieldBuilder::begin() and Field::build()
Boilerplate reduction in structure
definition and instanciation.
2018-10-16 20:52:24 -07:00
Michael Davidsaver a02a60c658 Field::m_hash friends
Avoid additional access of m_hash by FieldCreate::Helper
which has an unclear (though I think correct) friend
relationship with Field.

Attempt to placate old gcc 3.4.4
2018-09-19 11:04:02 -07:00
Michael Davidsaver 64158376f5 PVStructure inline access to member variables 2018-07-31 16:55:15 -07:00
Michael Davidsaver 850d4ff056 PVField::copyUnchecked assert()
Field comparison is now O(0), so do this anyway
to help catch mistakes.
2018-07-31 16:55:15 -07:00
Michael Davidsaver f0cfe1c85a PVField::copy() avoid duplication with copyUnchecked() 2018-07-31 16:55:15 -07:00
Michael Davidsaver c8b615b3ee Field initialize m_hash
valgrind complain (rightly) about use of uninitialized
if Structure ctor throws (eg. duplicate field).
~Field will then try to use m_hash before it has been
initialized.  This don't hurt and the subsequent equality
tests prevent any bad behavior.
2018-07-30 14:50:19 -07:00
Michael Davidsaver e1216dfa76 move PVValueArray dtor out of line
This class has out of line members, and explicit
instanciations.  Move the dtor out of line as
well to maybe avoid emitting duplicate
typeinfo.
2018-07-12 15:38:49 -07:00
Michael Davidsaver a029455466 Thread reftrack 2018-07-11 16:30:04 -07:00
Michael Davidsaver 0406a2f614 Field de-duplication
add a global cache of Field instances to
allow O(0) comparison of types.
2018-07-06 12:01:14 -07:00
Michael Davidsaver f1553cc90e Move NOMINMAX to configure/CONFIG_SITE
The macro must be defined before MS system headers are
included.

This rev. remove #define NOMINMAX from public headers,
but no public headers use min()/max() and this was
never the correct way to use this macro as by convention
library headers are included after system headers,
which is too late to have an effect.
2018-05-28 11:24:49 -07:00