pvput: fix enum_t
Need to get value.choices
This commit is contained in:
@ -269,6 +269,8 @@ struct Putter : public pvac::ClientChannel::PutCallback
|
||||
|
||||
shared_vector<std::string> jarr;
|
||||
|
||||
PVStructure::const_shared_pointer current;
|
||||
|
||||
virtual void putBuild(const epics::pvData::StructureConstPtr& build, Args& args)
|
||||
{
|
||||
if(debug) std::cerr<<"Server defined structure\n"<<build;
|
||||
@ -314,7 +316,7 @@ struct Putter : public pvac::ClientChannel::PutCallback
|
||||
PVStructure* sfld(static_cast<PVStructure*>(fld.get()));
|
||||
|
||||
PVScalar* idxfld(sfld->getSubFieldT<PVScalar>("index").get());
|
||||
PVStringArray::const_svector choices(sfld->getSubFieldT<PVStringArray>("choices")->view());
|
||||
PVStringArray::const_svector choices(current->getSubFieldT<PVStringArray>("value.choices")->view());
|
||||
|
||||
bool found=false;
|
||||
for(size_t i=0; i<choices.size(); i++) {
|
||||
@ -616,9 +618,11 @@ int main (int argc, char *argv[])
|
||||
|
||||
pvac::ClientChannel chan(ctxt.connect(pvName));
|
||||
|
||||
thework.current = chan.get(timeOut, pvRequest);
|
||||
|
||||
if (mode != TerseMode && !quiet) {
|
||||
std::cout << "Old : ";
|
||||
printValue(pvName, chan.get(timeOut, pvRequest));
|
||||
printValue(pvName, thework.current);
|
||||
}
|
||||
|
||||
{
|
||||
|
Reference in New Issue
Block a user