-
Notifications
You must be signed in to change notification settings - Fork 33
fix: replace concore2 imports with concore (resolves #287) #306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
pradeeban
merged 26 commits into
ControlCore-Project:dev
from
GaneshPatil7517:fix/replace-concore2-imports
Feb 14, 2026
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
490a619
fix: replace deprecated concore2 imports with concore (Issue #287)
GaneshPatil7517 ba08829
Update 0mq/funcall_zmq2.py
GaneshPatil7517 79a7e31
Update 0mq/funbody.py
GaneshPatil7517 5ebcfc0
Update 0mq/comm_node.py
GaneshPatil7517 1559a30
Update testsou/powermetermax.py
GaneshPatil7517 0563c1c
Update testsou/funcall.py
GaneshPatil7517 ab214a0
Update ratc/learn3.py
GaneshPatil7517 d34f485
Update 0mq/funbody.py
GaneshPatil7517 b1d1d23
Update testsou/powermetermax.py
GaneshPatil7517 6c0fce9
Update ratc/learn3.py
GaneshPatil7517 fa1aa26
Update 0mq/funcall2.py
GaneshPatil7517 36a0c9e
Update 0mq/funcall_distributed.py
GaneshPatil7517 efee0e8
Update 0mq/funcall_zmq2.py
GaneshPatil7517 33820fd
Update measurements/comm_node_test.py
GaneshPatil7517 6847bc1
Update 0mq/funbody_zmq.py
GaneshPatil7517 d682891
Update 0mq/funbody_zmq.py
GaneshPatil7517 ab956e0
Update 0mq/funbody_distributed.py
GaneshPatil7517 b6f87cd
Update 0mq/funbody2.py
GaneshPatil7517 3e6c958
Update testsou/funcall.py
GaneshPatil7517 aaebd5d
Update 0mq/funcall2.py
GaneshPatil7517 9b886d0
Update measurements/Latency/funcall_distributed.py
GaneshPatil7517 bda776f
Update 0mq/funbody_zmq2.py
GaneshPatil7517 e980a81
Update 0mq/funbody2.py
GaneshPatil7517 4f1382f
Update 0mq/comm_node.py
GaneshPatil7517 f8869e9
Update testsou/funbody.py
GaneshPatil7517 58915e3
refactor: address remaining Copilot review suggestions
GaneshPatil7517 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,21 @@ | ||
| import concore | ||
| import concore2 | ||
|
|
||
| concore.delay = 0.07 | ||
| concore2.delay = 0.07 | ||
| concore2.inpath = concore.inpath | ||
| concore2.outpath = concore.outpath | ||
| concore2.simtime = 0 | ||
| concore.simtime = 0 | ||
| concore.default_maxtime(100) | ||
| init_simtime_u = "[0.0, 0.0, 0.0]" | ||
| init_simtime_ym = "[0.0, 0.0, 0.0]" | ||
|
|
||
| u = concore.initval(init_simtime_u) | ||
| ym = concore2.initval(init_simtime_ym) | ||
| while(concore2.simtime<concore.maxtime): | ||
| ym = concore.initval(init_simtime_ym) | ||
| while(concore.simtime<concore.maxtime): | ||
| while concore.unchanged(): | ||
| u = concore.read(concore.iport['U'],"u",init_simtime_u) | ||
| concore.write(concore.oport['U1'],"u",u) | ||
| print(u) | ||
| old2 = concore2.simtime | ||
| while concore2.unchanged() or concore2.simtime <= old2: | ||
| ym = concore2.read(concore.iport['Y1'],"ym",init_simtime_ym) | ||
| concore2.write(concore.oport['Y'],"ym",ym) | ||
| print("funbody u="+str(u)+" ym="+str(ym)+" time="+str(concore2.simtime)) | ||
| old2 = float(concore.simtime) | ||
| while concore.unchanged() or concore.simtime <= old2: | ||
| ym = concore.read(concore.iport['Y1'],"ym",init_simtime_ym) | ||
| concore.write(concore.oport['Y'],"ym",ym) | ||
| print("funbody u="+str(u)+" ym="+str(ym)+" time="+str(concore.simtime)) | ||
| print("retry="+str(concore.retrycount)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,39 +1,35 @@ | ||
| import concore | ||
| import concore2 | ||
| from osparc_control import PairedTransmitter | ||
| print("funcall 0mq") | ||
|
|
||
| concore.delay = 0.07 | ||
| concore2.delay = 0.07 | ||
| concore2.inpath = concore.inpath | ||
| concore2.outpath = concore.outpath | ||
| concore2.simtime = 0 | ||
| concore.simtime = 0 | ||
| concore.default_maxtime(100) | ||
| init_simtime_u = "[0.0, 0.0, 0.0]" | ||
| init_simtime_ym = "[0.0, 0.0, 0.0]" | ||
|
|
||
| u = concore.initval(init_simtime_u) | ||
| ym = concore2.initval(init_simtime_ym) | ||
| ym = concore.initval(init_simtime_ym) | ||
| paired_transmitter = PairedTransmitter( | ||
| remote_host="localhost", exposed_commands=[], | ||
| remote_port=2345, listen_port=2346,) | ||
| paired_transmitter.start_background_sync() | ||
| try: | ||
| while(concore2.simtime<concore.maxtime): | ||
| while(concore.simtime<concore.maxtime): | ||
| while concore.unchanged(): | ||
| u = concore.read(concore.iport['U'],"u",init_simtime_u) | ||
| print(u) | ||
| #concore.write(concore.oport['U1'],"u",u) | ||
| #old2 = concore2.simtime | ||
| #while concore2.unchanged() or concore2.simtime <= old2: | ||
| # ym = concore2.read(concore.iport['Y1'],"ym",init_simtime_ym) | ||
| #old2 = concore.simtime | ||
| #while concore.unchanged() or concore.simtime <= old2: | ||
| # ym = concore.read(concore.iport['Y1'],"ym",init_simtime_ym) | ||
| ym = paired_transmitter.request_with_immediate_reply( | ||
| "fun", timeout=10.0, params={"u": [concore.simtime]+u}) | ||
| concore2.simtime = ym[0] | ||
| concore.simtime = ym[0] | ||
| ym = ym[1:] | ||
| #print(ym) | ||
| concore2.write(concore.oport['Y'],"ym",ym) | ||
| print("funcall 0mq u="+str(u)+" ym="+str(ym)+" time="+str(concore2.simtime)) | ||
| concore.write(concore.oport['Y'],"ym",ym) | ||
| print("funcall 0mq u="+str(u)+" ym="+str(ym)+" time="+str(concore.simtime)) | ||
| finally: | ||
| paired_transmitter.stop_background_sync() | ||
| print("retry="+str(concore.retrycount)) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential logic issue: This code pattern may create an infinite loop. The variable old_concore_simtime now references the same concore.simtime that is checked in the loop condition, whereas the original code tracked two separate simulation times.