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

A parser for new Formatter health ping data #7

Open
thanasipantazides opened this issue Dec 28, 2024 · 0 comments
Open

A parser for new Formatter health ping data #7

thanasipantazides opened this issue Dec 28, 2024 · 0 comments

Comments

@thanasipantazides
Copy link
Contributor

Why

The Formatter PR 75 introduces a new downlink packet for Formatter/system health diagnosis.

Assuming this PR is accepted, the GSE could use a parser to display data in these health packets.

Info for implementation

For background, the health packets look like this:

formatter_health_ping

But the 8 byte header is stripped off by the logger. So the data on disk will be the concatenation of 46 byte frames.

The parser will be simple, just digest the bytes of the packet based on the above structure. There are some error tables that use bit flags, so iterate over those and return a dict where the flags are named descriptively. Reference for the flag values is here, in Parameters.h.

One thought: it would be convenient to include a string value name for each system in addition to the bare hex code. That can be done via lookup to systems.json. Include some module-level code at top of this parser file (to run each time it is imported) to try to find and open systems.json, and make a table of name-hex code pairs.

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