EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  2025  <2026 Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  2025  <2026
<== Date ==> <== Thread ==>

Subject: Issues with PVXS
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: EPICS Tech-Talk <tech-talk at aps.anl.gov>
Date: Sun, 18 Jan 2026 18:03:29 +0000
Folks,

areaDetector/ADCore was recently enhanced to support a new NDPluginPVXS plugin which uses the PVXS library to export NTNDArrays.    The existing NDPluginPva uses the original PVA support which is part of EPICS base 7.x.  James Souter was largely responsible for this effort.  One can now build ADCore to support PVXS, or PVA, or both, by editing CONFIG_SITE.local.  One switch to use either PVXS or PVA when the IOC starts by changing commonPlugins.cmd.

I expected that using PVXS would not require any modifications to existing pvAccess clients that receive NTNDArrays over pvAccess.  These clients include: 

However, that is not what I observe.


The root cause of these problems is shown by the differences seen in an NTNDArray received with pvget  depending on whether the pvAccess server is PVA or PVXS.

This is pvget when using ADSimDetector and NDPluginPva:

(base) [epics@corvette ~]$ pvget 13SIM1:Pva1:Image
13SIM1:Pva1:Image epics:nt/NTNDArray:1.0
    union value
        ubyte[]  [69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,
...
    codec_t codec
        string name
        any parameters
            int  5
    long compressedSize 1048576
    long uncompressedSize 1048576
    dimension_t[] dimension
        dimension_t
            int size 1024
            int offset 0
            int fullSize 1024
            int binning 1
            boolean reverse false
        dimension_t
            int size 1024
            int offset 0
            int fullSize 1024
            int binning 1
            boolean reverse false
    int uniqueId 69
    time_t dataTimeStamp 2026-01-18 11:24:25.940
        long secondsPastEpoch 1768757065
        int nanoseconds 939971208
        int userTag 0
    epics:nt/NTAttribute:1.0[] attribute
        epics:nt/NTAttribute:1.0
            string name ColorMode
            any value
                int  0
            string descriptor Color mode
            int sourceType 0
            string source Driver
        epics:nt/NTAttribute:1.0
            string name Int8
            any value
                byte  -8
            string descriptor Int8 attribute
            int sourceType 3
            string source myAttrFunct1
        epics:nt/NTAttribute:1.0
            string name UInt8
            any value
                ubyte  8
            string descriptor UInt8 attribute
            int sourceType 3
            string source myAttrFunct1
        epics:nt/NTAttribute:1.0
            string name Int16
            any value
                short  -16
            string descriptor Int16 attribute
            int sourceType 3
            string source myAttrFunct1
        epics:nt/NTAttribute:1.0
            string name UInt16
            any value
                ushort  16
            string descriptor UInt16 attribute
            int sourceType 3
            string source myAttrFunct1
...

Note that codec.parameters and the ColorMode attribute are of type "int".  The numeric attributes have datatypes "byte", "ubyte", "short", and "ushort".

This is pvget when using ADSimDetector and NDPluginPVXS:

13SIM1:Pva1:Image epics:nt/NTNDArray:1.0
    union value
        ubyte[]  [28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,
...
    codec_t codec
        string name
        any parameters
            long  5
    long compressedSize 1048576
    long uncompressedSize 1048576
    int uniqueId 29
    time_t dataTimeStamp 2026-01-18 11:38:30.780
        long secondsPastEpoch 1768757910
        int nanoseconds 779778718
    time_t timeStamp 2026-01-18 11:38:30.780
        long secondsPastEpoch 1768757910
        int nanoseconds 779778610
    dimension_t[] dimension
        dimension_t
            int size 1024
            int offset 0
            int fullSize 1024
            int binning 1
            boolean reverse false
        dimension_t
            int size 1024
            int offset 0
            int fullSize 1024
            int binning 1
            boolean reverse false
    epics:nt/NTAttribute:1.0[] attribute
        epics:nt/NTAttribute:1.0
            string name ColorMode
            any value
                long  0
            string[] tags []
            string descriptor Color mode
            alarm_t alarm
                int severity 0
                int status 0
                string message
            time_t timeStamp
                long secondsPastEpoch 0
                int nanoseconds 0
                int userTag 0
            int sourceType 0
            string source Driver
        epics:nt/NTAttribute:1.0
            string name Int8
            any value
                long  -8
            string[] tags []
            string descriptor Int8 attribute
            alarm_t alarm
                int severity 0
                int status 0
                string message
            time_t timeStamp
                long secondsPastEpoch 0
                int nanoseconds 0
                int userTag 0
            int sourceType 3
            string source myAttrFunct1
        epics:nt/NTAttribute:1.0
            string name UInt8
            any value
                ulong  8
            string[] tags []
            string descriptor UInt8 attribute
            alarm_t alarm
                int severity 0
                int status 0
                string message
            time_t timeStamp
                long secondsPastEpoch 0
                int nanoseconds 0
                int userTag 0
            int sourceType 3
            string source myAttrFunct1
        epics:nt/NTAttribute:1.0
            string name Int16
            any value
                long  -16
            string[] tags []
            string descriptor Int16 attribute
            alarm_t alarm
                int severity 0
                int status 0
                string message
            time_t timeStamp
                long secondsPastEpoch 0
                int nanoseconds 0
                int userTag 0
            int sourceType 3
            string source myAttrFunct1
        epics:nt/NTAttribute:1.0
            string name UInt16
            any value
                ulong  16
            string[] tags []
            string descriptor UInt16 attribute
            alarm_t alarm
                int severity 0
                int status 0
                string message
            time_t timeStamp
                long secondsPastEpoch 0
                int nanoseconds 0
                int userTag 0
            int sourceType 3
            string source myAttrFunct1
...

Note that codec.parameters and the ColorMode attribute are of type "long".  The numeric attributes have datatypes "long", "ulong", "long", and "ulong".

The ImageJ NTNDAViewer plugin is written to expect codec.parameters and ColorMode to both be of type "int", and throws errors if they are not.

I suspect that the CSS/Phoebus widget is generating errors for compressed images because it expects codec.parameters to be an int, but it is not.  I have not tracked down why JPEG compression crashes the IOC, and not CSS.

The bottom line is that PVXS promotes all numeric scalars to 64-bit datatypes.  I have not shown it above, but Int32 and UInt32 are also promoted to long, and Float32 is promoted to Float64.

It appears to me that PVXS cannot produce the same network byte stream that PVA does.

I understand that we can rewrite the ImageJ and CSS/Phoebus Java code to convert codec.parameters and ColorMode from long to int.  But the idea of a network protocol is that replacing the server with a different implementation should not require any modifications to the clients.

For the pvaDriver there is no way to fix the fact that PVXS modifies the NDArrays such that the original array cannot be recovered, because the NDAttribute data types have been changed.

Mark




Replies:
Re: Issues with PVXS Ralph Lange via Tech-talk

Navigate by Date:
Prev: Re: IOC does not pool network link PVs? Johnson, Andrew N. via Tech-talk
Next: Re: Issues with PVXS Ralph Lange via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  2025  <2026
Navigate by Thread:
Prev: Re: IOC does not pool network link PVs? Johnson, Andrew N. via Tech-talk
Next: Re: Issues with PVXS Ralph Lange via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  2025  <2026
ANJ, 19 Mar 2026 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·