EPICS Home

Experimental Physics and Industrial Control System


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

Subject: Re: "Invalid request" for simply "pvget ThePV" when all other requests seem fine
From: "Kasemir, Kay" <[email protected]>
To: Andrew Johnson <[email protected]>, "[email protected]" <[email protected]>
Date: Tue, 28 Aug 2018 16:53:32 +0000
Hi:

> Michael will have to answer the "what changed" question, 

Looking further, the difference in pvget seems to be that a plain
   pvget ThePV
now always seems to be the same as
   pvget -r 'field(value)' ThePV

That works for most normative types that have a "value" as a top-level field, but can of course fail for a custom structure.

In the past, pvget was more lenient. Maybe it checked the structure description, and if there's no "value", it would drop back to performing a "-r field()" request?

Here's the output of the older example compiled with base 3.15.5 and EPICS-CPP-4.6.0:

# Plain 'pvget' succeeds, reports same as pvget -r 'field()' neutrons:
$ pvget neutrons
neutrons
structure 
    time_t timeStamp 2018-08-28T12:40:37.707 1143
    epics:nt/NTScalar:1.0 proton_charge
        double value 4e+08
    epics:nt/NTScalarArray:1.0 time_of_flight
        uint[] value [1143,1143,1143,1143,1143,1143,1143,1143,1143,1143]
    epics:nt/NTScalarArray:1.0 pixel
        uint[] value [11430,11430,11430,11430,11430,11430,11430,11430,11430,11430]

$ pvget -r 'field()' neutrons
neutrons
structure 
    time_t timeStamp 2018-08-28T12:41:49.185 7469
    epics:nt/NTScalar:1.0 proton_charge
        double value 1e+09
    epics:nt/NTScalarArray:1.0 time_of_flight
        uint[] value [7469,7469,7469,7469,7469,7469,7469,7469,7469,7469]
    epics:nt/NTScalarArray:1.0 pixel
        uint[] value [74690,74690,74690,74690,74690,74690,74690,74690,74690,74690]

# If I try to fetch the non-existing top-level "value" field, I get the same error as the new plain "pvget" reports:
$ pvget -r 'field(value)' neutrons
[neutrons] failed to create channel get: Status [type=ERROR, message=invalid pvRequest]



I could argue either way:

a) "pvget" without "-r .." should assume that we're reading a normative type, i.e. use "field(value)" and fail if there is no value.
b) "pvget" should get something. First try "value", but if the PV info doesn't show a value field, just dump everything.

Thanks,
Kay

Replies:
Re: "Invalid request" for simply "pvget ThePV" when all other requests seem fine Andrew Johnson
References:
"Invalid request" for simply "pvget ThePV" when all other requests seem fine Kasemir, Kay
Re: "Invalid request" for simply "pvget ThePV" when all other requests seem fine Andrew Johnson

Navigate by Date:
Prev: Re: "Invalid request" for simply "pvget ThePV" when all other requests seem fine Andrew Johnson
Next: Re: "Invalid request" for simply "pvget ThePV" when all other requests seem fine Andrew Johnson
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: "Invalid request" for simply "pvget ThePV" when all other requests seem fine Andrew Johnson
Next: Re: "Invalid request" for simply "pvget ThePV" when all other requests seem fine Andrew Johnson
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024