forked from scuptio/sedeve-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
495 additions
and
131 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 |
---|---|---|
|
@@ -4,3 +4,4 @@ pytest>=3.5.0 | |
setuptools_rust~=1.0.0 | ||
pip>=21.3 | ||
wheel | ||
patchelf |
This file contains 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 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 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
import automata_py | ||
import subprocess | ||
|
||
this_node_id = 2 | ||
player_node_id = 1 | ||
|
||
AUTO_ECHO = "echo" | ||
|
||
automata_py.automata_setup_with_input(AUTO_ECHO, this_node_id, "127.0.0.1:24002", player_node_id, "127.0.0.1:24001") | ||
|
||
print("setup ok") | ||
|
||
loop = True | ||
while loop: | ||
(source, dest, action, message) = automata_py.automata_next_input(AUTO_ECHO) | ||
|
||
print((source, dest, action, message)) | ||
|
||
automata_py.automata_action_to_player( | ||
automata_py.action_input(), | ||
automata_py.action_end(), | ||
this_node_id, | ||
source, | ||
dest, | ||
message | ||
) | ||
|
||
assert action == automata_py.action_input() | ||
|
||
# <port> <id> <player id> <player ip> <player port> | ||
cmd = "echo_server 8001 1 2 127.0.0.1 8002" | ||
t = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout.read() | ||
print(t) |
Oops, something went wrong.