From 453a2a3a46b30c6e6e0aa21093704c4225be8a69 Mon Sep 17 00:00:00 2001 From: georgweiss Date: Tue, 2 Dec 2025 19:56:27 +0100 Subject: [PATCH] Allow indexed access of scalar array elements for pva --- .../java/org/phoebus/pv/pva/PVAStructureHelper.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/pv-pva/src/main/java/org/phoebus/pv/pva/PVAStructureHelper.java b/core/pv-pva/src/main/java/org/phoebus/pv/pva/PVAStructureHelper.java index 3d5f8d4d74..e6282c15d9 100644 --- a/core/pv-pva/src/main/java/org/phoebus/pv/pva/PVAStructureHelper.java +++ b/core/pv-pva/src/main/java/org/phoebus/pv/pva/PVAStructureHelper.java @@ -110,8 +110,14 @@ else if (field instanceof PVAString) return decodeScalar(actual); if (type.equals("NTEnum:1.0")) return Decoders.decodeEnum(actual); - if (type.equals("NTScalarArray:1.0")) - return decodeNTArray(actual); + if (type.equals("NTScalarArray:1.0")) { + if(elementIndex.isPresent()){ + return decodeNTArray(actual, elementIndex.get()); + } + else{ + return decodeNTArray(actual); + } + } if (type.equals("NTNDArray:1.0")) return ImageDecoder.decode(actual); if (type.equals("NTTable:1.0"))