Closed manojkiraneda closed 3 years ago
Hi @manojkiraneda . The short answer is that you are calling reply.read(...) incorrectly.
Tuple is supported by sdbusplus, and this shows because the code compiled. What happens though is that we treat a C++ tuple type as equivalent to the dbus struct type. What you’re doing by passing the tuple directly to read is you are asking sdbusplus to pull a struct out of the message, which isn’t there, and hence the ENXIO error (from the underlying sdbus function we call).
You need to pass the elements of the tuple to the read independently.
reply.read(attr.get<0>(), attr.get<1>(), attr.get<2>());
Alternatively, if you don’t have need for a tuple otherwise, you can pass references to 3 local variables directly.
I am not sure if this qualifies as a bug for sdbusplus or some other repo(bios-settings-mgr). I have been testing my code against https://gerrit.openbmc-project.xyz/c/openbmc/bios-settings-mgr/+/35563.
Here is my sample code :
I get this error when executing the binary:
But i see the underlying busctl call succeded - using busctl monitor
And the busctl call also seems to return fine:
The message signature is svv -> so i was using a tuple<string,variant,variant> container to catch the dbus message. Am i doing something wrong ? or is the sdbusplus lacking support for tuple message type ?