Skip to content

feat(hamilton): complete TCP transport client on transport/tcp - #1195

Open
cmoscy wants to merge 5 commits into
PyLabRobot:mainfrom
cmoscy:hamilton-tcp-transport
Open

feat(hamilton): complete TCP transport client on transport/tcp#1195
cmoscy wants to merge 5 commits into
PyLabRobot:mainfrom
cmoscy:hamilton-tcp-transport

Conversation

@cmoscy

@cmoscy cmoscy commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Completes the Hamilton TCP/HOI client under pylabrobot/hamilton/transport/tcp: protocol, wire types, introspection, error tables, and unit tests.

Instrument-agnostic shared layer only — no Prep/Nimbus device peers. Prep (follow-up PR) builds on this.

Replace the thin post-PyLabRobot#1000 stub with the HOI/HARP session client, command
layer, wire types, and introspection stack so Prep/Nimbus can build on it.
cmoscy and others added 4 commits August 8, 2026 22:52
Python 3.9 binds asyncio.Lock to the current loop at Socket construction, so
HamiltonTCPClient cannot be created in sync TestCase methods. Use
IsolatedAsyncioTestCase for those cases.
@rickwierenga
rickwierenga force-pushed the hamilton-tcp-transport branch from 612142c to 8627f84 Compare August 16, 2026 06:01
@rickwierenga

Copy link
Copy Markdown
Member

_send_raw will write again on a second attempt which is unsafe if the first write succeeded. is it necessary to retry or is that just defensive? I would rather defer this stuff to the user/caller. also I think many errors are actual protocol errors, not just connections errors so in those cases retrying will not help and might even be dangerous

also it seems like we should have a background reading thread like the star has that reads all incoming commands and then matches them to the specific command that was sent

@rickwierenga

Copy link
Copy Markdown
Member

until we figure out concurrency on the tcp protocol (see the locking mechanism for the star), I think we should have a lock to force one command at a time

@rickwierenga

Copy link
Copy Markdown
Member

also is it possible to get rid of hasattr etc.?

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.

2 participants