pvxput: verbose flag show marked fields
This commit is contained in:
+6
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user