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

Custom message support #8

Open
AlanKuurstra opened this issue Nov 1, 2023 · 0 comments
Open

Custom message support #8

AlanKuurstra opened this issue Nov 1, 2023 · 0 comments

Comments

@AlanKuurstra
Copy link

AlanKuurstra commented Nov 1, 2023

Currently messages with an unknown id cause an error in the converter. Supoprt to forward the raw data of custom messages (without converting) to Gadgetron could be supported. The main problem to solve is figuring out how many bytes belong to the custom message so the converter knows when the next message starts and when it should stop forwarding raw data and resume converting. One solution is as follows.

As is done currently, a developer creates a Gadgetron (preferably network-aware) reader for their custom message. At the start of every communication the converter will read the config (either from the stream or from a config file depending on how the user sent it) and parse it for readers. If any readers use a message id/slot that the converter does not recognize, it must load the corresponding reader(s). When that message id appears on the network stream, the converter will use the reader to deserialize the message and determine how many bytes belong to the message. The converter will then forward the message, first by sending the deserialized non network-aware id, and then forwarding the number of bytes determined to belong to the message. In this scenario the converter is only responsible for converting the message id.

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

1 participant