use _ instead of masterField to designate top level structure in the request

This commit is contained in:
Sinisa Veseli
2021-11-30 10:32:38 -06:00
parent 9dfebf1897
commit a68ef61a10

View File

@ -437,10 +437,10 @@ bool PVCopy::init(epics::pvData::PVStructurePtr const &pvRequest)
entireMaster = true;
}
else {
// If masterField is in the request, but not in the master structure,
// then assume entire master is requested
PVStructurePtr masterFieldPtr = pvMaster->getSubField<PVStructure>("masterField");
PVStructurePtr requestFieldPtr = pvRequest->getSubField<PVStructure>("masterField");
// If "_" is in the request, but not in the master structure,
// then assume the top level PV structure is requested
PVStructurePtr masterFieldPtr = pvMaster->getSubField<PVStructure>("_");
PVStructurePtr requestFieldPtr = pvRequest->getSubField<PVStructure>("_");
if (!masterFieldPtr && requestFieldPtr) {
entireMaster = true;
pvOptions = requestFieldPtr->getSubField<PVStructure>("_options");