0
$\begingroup$

Rosanswers logo

Hello,

I'm looking at the client code (also the server) of AddTwoInts .. and I came across this code:

ServiceClient<rosjava_test_msgs.AddTwoIntsRequest, rosjava_test_msgs.AddTwoIntsResponse> serviceClient;

now my question is, who supplies the implementation of AddTwoIntsRequest and AddTwoIntsResponse ? They are interfaces, with methods such as setA , setSum, etc.. but I can't find an implementation for these methods anywhere..


Originally posted by AMiNAsFour on ROS Answers with karma: 7 on 2014-03-30

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The implementation of the messages are created in runtime by some Proxy "magic". When you receive a message from a topic or a service, an implementation for those interfaces is created, allowing you to access and set it's members.

Damon Kohler explains this (very briefly, without diving too deep) in his talk where he presented Rojava: https://www.youtube.com/watch?v=ATuVExlkirY


Originally posted by jubeira with karma: 1054 on 2017-11-07

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.