Open tpaetz opened 2 years ago
Hi Torben,
I think the Get_ message should work both with header_version == 2 and 1. OpenIGTLink is able to process the message without content. The application should be able to get the message type from the header; for example, the Get_ImageMesage has a message type of "GET_IMAGE": https://github.com/openigtlink/OpenIGTLink/blob/master/Source/igtlImageMessage.h#L36
As you mentioned, in the case of OpenIGTLink_HEADER_VERSION == 2 with extended header and meta data. The mesage should carry meta data and the extended header but with a content size == 0. So in Header_version==2, the whole message length will be HEADER_size(58)+ExtenderHeaderSize(14)+2 bytes for (indexing purpose in the meta data) + 0 content size= 74 Bytes in total
According to the documentation, the following behavior has to be used if data for a response to a GET message is not available:
How to interpret this with OpenIGTLink_HEADER_VERSION == 2, i.e. with extended header and meta data? Should this be done via a message that may carry meta data and the extended header but with a content size == 0? Or should a fallback to protocol version 1 without meta data and extended header be used in such a case? Is OpenIGTLink prepared to process messages without content?