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: Re: 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>, Ralph Lange <ralph.lange at gmx.de>
Date: Mon, 19 Jan 2026 23:18:06 +0000
Hi Ralph,


I'm sure you are correct.  I believe the issue is that PVXS is promoting the datatype during an assignment in the plugin code.  This is not obvious.

This is the line that sets the codec.parameters field in ntndArrayConverterPvxs.cpp:

    m_value["codec.parameters"] = (int32_t) NDDataTypeToScalar[src->dataType];

m_value is of type pvxs::Value.  It is doing its best to define codec.parameters as being of type int32_t.

However, as far as I can tell PXVS use the StoreType enum to define the datatypes that can be stored.

It is:
enum struct StoreType : uint8_t {
    Null,     //!< no associate storage
    Bool,     //!< bool
    UInteger, //!< uint64_t
    Integer,  //!< int64_t
    Real,     //!< double
    String,   //!< std::string
    Compound, //!< Value
    Array,    //!< shared_array<const void>
};

Note that all numeric values are 64-bits.

This is where it maps all signed integers to 64-bits:

// map signed integers to int64_t
template<typename T>
struct StorageMap<T, typename std::enable_if<std::is_integral<T>::value && std::is_signed<T>::value>::type>
{ typedef int64_t store_t;  static constexpr StoreType code{StoreType::Integer}; };

So the issue is that PVXS is not allowing the creation of the same data structures that PVA does, at least not with the Value class.

There is a further issue.  NTNDArrays can be compressed.  For compressed arrays the datatype is effectively uint8_t, but the actual datatype of the original array must be conveyed.  By convention this is stored in codec.parameters as an int.  The int is one of the values in the ScalarType enum.

The ScalarType enum is defined here in PVA:

For Java it is defined here:

However, I cannot find an equivalent enum in PVXS.  So ntndArrayConverterPvxs.cpp currently has to include pv/pvIntrospect.h from PVA to get the required definition.  This is ugly since it is mixing code from PVA and PVXS.

Thanks,
Mark


From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Ralph Lange via Tech-talk <tech-talk at aps.anl.gov>
Sent: Monday, January 19, 2026 2:30 AM
To: EPICS Tech Talk <tech-talk at aps.anl.gov>
Subject: Re: Issues with PVXS
 
Not good.

From a formal point of view...
If you look at the NT specification of the NTNDArray [1], the types of these parameters and attributes are not fixed in the specification, so both servers (the one using the original stack and the one using PVXS) are shipping different valid NTNDArrays.

To increase robustness, the general direction of fixing should be to make the receiving side cope with the allowed variability inside NTNDArray. The fastest and/or most practical approach might differ.

IOC crashes are unacceptable and bugs in any case, obviously.

I would be really surprised if PXVS changed any user-configured data types. Please verify that the new AD plugin really calls PVXS with data structures that are different from what you see on the network.

Cheers,
~Ralph


Replies:
Re: Issues with PVXS Michael Davidsaver via Tech-talk
References:
Issues with PVXS Mark Rivers via Tech-talk
Re: Issues with PVXS Ralph Lange via Tech-talk

Navigate by Date:
Prev: Re: Issues with PVXS Ralph Lange via Tech-talk
Next: Re: Issues with PVXS Michael Davidsaver 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: Issues with PVXS Ralph Lange via Tech-talk
Next: Re: Issues with PVXS Michael Davidsaver 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 ·