ipa-fxm-db/rosbridge_suite — pull request #43 by ipa-fxm (2013-09-03 16:08:21+00:00)
Title: preliminary fix for correctly compose message fragments wrt message_size

It seems that fragmentation uses the fragment_size to determine the length of the "data" field in the fragment message resulting in fragment_messages longer than fragment_size due to the frag_message overhead ("total", "num",....)
I thought fragment_size should rather be used to guarantee, that the length of the fragment message does not exceed the fragment_size as the fragment_size is retrieved from the socket_size of the rosbridge client (at least that's how we used it with Matlab and LabVIEW)

The current solution works for my tests with Matlab/LabVIEW, however it's not yet optimal (i.e. not fully using the fragment_size to the full extend) It is a little tricky as when copying content from the unfragmented messages into the "data" field, slashes \ are added to quote the "'s thus increasing the original unfragemnted message length...