EPICS Home

Experimental Physics and Industrial Control System


 
2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: pvput JSON syntax
From: Ralph Lange via Core-talk <[email protected]>
To: EPICS Core Talk <[email protected]>
Date: Thu, 16 Jan 2020 11:35:50 +0100
Dear Core colleagues,

I have a new CODAC Core System (CCS) bug on my desk, saying:

New: pvput does not support anymore JSON field assignment 
The command line help does not mention this removal of functionality.
$ pvput -h
Usage: pvput [options] <PV name> <value>
       pvput [options] <PV name> <size/ignored> <value> [<value> ...]
       pvput [options] <PV name> <field>=<value> ...
       pvput [options] <PV name> <json_array>
       pvput [options] <PV name> <json_map>
options:
  -h: Help: Print this message
  -V: Print version and exit
  -r <pv request>:   Request, specifies what fields to return and options,
default is ''
  -w <sec>:          Wait time, specifies timeout, default is 5.000000
second(s)
  -p <provider>:     Set default provider name, default is 'pva'
  -M <raw|nt|json>:  Output mode.  default is 'nt'
  -v:                Show entire structure (implies Raw mode)
  -q:                Quiet mode, print only error messages
  -d:                Enable debug output
 Deprecated options:
  default: Auto - try value as enum string, then as index number
  -n, -s, -F, -t: ignored
  -f <input file>: error
 JSON support is present
Examples:
  pvput double01 1.234       # shorthand
  pvput double01 value=1.234
  pvput arr:pv X 1.0 2.0  # shorthand  (X is arbitrary and ignored)
  pvput arr:pv "[1.0, 2.0]"            # shorthand
  pvput arr:pv value="[1.0, 2.0]"
Field values may be given with JSON syntax.
Complete structure
  pvput double01 '{"value":1.234}'
Sub-structure(s)
  pvput group:pv some='{"value":1.234}' other='{"value":"a string"}'
$ /usr/bin/pvput PVA-SRV-TESTS:INTEGER '{"value":4321}'
JSON syntax not supported by this build.

The previous CCS version was using EPICS 7.0.2 (libpvAccess 6.1.0), the one we're preparing for uses EPICS 7.0.3.1 (libpvAccess 7.1.0). I don't see any mention of this in the release notes of pvAccess [1].

Any suggestions?

Cheers,
~Ralph

[1] https://docs.epics-controls.org/projects/pvaccess-cpp/en/latest/doxygen/pvarelease_notes.html

Replies:
Re: pvput JSON syntax Timo Korhonen via Core-talk
Re: pvput JSON syntax Mark Rivers via Core-talk

Navigate by Date:
Prev: Build failed: epics-base base-7.0-388 AppVeyor via Core-talk
Next: Re: pvput JSON syntax Timo Korhonen via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Build failed: epics-base base-7.0-388 AppVeyor via Core-talk
Next: Re: pvput JSON syntax Timo Korhonen via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024