epics-base / pvaClientCPP

pvaClientCPP is an EPICS V4 C++ module
http://epics-pvdata.sourceforge.net/index.html
Other
2 stars 8 forks source link

Scalar Array Put Into Fields Not Named "value" #53

Closed sveseli closed 5 years ago

sveseli commented 5 years ago

At the moment one cannot separately update (via request descriptor) scalar array fields that are not called "value". The checkValue() call in putStringArray() function shown below rejects such puts. Similar problem occurs in multiple places in the PvaClientPutData class.

void PvaClientPutData::putStringArray(shared_vector const & value) { checkValue(); PVStringArrayPtr pv = pvStructure->getSubField("value"); if(!pv) { throw std::runtime_error(messagePrefix + notStringArray); } pv->replace(value); }

mrkraimer commented 5 years ago

I agree that should work on any field that is a scalarArray. Same for putString, putDouble, putDoubleArray, getString, getDouble, getStringArray,getDoubleArray.

mrkraimer commented 5 years ago

This caused more changes than I thought. I really had the name "value" as an integral part of getDouble, putDouble, etc. I made major changes to the PvaClient*Data implementation. But with 200+ LESS lines of code and satisfying this issue I still want to make few changes and also update doc.

But if you want to try it, the new code is in: pvaClientCPP

Marty

mrkraimer commented 5 years ago

I spoke to soon. It does not work properly.

mrkraimer commented 5 years ago

pull request #55 addresses this issue