SDMDK-8892 separated long data value bytes with spaces, corrected byte ordering#159
SDMDK-8892 separated long data value bytes with spaces, corrected byte ordering#159
Conversation
bgn42
commented
Mar 4, 2026
- corrected byte ordering while loading data and for printing byte strings
- adapted tests and enabled/added more
…e ordering (endianess)
Test Results 3 files 21 suites 0s ⏱️ Results for commit 516cca5. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Pull request overview
This PR adjusts how event “data” byte strings are loaded and displayed, correcting byte ordering in value extraction and updating output formatting/tests in the tools/eventlist utility.
Changes:
- Updated event data string formatting to print per-byte
0xNNvalues separated by spaces. - Switched data loading for byte-string-backed values to use
binary.LittleEndian.Uint32(and updated expectations in tests). - Refactored output formatting branching (json/xml/default) and enabled/expanded related unit tests.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/eventlist/pkg/output/output.go | Refactors JSON/XML output selection logic via switch and flush behavior. |
| tools/eventlist/pkg/event/event.go | Changes byte-string formatting and adjusts byte-order decoding for val1/val2 from data bytes. |
| tools/eventlist/pkg/event/event_test.go | Updates expected strings / integer values to match new formatting and endian handling. |
| tools/eventlist/pkg/eval/value.go | Changes Value.Extract logic for big-/little-endian extraction. |
| tools/eventlist/pkg/eval/value_test.go | Updates/enables extraction tests (including big-endian cases). |
| tools/eventlist/pkg/eval/expression.go | Adjusts postfix “dot member” evaluation to advance the lexer correctly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
…cal variable Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…No change for little endian. And created a better description
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
brondani
left a comment
There was a problem hiding this comment.
Running this over the EventStatistic data from SDMDK-8892 I see the sixth event being printed this way:
6 0.00010010 EvExample Data(64 bytes) 0x00 0x01 0x02 0x03
Adding the endian attribute <typedef name="4BY" info="32-bit structure" size="4" endian="B"> to EventRecorder.scvd and re-running:
6 0.00010010 EvExample Data(64 bytes) 0x03 0x02 0x01 0x00
Which sounds reasonable to me.