is it possible to return 2 or more values when calling a daemon via the xmlrpc interface?
xmlrpc = rpc_factory(“xmlrpc”, “http://127.0.0.1:40404/RPC2”)
result = xmlrpc.get_newTarget()
With the get_newTarget() call I want to get target calculated by my daemon and a return code (int) that tells me, wether this calculation was succesful.
Is it maybe possible to get a custom struct as result, that contains a pose and an integer?
I know returning structs works well with xmlrpc interface for variables of type pose. But is it also possible to have an own struct type in URScript that can be set by the rpc return value?
Is it possible to pass variables from URscript by reference. That would mean, that a modification of a parameter passed via xmlrpc is propagated to urscript.
Example: newTarget= xmlrpc.get_newTarget(arg1, argByRef)
After the call newTarget should contain the calculated pose var und argByRef should contain the integer signalling the outcome. For that purpose argByRef would have to be modified by the xmlrpc server.
Thank you for your help!
well, according tp xmlrpc spec, you could return array or struct,
please refer to
Thanks for your proposal!
I have seen that UR does it exactly this way for their script functions. It’s not exactly want I want, but it will solve my problem.
I have not been able to send custom structs, only custom arrays.