Skip to content

Custom message support #8

@AlanKuurstra

Description

@AlanKuurstra

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions