pvxput: verbose flag show marked fields

This commit is contained in:
Michael Davidsaver
2026-01-05 13:30:48 -08:00
parent 42ec1602a3
commit 91dd4d4592
+6 -1
View File
@@ -114,7 +114,7 @@ int main(int argc, char *argv[])
auto op =ctxt.put(pvname)
.pvRequest(request)
.build([&values](Value&& prototype) -> Value {
.build([&values, verbose](Value&& prototype) -> Value {
auto val = std::move(prototype);
// clear all defined fields, but retain "current" values for NTEnum lookup.
val.unmark(false, true);
@@ -125,6 +125,11 @@ int main(int argc, char *argv[])
throw std::runtime_error(SB()<<"Unable to assign "<<pair.first<<" from \""<<escape(pair.second)<<"\"");
}
}
if(verbose) {
std::cout<<"Writing fields:\n";
Indented I(std::cout);
std::cout<<val.format().delta()<<"\n";
}
return val;
})
.result([&ret, &done](client::Result&& result) {