Replies: 1 comment
-
|
OpenIGTLink messages are typically used for state updates, therefore obsolete states are ignored, therefore the current behavior is desirable. However, OpenIGTLink messages could be used as commands and then it may be required that all messages are preserved, for example in a queue. Therefore, I agree that it could be useful to add API to collect all messages. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using the library to receive a stream of image messages and occasional string messages (on the same device name) and observed that some of the string message do not arrive at my client.
One can easily reproduce this by sending a larger image while sending string messages with counter values. The observation is that the counter values sent during image message transmit are lost. i.e. never arrive at the client through
get_lastest_messages(..)orwait_for_message(...).Reviewing the code, the reason for this behavior is, that only the last message per device is stored in the incoming_messages dict.
I verified the messages actually arrive via the socket, but are then overwritten in comm.py line 141 over and over again before they are collected via
get_lastest_messages(...)orwait_for_message(...).The general question is, whether the lib should be able to support queuing of message or stay with the implicit message skipping it has now.
If message queues should be supported, a solution could be to extend the dict to store lists of messages per device or even a list of messages independent of device.
-On
get_lastest_messages(...)these could be flattened to a list of messages,-On
wait_for_message(...)this would, however, potentially change the return value from a message to a list of messages.Also the lib would then need a mechanism to prevent overflow if the messages are never collected. e.g. a max queue size.
Beta Was this translation helpful? Give feedback.
All reactions