An error results when trying to set an artdaq process's mask via xmlrpc
While working on Issue #23792, I discovered that it's not currently possible to call trace_set via XML-RPC. E.g., if I have an artdaq process listening on port 11102 and I call:
xmlrpc http://localhost:11102/RPC2 daq.trace_set s/T s/ALL i/$((0x378))
Then I get this response:
String: 'The trace_set command expects a mask type (M, S , or T), a name (ALL for all) and a mask'
JCF: Issue #23824: have the mask argument to trace_set be a string rather than an unsigned 64-bit integer so we don't have problems with XML-RPC
#1 Updated by John Freeman about 1 month ago
- % Done changed from 0 to 100
- Status changed from New to Resolved
This is resolved with commit d62982a30109a646cf1aa49d109fc3616d5c4700 on the feature/23824_fix_trace_set branch. Googling around, it appeared that using 64-bit unsigned integers as arguments, which is what's currently used for the TRACE mask in the trace_set call, may be problematic in XML-RPC. What I did is simply change the format of the argument to a string, and then convert it to an unsigned 64-bit integer inside of artdaq::Commandable::do_trace_set.
#3 Updated by Eric Flumerfelt about 1 month ago
- Assignee set to John Freeman
- Co-Assignees Eric Flumerfelt added
With f42d46947a03 on the feature/23824_fix_trace_set branch, I have added parameter names to the various functions in Commandable, CommanderInterface, and xmlrpc_commander. This should help reduce confusion for trace_set's arguments; I have also standardized to "name, type, mask" order. I have also made several other enhancements to xmlrpc_commander, fixing data types where necessary. All of these changes are supported by the updated commander_test executable, which actually tests the return status from the commander plugin now.
#4 Updated by John Freeman about 1 month ago
- Status changed from Resolved to Reviewed
Using the current head of DAQInterface's develop branch (fcab4748641e996c93ed163f030fea7c255821ab) I can see that with the aforementioned commit on artdaq's feature/23824_fix_trace_set branch trace_get and trace_set continue to work with the new "name, type, mask" argument order. Also, from code inspection, I see that the arguments are now given names in the artdaq code, and "mrb t" reveals that all tests pass, including the relevant-to-this-issue commander_test_xmlrpc_t .