Skip to content

Conversation

@ljwoods2
Copy link
Collaborator

Fixes #48

Changes made in this Pull Request:

  • Added an IMD server
  • Moved IMDFrame to IMDProtocol.py

PR Checklist

  • Tests?
  • Docs?
  • CHANGELOG updated?
  • Issue raised/referenced?

@ljwoods2 ljwoods2 marked this pull request as draft November 10, 2025 21:32
@codecov
Copy link

codecov bot commented Nov 10, 2025

Codecov Report

❌ Patch coverage is 25.52301% with 178 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.16%. Comparing base (73d54b7) to head (6d0e897).

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines +200 to +201
if self.sinfo.time:
buf_len += IMDHEADERSIZE + IMDTIMEPACKETLENGTH
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if self.sinfo.time:
buf_len += IMDHEADERSIZE + IMDTIMEPACKETLENGTH
buf_len += int(self.sinfo.time) * (IMDHEADERSIZE + IMDTIMEPACKETLENGTH)

Copy link
Contributor

@amruthesht amruthesht Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This maybe an issue since sinfo.time >=1 as per the protocol. int(bool(self.sinfo.time)) might be a better option

Suggested change
if self.sinfo.time:
buf_len += IMDHEADERSIZE + IMDTIMEPACKETLENGTH
buf_len += int(bool(self.sinfo.time)) * (IMDHEADERSIZE + IMDTIMEPACKETLENGTH)

Comment on lines +113 to +116
if version == 2:
self._send_handshakeV2()
elif version == 3:
self._send_handshakeV3()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that you're checking version above. It still makes me squirm to have no else so I'd add assert 2 <= version <= 3, just in case the IMDVERSIONS get updated but nothing is done here.

@amruthesht
Copy link
Contributor

@ljwoods2 - Is this built to handle pause/resume flags from a supposed Client?

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

Successfully merging this pull request may close these issues.

Make and document an IMD server for serving written trajectories via IMD

4 participants