From 6a187d274ea31d75b3cffff4ba3ec277cd2a30f5 Mon Sep 17 00:00:00 2001 From: dhickin Date: Tue, 23 Sep 2014 10:50:20 +0100 Subject: [PATCH] Reordered fields in NTNDArray --- src/nt/ntndarray.cpp | 12 ++++++------ src/nt/ntndarray.h | 13 +++++++------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/nt/ntndarray.cpp b/src/nt/ntndarray.cpp index 6757330..6b7f278 100644 --- a/src/nt/ntndarray.cpp +++ b/src/nt/ntndarray.cpp @@ -99,9 +99,9 @@ StructureConstPtr NTNDArrayBuilder::createStructure() fb->setId(NTNDArray::URI)-> add("value", valueType)-> + add("codec", codecStruc)-> add("compressedSize", pvLong)-> add("uncompressedSize", pvLong)-> - add("codec", codecStruc)-> addArray("dimension", dimensionStruc)-> add("uniqueId", pvInt)-> add("dataTimeStamp", standardField->timeStamp())-> @@ -284,6 +284,11 @@ PVUnionPtr NTNDArray::getValue() const return pvNTNDArray->getSubField("value"); } +PVStructurePtr NTNDArray::getCodec() const +{ + return pvNTNDArray->getSubField("codec"); +} + PVLongPtr NTNDArray::getCompressedDataSize() const { return pvNTNDArray->getSubField("compressedSize"); @@ -294,11 +299,6 @@ PVLongPtr NTNDArray::getUncompressedDataSize() const return pvNTNDArray->getSubField("uncompressedSize"); } -PVStructurePtr NTNDArray::getCodec() const -{ - return pvNTNDArray->getSubField("codec"); -} - PVStructureArrayPtr NTNDArray::getAttribute() const { return pvNTNDArray->getSubField("attribute"); diff --git a/src/nt/ntndarray.h b/src/nt/ntndarray.h index 8932a82..c2609c1 100644 --- a/src/nt/ntndarray.h +++ b/src/nt/ntndarray.h @@ -137,6 +137,7 @@ public: * @return (false,true) if (is not, is) an NTNDArray. */ static bool is_a(epics::pvData::StructureConstPtr const & structure); + /** * Is the pvStructure compatible with NTNDArray.. * This method introspects the fields to see if they are compatible. @@ -192,6 +193,12 @@ public: */ epics::pvData::PVUnionPtr getValue() const; + /** + * Get the codec field. + * @return the PVStructurePtr. + */ + epics::pvData::PVStructurePtr getCodec() const; + /** * Get the compressedDataSize field. * @return PVStructurePtr. @@ -204,12 +211,6 @@ public: */ epics::pvData::PVLongPtr getUncompressedDataSize() const; - /** - * Get the codec field. - * @return the PVStructurePtr. - */ - epics::pvData::PVStructurePtr getCodec() const; - /** * Get the attribute field. * @return the PVStructurePtr.