Hi,
I'm tryig to find a way to use DDS to publish some data struct that contains a void* member. Ths void* variable will point to an image. The conceptual issue I'm facing is the size of the data. How can DDS know upfront the size of whatever it is I'm sending in void*?
Sorry if the question doesn't make a lot of sense.
Primarily it does not make sense because a void * is a pointer to a block of memory. If you send a pointer to a block of memory... like "0x44ee1210", the value 0x44ee1210 gets sent.
Who knows what that is pointing at by a remote application. It may not even be mapped, causing the machine to flat out crash -- probably not what you want.
Chunk the image into 16k segments, fill a sequence of samples and send them. Subscriber then rebuilds the file from the segments. Or use 5.2.0's unbounded sequence (of octet)
but: DDS is not apt for sending files. It's better to send a noticethat a file is available at a given url, and then let your subscriber use curl or sftp or some dedicated file-transfer protocol to pull the file, and simply send a "got it" back once it has it.