/* * Copyright - See the COPYRIGHT that is included with this distribution. * pvxs is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. * * Author George S. McIntyre , 2023 * */ #include #include "groupprocessorcontext.h" #include "utilpvt.h" namespace pvxs { namespace ioc { /** * Assign the given value appropriately given the current context. * The context holds the current field, key, depth, etc. * * @param value the value to assign */ void GroupProcessorContext::assign(const Value& value) { canAssign(); auto& groupPvConfig = groupConfigProcessor->groupConfigMap[groupName]; if (depth == 2) { if (field == "+atomic") { groupPvConfig.atomic = value.as(); groupPvConfig.atomicIsSet = true; } else if (field == "+id") { groupPvConfig.structureId = value.as(); } else { groupConfigProcessor->groupProcessingWarnings += SB()<<"Unknown group option: \""<(); MappingInfo::type_t type = groupField.info.type; if(tname == "scalar") { type = MappingInfo::Scalar; } else if(tname == "plain") { type = MappingInfo::Plain; } else if(tname == "any") { type = MappingInfo::Any; } else if(tname == "meta") { type = MappingInfo::Meta; } else if(tname == "proc") { type = MappingInfo::Proc; } else if(tname == "structure") { type = MappingInfo::Structure; } else if(tname == "const") { type = MappingInfo::Const; } else { groupConfigProcessor->groupProcessingWarnings += SB()<<"Unknown mapping +type:\""<(); } else if (key == "+id") { groupField.structureId = value.as(); } else if (key == "+trigger") { groupField.trigger = value.as(); } else if (key == "+putorder") { auto po(value.as()); if(po==std::numeric_limits::min()) po += 1; groupField.info.putOrder = po; } else if (key == "+const") { groupField.info.cval = value; } else { groupConfigProcessor->groupProcessingWarnings += SB()<<"Unknown group field option: \""<