rtems-proxy 0.2.2__tar.gz → 0.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/PKG-INFO +1 -1
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/src/rtems_proxy/_version.py +2 -2
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/src/rtems_proxy/copy.py +5 -4
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/src/rtems_proxy/telnet.py +26 -12
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/src/rtems_proxy.egg-info/PKG-INFO +1 -1
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/.copier-answers.yml +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/.devcontainer/devcontainer.json +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/.github/CONTRIBUTING.md +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/.github/actions/install_requirements/action.yml +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/.github/dependabot.yml +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/.github/pages/index.html +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/.github/pages/make_switcher.py +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/.github/workflows/_check.yml +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/.github/workflows/_dist.yml +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/.github/workflows/_pypi.yml +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/.github/workflows/_release.yml +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/.github/workflows/_test.yml +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/.github/workflows/_tox.yml +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/.github/workflows/ci.yml +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/.gitignore +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/.pre-commit-config.yaml +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/.vscode/extensions.json +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/.vscode/launch.json +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/.vscode/settings.json +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/.vscode/tasks.json +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/Dockerfile +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/LICENSE +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/README.md +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/catalog-info.yaml +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/proxy-start.sh +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/pyproject.toml +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/requirements.txt +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/setup.cfg +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/src/rtems_proxy/__init__.py +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/src/rtems_proxy/__main__.py +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/src/rtems_proxy/globals.py +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/src/rtems_proxy.egg-info/SOURCES.txt +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/src/rtems_proxy.egg-info/dependency_links.txt +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/src/rtems_proxy.egg-info/entry_points.txt +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/src/rtems_proxy.egg-info/requires.txt +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/src/rtems_proxy.egg-info/top_level.txt +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/tests/conftest.py +0 -0
- {rtems-proxy-0.2.2 → rtems-proxy-0.2.3}/tests/test_cli.py +0 -0
|
@@ -17,10 +17,9 @@ def copy_rtems():
|
|
|
17
17
|
root = GLOBALS.RTEMS_ROOT
|
|
18
18
|
# root of the path that the RTEMS IOC expects to find the IOC files
|
|
19
19
|
rtems_root = Path("/iocs") / GLOBALS.IOC_GROUP / GLOBALS.IOC_NAME
|
|
20
|
-
# the binary blob to load into the RTEMS IOC via TFTP
|
|
21
|
-
ioc_bin = (GLOBALS.IOC / "bin") / GLOBALS.EPICS_TARGET_ARCH / "ioc.boot"
|
|
22
20
|
# where to copy the Generic IOC folder to (at present only holds the dbd folder)
|
|
23
21
|
dest_ioc = root / "ioc"
|
|
22
|
+
dest_runtime = root / "runtime"
|
|
24
23
|
|
|
25
24
|
# because we are moving the ioc files we need to fix up startup script paths
|
|
26
25
|
startup = GLOBALS.RUNTIME / "st.cmd"
|
|
@@ -28,9 +27,11 @@ def copy_rtems():
|
|
|
28
27
|
cmd_txt = re.sub("/epics/", f"{str(rtems_root)}/", cmd_txt)
|
|
29
28
|
startup.write_text(cmd_txt)
|
|
30
29
|
|
|
30
|
+
# clean up previous IOC binaries
|
|
31
|
+
shutil.rmtree(dest_ioc)
|
|
32
|
+
shutil.rmtree(dest_runtime)
|
|
31
33
|
# move all the files needed for runtime into the PVC that is being shared
|
|
32
34
|
# over nfs/tftp by the nfsv2-tftp service
|
|
33
35
|
Path.mkdir(dest_ioc, exist_ok=True)
|
|
34
36
|
shutil.copytree(GLOBALS.IOC / "dbd", dest_ioc, symlinks=True, dirs_exist_ok=True)
|
|
35
|
-
shutil.copytree(GLOBALS.RUNTIME,
|
|
36
|
-
shutil.copy(ioc_bin, root)
|
|
37
|
+
shutil.copytree(GLOBALS.RUNTIME, dest_runtime, dirs_exist_ok=True)
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import asyncio
|
|
2
2
|
import signal
|
|
3
|
+
import sys
|
|
4
|
+
import termios
|
|
5
|
+
import tty
|
|
3
6
|
from time import sleep
|
|
4
7
|
|
|
5
8
|
import telnetlib3
|
|
@@ -21,18 +24,29 @@ class TelnetRTEMS:
|
|
|
21
24
|
self.terminated = True
|
|
22
25
|
|
|
23
26
|
async def user_input(self, writer):
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
def get_char():
|
|
28
|
+
ch = sys.stdin.read(1)
|
|
29
|
+
return ch
|
|
30
|
+
|
|
31
|
+
stdin_fd = sys.stdin.fileno()
|
|
32
|
+
old_settings = termios.tcgetattr(stdin_fd)
|
|
33
|
+
|
|
34
|
+
try:
|
|
35
|
+
tty.setraw(sys.stdin.fileno())
|
|
36
|
+
loop = asyncio.events._get_running_loop()
|
|
37
|
+
|
|
38
|
+
while self.running:
|
|
39
|
+
# run the wait for input in a separate thread
|
|
40
|
+
next_ch = await loop.run_in_executor(None, get_char)
|
|
41
|
+
# look for control + ] to terminate the session
|
|
42
|
+
if b"\x1d" in next_ch.encode():
|
|
43
|
+
self.running = False
|
|
44
|
+
break
|
|
45
|
+
writer.write(next_ch)
|
|
46
|
+
|
|
47
|
+
finally:
|
|
48
|
+
termios.tcsetattr(stdin_fd, termios.TCSADRAIN, old_settings)
|
|
49
|
+
writer.close()
|
|
36
50
|
|
|
37
51
|
async def server_output(self, reader):
|
|
38
52
|
while self.running:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|