Add +type:"structure"
This commit is contained in:
@ -108,6 +108,7 @@ record(...) {
|
|||||||
@li "any"
|
@li "any"
|
||||||
@li "meta"
|
@li "meta"
|
||||||
@li "proc"
|
@li "proc"
|
||||||
|
@li "structure"
|
||||||
|
|
||||||
The "scalar" mapping places an NTScalar or NTScalarArray as a sub-structure.
|
The "scalar" mapping places an NTScalar or NTScalarArray as a sub-structure.
|
||||||
|
|
||||||
@ -124,6 +125,9 @@ placed in the top-level structure.
|
|||||||
The "proc" mapping uses neither "value" nor meta-data.
|
The "proc" mapping uses neither "value" nor meta-data.
|
||||||
Instead the target record is processed during a put.
|
Instead the target record is processed during a put.
|
||||||
|
|
||||||
|
The "structure" mapping allows an "+id" to be attached without a "+channel".
|
||||||
|
So none of "+channel", "+trigger", nor "+putorder" are meaningful for a "structure" mapping.
|
||||||
|
|
||||||
@subsubsection qsrv_group_map_trig Field Update Triggers
|
@subsubsection qsrv_group_map_trig Field Update Triggers
|
||||||
|
|
||||||
The field triggers define how changes to the consitutent field
|
The field triggers define how changes to the consitutent field
|
||||||
|
@ -5,6 +5,9 @@
|
|||||||
Release 1.3.2 (UNRELEASED)
|
Release 1.3.2 (UNRELEASED)
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
|
- Additions
|
||||||
|
- Add new "structure" to @ref qsrv_group_map_types
|
||||||
|
|
||||||
Release 1.3.1 (June 2021)
|
Release 1.3.1 (June 2021)
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
|
@ -1175,6 +1175,47 @@ struct ProcBuilder : public PVIFBuilder
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct PVIFNoOp : public PVIF
|
||||||
|
{
|
||||||
|
PVIFNoOp(dbChannel *channel) :PVIF(channel) {}
|
||||||
|
|
||||||
|
virtual void put(epics::pvData::BitSet& mask, unsigned dbe, db_field_log *pfl) OVERRIDE FINAL
|
||||||
|
{}
|
||||||
|
|
||||||
|
virtual pvd::Status get(const epics::pvData::BitSet& mask, proc_t proc, bool permit) OVERRIDE FINAL
|
||||||
|
{
|
||||||
|
return pvd::Status();
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual unsigned dbe(const epics::pvData::BitSet& mask) OVERRIDE FINAL
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct IDBuilder : public PVIFBuilder
|
||||||
|
{
|
||||||
|
explicit IDBuilder(dbChannel* chan) :PVIFBuilder(chan) {}
|
||||||
|
virtual ~IDBuilder() {}
|
||||||
|
|
||||||
|
// fetch the structure description
|
||||||
|
virtual epics::pvData::FieldConstPtr dtype() OVERRIDE FINAL {
|
||||||
|
throw std::logic_error("Don't call me");
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual epics::pvData::FieldBuilderPtr dtype(epics::pvData::FieldBuilderPtr& builder,
|
||||||
|
const std::string& fld) OVERRIDE FINAL
|
||||||
|
{
|
||||||
|
// caller has already done builder->setId(...)
|
||||||
|
return builder;
|
||||||
|
}
|
||||||
|
virtual PVIF* attach(const epics::pvData::PVStructurePtr& root,
|
||||||
|
const FieldName& fldname) OVERRIDE FINAL
|
||||||
|
{
|
||||||
|
return new PVIFNoOp(channel);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
}//namespace
|
}//namespace
|
||||||
|
|
||||||
pvd::Status PVIF::get(const epics::pvData::BitSet& mask, proc_t proc, bool permit)
|
pvd::Status PVIF::get(const epics::pvData::BitSet& mask, proc_t proc, bool permit)
|
||||||
@ -1240,6 +1281,8 @@ PVIFBuilder* PVIFBuilder::create(const std::string& type, dbChannel* chan)
|
|||||||
return new MetaBuilder(chan);
|
return new MetaBuilder(chan);
|
||||||
else if(type=="proc")
|
else if(type=="proc")
|
||||||
return new ProcBuilder(chan);
|
return new ProcBuilder(chan);
|
||||||
|
else if(type=="structure")
|
||||||
|
return new IDBuilder(chan);
|
||||||
else
|
else
|
||||||
throw std::runtime_error(std::string("Unknown +type=")+type);
|
throw std::runtime_error(std::string("Unknown +type=")+type);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user