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

Complex number support for fjåge JSON protocol #249

Open
1 of 2 tasks
mchitre opened this issue Jul 15, 2022 · 1 comment
Open
1 of 2 tasks

Complex number support for fjåge JSON protocol #249

mchitre opened this issue Jul 15, 2022 · 1 comment
Assignees

Comments

@mchitre
Copy link
Member

mchitre commented Jul 15, 2022

Some languages support complex arrays (e.g. Julia, Python, etc). But JSON doesn't, and Java doesn't. We serialize complex arrays as interleaved real/imaginary parts, which is fine. But we need a way to indicate that the array data is to be treated as complex.

UnetStack uses a mechanism or adding a boolean true field with a suffix __isComplex for complex arrays. For example, if a field signal is a complex array, a field signal__isComplex = true is added to the JSON message.

This works well for most use cases, and is already implemented in Fjage.jl too. I propose that we add this to the JSON specifications for fjåge and implement it consistently across all gateways. Currently the only affected gateway will be Python (fjagepy).

Tasks:

@notthetup
Copy link
Collaborator

notthetup commented Jul 16, 2022

Also to update Gateway.md to update the spec to mention this.

Done. 8441abe

@notthetup notthetup assigned notthetup and unassigned prasadtiru and notthetup Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants