Comments (7)
Thank you for reporting this.
I also think it is a bug that the element types of dimension
and attribute
are not printed.
from pvxs.
I think this issue should be addressed by 2a83e49.
$ ./bin/linux-x86_64/pvxinfo my:pv:name
my:pv:name from [fe80::7816:e3ff:fe25:5208]%5:5075
struct "epics:nt/NTNDArray:1.0" {
union {
bool[] booleanValue
int8_t[] byteValue
int16_t[] shortValue
int32_t[] intValue
int64_t[] longValue
uint8_t[] ubyteValue
uint16_t[] ushortValue
uint32_t[] uintValue
uint64_t[] ulongValue
float floatValue
double doubleValue
} value
struct "codec_t" {
string name
any parameters
} codec
int64_t compressedSize
int64_t uncompressedSize
int32_t uniqueId
struct "time_t" {
int64_t secondsPastEpoch
int32_t nanoseconds
int32_t userTag
} dataTimeStamp
struct "alarm_t" {
int32_t severity
int32_t status
string message
} alarm
struct "time_t" {
int64_t secondsPastEpoch
int32_t nanoseconds
int32_t userTag
} timeStamp
struct[] {
int32_t size
int32_t offset
int32_t fullSize
int32_t binning
bool reverse
} dimension
struct[] {
string name
any value
string[] tags
string descriptor
struct "alarm_t" {
int32_t severity
int32_t status
string message
} alarm
struct "time_t" {
int64_t secondsPastEpoch
int32_t nanoseconds
int32_t userTag
} timeStamp
int32_t sourceType
string source
} attribute
}
When shown with values, all null/zero in this case.
$ ./bin/linux-x86_64/pvxget -F tree my:pv:name
my:pv:name
struct "epics:nt/NTNDArray:1.0" {
union value null
struct "codec_t" {
string name = ""
any parameters null
} codec
int64_t compressedSize = 0
int64_t uncompressedSize = 0
int32_t uniqueId = 0
struct "time_t" {
int64_t secondsPastEpoch = 0
int32_t nanoseconds = 0
int32_t userTag = 0
} dataTimeStamp
struct "alarm_t" {
int32_t severity = 0
int32_t status = 0
string message = ""
} alarm
struct "time_t" {
int64_t secondsPastEpoch = 0
int32_t nanoseconds = 0
int32_t userTag = 0
} timeStamp
struct[] dimension = {0}[]
struct[] attribute = {0}[]
}
from pvxs.
After building the latest master branch of PVXS on Debian 10, pvxinfo and pvxget printed the expected result for the empty NTNDArray data. Thank you for fixing this.
from pvxs.
fyi. I had a look at https://github.com/wanglin86769/node-epics-pva/blob/master/wrapper/wrapper.cpp I would be interested in seeing a JSON output format (eg. Value::Fmt::JSON
) added alongside the tree and delta formats.
from pvxs.
Thanks for your interest in JSON format. If there is something that I can contribute, I will be glad to do it.
from pvxs.
I think the key point is to output pvxs::Value in valid JSON format, since JSON syntax is strict. For example, some problems I encountered were,
- If some possible pvAccess data types are not taken into account, unexpected output with invalid JSON format may be generated.
- Trailing comma is not allowed in an object or array in JSON.
- The numbers NaN and Infinity are not support in JSON, they are considered null.
from pvxs.
- If some possible pvAccess data types are not taken into account, unexpected output with invalid JSON format may be generated.
A "reversible" mapping would be best. That is, one which could be parsed to recover the original with no loss of information. I understand that this would likely be difficult as among other aspects, JSON has no direct analog to the PVD structure ID names (eg. enum_t
). Nor the struct
vs union
distinction. Some of this project would need to be establishing a convention. eg. special otherwise invalid field name like "+id":"enum_t"
Or "+type":"struct"
.
3. The numbers NaN and Infinity are not support in JSON, they are considered null.
If not initially, at some point an option for JSON5 format would be helpful. fyi. epics-base has included a JSON5 aware parser since 7.0.5, which I would like in future to start using with PVXS.
from pvxs.
Related Issues (20)
- Adding pvlist feature HOT 4
- Intermittent failure of `testsock` HOT 6
- pvget not returning anything when setting EPICS_PVA_ADDR_LIST and EPICS_PVA_AUTO_ADDR_LIST to NO HOT 4
- Decode error resulting from incorrect TypeStore maintenance HOT 2
- TypeDef from Value containing Union does not work HOT 3
- Problem when monitoring NT PV with value field as "any" HOT 5
- Intermittent failure of `test1000`
- How to improve PVA put concurrency performance HOT 1
- ioc: add PVA link support HOT 1
- pvxput doesn't understand NTEnum HOT 1
- Feature request: `python -m pvxslibs.ioc` HOT 2
- Seg fault if `PVXS_QSRV_ENABLE` not set HOT 5
- (apparently) spurious compile error with GCC 12 HOT 5
- ci-scripts submodule is using non-existing commit HOT 4
- PREC from DB isn't reported correctly. HOT 3
- Trigger warning behaviour HOT 3
- Status of put operation HOT 4
- Incorrect .dbd included in python builds HOT 1
- Feature suggestion: pvxget and pvxmonitor could use more output options HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pvxs.