epics-base / pvaClientCPP

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

MultiChannel class support for arbitrary structures #56

Closed sveseli closed 5 years ago

sveseli commented 5 years ago

At this time MultiChannel class seems to support only those structures that have the top level "value" field, e.g.:

void PvaClientNTMultiData::setStructure(StructureConstPtr const &
structure,size_t index)
{
      FieldConstPtr field = structure->getField("value");
      if(!field) {
          string message = "channel "
             + pvaClientChannelArray[index]->getChannel()->getChannelName()
             + " does not have top level value field";
          throw std::runtime_error(message);
      }
}

This restriction should be removed in order to make this class useful for arbitrary structures (i.e., those that do not have top level "value" field).

mrkraimer commented 5 years ago

With latest pvaClientCPP PvaClienNTtMultiData, PvaClientNTMultiGet, and PvaClientNTMultiMonitor now work for data in addition to top level field named "value". In exampleCPP/exampleClient there are two new examples: ntMultiGet and ntMultiMonitor. These can be used to test. I have not looked at PvaClientNTMultiPut

mrkraimer commented 5 years ago

fixed with merge request #60