Skip to content

fix: make read() backward compatible again#548

Merged
pradeeban merged 1 commit intoControlCore-Project:devfrom
avinxshKD:fix/read-backward-compat
Apr 27, 2026
Merged

fix: make read() backward compatible again#548
pradeeban merged 1 commit intoControlCore-Project:devfrom
avinxshKD:fix/read-backward-compat

Conversation

@avinxshKD
Copy link
Copy Markdown
Contributor

read() now returns plain data again, and read_with_status() is the explicit tuple API; tests were switched to the explicit path where status is asserted.
Needed because the tuple return broke existing Python studies and templates.

Fixes #547

@avinxshKD
Copy link
Copy Markdown
Contributor Author

@pradeeban pls have a look

@pradeeban
Copy link
Copy Markdown
Member

Merging. I like your code, PR title, and captions. Very systematic with no bloat.

@pradeeban pradeeban merged commit 472e211 into ControlCore-Project:dev Apr 27, 2026
8 checks passed
@avinxshKD
Copy link
Copy Markdown
Contributor Author

@pradeeban Thank you so much, (one of my fav compliments :p)

btw what’s your take on atomic writes + integrity framing for the Python/C++/Java runtimes? That’s a core transport gap.

@pradeeban
Copy link
Copy Markdown
Member

Are you asking in the context of concore? I thought we already have that support for at least python (file-sharing, local), Verilog, C++, and Mediator versions, as in all-or-nothing.

@avinxshKD
Copy link
Copy Markdown
Contributor Author

Hey @pradeeban I meant file‑based runtimes. I don’t see atomic/verified writes in the current Python/C++/Java code, they write straight to the target file. If I’m missing on something, could you point me to it? I’ll drop this if it already exists.

@pradeeban
Copy link
Copy Markdown
Member

ok, I was referring to atomic in a holistic sense. The entire transaction across the two processes succeeds, or neither of them succeeds (this is a critical aspect of concore protocol. After all, you don't want the transaction to be in an unstable state). The file-sharing and mediator-based approaches compare the files and achieve this (probably in an ancient way). Not as in atomic/verified writes in the programming constructs.

Maybe we can come back to this again. We don't want to overdo either (because, performance. Every program in a control system can run hundreds of times).

@avinxshKD
Copy link
Copy Markdown
Contributor Author

@pradeeban Got it, thanks for clarifying. I’ll hold the atomic/verified write idea for now.
If we revisit it, I can sketch a low‑overhead option that doesn’t hit perf.

Also If there’s any doc or note on the “holistic atomic” behavior, I’d really appreciate a link when you have a chance.

@pradeeban
Copy link
Copy Markdown
Member

The IEEE Access paper is the best bet on concore protocol.

https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=9739711

See if it adds anything.

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