Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Response to Query/GET if data is not available #255

Open
tpaetz opened this issue Jul 6, 2022 · 1 comment
Open

Response to Query/GET if data is not available #255

tpaetz opened this issue Jul 6, 2022 · 1 comment

Comments

@tpaetz
Copy link
Contributor

tpaetz commented Jul 6, 2022

According to the documentation, the following behavior has to be used if data for a response to a GET message is not available:

"GET_" query message is used to request for a single message with type . The receiver of "GET_" message must return a message with type and the same name as the query message. A "GET_" message without device name requests any available data. If data is not available, a returned message must be null body (data size = 0). A format of "GET_" may be defined per data type, if necessary.

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?

@leochan2009
Copy link
Contributor

leochan2009 commented Jan 31, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants