Skip to content

CLUS-892: ieee488.2: use parameter delimiters for block data parameters

Mark requested to merge fix/ieee488-block-data-delimiters into main

Description

As required by IEEE 4888.2-1992:

  • Section 7.3: Terminated Program Messages - Functional Syntax, figures 7.4, 7.5, and 7.6;
  • Section 7.4: Seperator Functional Elements, subsection 7.4.2.2;

Message parameters should always be delimited by a ,, even if their length is known. This refactors the code a bit to introduce _read_bins(), yielding an iterator that reads an arbitrary block data parameter every time it is called. This gets rid of the need for manual state management in _read_bin(), so both the parameters for that and the create_read_bin() wrapper that handles some of that state management are removed.

Since this changes the wire protocol, this requires a change in our firmware at the same time. The tests have been updated, and HIL tests have been ran against the updated firmware to confirm interoperability.

This MR also fixes the endianness definition on our struct.pack() and struct.unpack() calls, so they are defined to be little-endian instead of host; the same endianness our current instruments have.

Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Code refactoring (only refactoring of existing code, without new functionality)

Issue(s)

CLUS-892

Testing

Tested using updated unit tests, HIL test confirmation pending.

Notes

Merge checklist

  • Cleaned up code (correct alligment/spacing/code-style, no dead code, etc).
  • Merge request targets main branch.
  • Assigned assignee (you) and reviewers (team-members).
  • Merge request has been reviewed by at least one team-members.
  • All pipelines pass, including manually triggered ones.
  • If merging a repository with a release package, updated appropriate CHANGELOG.md:
    - PULSAR_QxM, CLUSTER_MM, QBLOX_INSTRUMENTS: file in same repository
    - CLSUTER_QxM: file in CLUSTER_MM repo
Edited by Mark

Merge request reports