HLA JSON visualizer



I have made an HLA that takes as input an SPI analyzer. My HLA parses and displays high-level SPI messages. The first byte is the "message ID", and the following bytes are the "message payload", that are interpreted according to the message ID. For example:

  • "message ID" = 0x00 means "FW version", which is an integer,
  • "message ID" = 0x01 means "Device name", which is a string,
  • "message ID" = 0x02 means "Current time", which is a 32-bit unix time, but could be a human-readable string,
  • "message ID" = 0x03 means "Status", which is a 32-bit unix time with the last reset time, followed by a 32-bit unix time with the last charge time.

Each one of these messages has a different interpretation and even a different types, or number of items. I can create a column in the viewer for each payload, "FW version", "Device name", "Current time", but it is not practical (I have described 4 messages as an example, but I have hundreds of messages).

What I was thinking that would be great is for my HLA to return a JSON (or other generic format) and the Logic software to be able to nicely interpret that JSON. There would be only one column "Payload", that

  • for a "FW Version" my HLA returns: '{"FW Version": 3}'
  • for the "Device name", my HLA returns: '{"Device name": "Testing breadboard SN 0003"}'
  • for the "Current time", my HLA returns: '{"Current time": "02 Nov 2022, 12:46:30"}'
  • for the "Status", my HLA returns: '{"Last reset time": "02 Nov 2022 12:46:30", "Last charge time": "31 Oct 2022 00:00:00"}'

It is important that the user sees the name of the contents ("Last reset time" and "Last charge time") and not only the contents so the user does not have to guess what is the meaning of each field.

I think this solution would be very general and useful.

When I say "the Logic software to be able to nicely interpret a JSON", I am thinking of JSON data formatted as a table or something nice to see (like the following website: https://jsongrid.com/json-viewer); when I hover over the data with the mouse pointer.