I may add a few things. I wrote the data that is send and received
into text files for comparison.

For the Java part, I do the following to write :
---------------------
FileOutputStream output;
try {
     output = new FileOutputStream("outputJava.txt", false);
     data.writeTo(output);
     output.close();
}
---------------------
and get (binary to hex with vim) :
---------------------
0000000: 0900 0000 0000 00e0 3f11 9a99 9999 9999  ........?.......
0000010: f93f 0a                                  .?.
---------------------
For the C++ part, I do the following to write :
---------------------
ofstream myfile;
myfile.open ("outputCpp.txt");
myfile << strbuf;
myfile.close();
---------------------
and get (binary to hex with vim) :
---------------------
0000000: aced 0005 7713 1209 0000 0000 0000 e03f  ....w..........?
0000010: 119a 9999 9999 99f9 3f0a                 ........?.
---------------------

There are 6 bytes in addition when received the data ! I checked with
Wireshark, these extra bytes are sent by the Java part, but are not
part of the IRobotData message.

So I tried to remove these extra bytes and the following happens :
---------------------
Start !
recv size:4
recv size:21
recv size:0
string size:25
is NOT initialized
has not phi
has not distance
phi:0, distance:0
Quit !
---------------------
The error is gone, but the data is not better received. I added a
check for whether the IRobotData variable is initialised, and it is
not. So it appears that the message is still not correctly handled...

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to