aim_tti_awg 0.19.0__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.
- aim_tti_awg-0.19.0/.gitignore +51 -0
- aim_tti_awg-0.19.0/PKG-INFO +22 -0
- aim_tti_awg-0.19.0/README.md +5 -0
- aim_tti_awg-0.19.0/pyproject.toml +82 -0
- aim_tti_awg-0.19.0/src/aim_tti_awg/__init__.py +0 -0
- aim_tti_awg-0.19.0/src/aim_tti_awg/cgse_explore.py +19 -0
- aim_tti_awg-0.19.0/src/aim_tti_awg/cgse_services.py +133 -0
- aim_tti_awg-0.19.0/src/aim_tti_awg/settings.yaml +20 -0
- aim_tti_awg-0.19.0/src/egse/arbitrary_wave_generator/aim_tti/__init__.py +640 -0
- aim_tti_awg-0.19.0/src/egse/arbitrary_wave_generator/aim_tti/tgf4000.py +4565 -0
- aim_tti_awg-0.19.0/src/egse/arbitrary_wave_generator/aim_tti/tgf4000.yaml +43 -0
- aim_tti_awg-0.19.0/src/egse/arbitrary_wave_generator/aim_tti/tgf4000_cs.py +304 -0
- aim_tti_awg-0.19.0/src/egse/arbitrary_wave_generator/aim_tti/tgf4000_devif.py +307 -0
- aim_tti_awg-0.19.0/src/egse/arbitrary_wave_generator/aim_tti/tgf4000_protocol.py +119 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Python versions and environment
|
|
2
|
+
|
|
3
|
+
__pycache__
|
|
4
|
+
.python-version
|
|
5
|
+
.envrc
|
|
6
|
+
|
|
7
|
+
# Build systems
|
|
8
|
+
|
|
9
|
+
build
|
|
10
|
+
dist
|
|
11
|
+
**/*.egg-info
|
|
12
|
+
|
|
13
|
+
# Apple specific
|
|
14
|
+
|
|
15
|
+
.DS_Store
|
|
16
|
+
|
|
17
|
+
# Unit testing
|
|
18
|
+
|
|
19
|
+
.pytest_cache
|
|
20
|
+
.coverage
|
|
21
|
+
.coverage.*
|
|
22
|
+
.nox
|
|
23
|
+
htmlcov
|
|
24
|
+
|
|
25
|
+
# dotenv, ignore all but the example file
|
|
26
|
+
|
|
27
|
+
.env
|
|
28
|
+
.env.*
|
|
29
|
+
!.env.example
|
|
30
|
+
|
|
31
|
+
# Virtual environments
|
|
32
|
+
|
|
33
|
+
.venv
|
|
34
|
+
venv
|
|
35
|
+
|
|
36
|
+
# PyCharm IDE
|
|
37
|
+
|
|
38
|
+
.idea
|
|
39
|
+
|
|
40
|
+
# VSCode IDE
|
|
41
|
+
|
|
42
|
+
.vscode
|
|
43
|
+
*.code-workspace
|
|
44
|
+
|
|
45
|
+
# MKDOCS documentation site
|
|
46
|
+
|
|
47
|
+
/site
|
|
48
|
+
|
|
49
|
+
# Packaging
|
|
50
|
+
|
|
51
|
+
uv.lock
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: aim_tti_awg
|
|
3
|
+
Version: 0.19.0
|
|
4
|
+
Summary: Aim-TTi TGF4000 Arbitrary Wave Generator
|
|
5
|
+
Author: IvS KU Leuven
|
|
6
|
+
Maintainer-email: Rik Huygen <rik.huygen@kuleuven.be>, Sara Regibo <sara.regibo@kuleuven.be>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Keywords: CGSE,Common-EGSE,hardware testing,software framework
|
|
9
|
+
Requires-Python: >=3.10
|
|
10
|
+
Requires-Dist: cgse-common
|
|
11
|
+
Requires-Dist: cgse-core
|
|
12
|
+
Provides-Extra: test
|
|
13
|
+
Requires-Dist: pytest; extra == 'test'
|
|
14
|
+
Requires-Dist: pytest-cov; extra == 'test'
|
|
15
|
+
Requires-Dist: pytest-mock; extra == 'test'
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
|
|
18
|
+
# Aim-TTi TGF4000 Arbitrary Wave Generator
|
|
19
|
+
|
|
20
|
+
## Reference Documents
|
|
21
|
+
|
|
22
|
+
- [Aim-TTi TGF4000 Series Instruction Manual, v3.0](https://resources.aimtti.com/manuals/TGF4000_Series_Instruction_Manual-Iss3.pdf)
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "aim_tti_awg"
|
|
3
|
+
version = "0.19.0"
|
|
4
|
+
description = "Aim-TTi TGF4000 Arbitrary Wave Generator"
|
|
5
|
+
authors = [
|
|
6
|
+
{name = "IvS KU Leuven"}
|
|
7
|
+
]
|
|
8
|
+
maintainers = [
|
|
9
|
+
{name = "Rik Huygen", email = "rik.huygen@kuleuven.be"},
|
|
10
|
+
{name = "Sara Regibo", email = "sara.regibo@kuleuven.be"}
|
|
11
|
+
]
|
|
12
|
+
readme = {"file" = "README.md", "content-type" = "text/markdown"}
|
|
13
|
+
requires-python = ">=3.10"
|
|
14
|
+
license = "MIT"
|
|
15
|
+
keywords = [
|
|
16
|
+
"CGSE",
|
|
17
|
+
"Common-EGSE",
|
|
18
|
+
"hardware testing",
|
|
19
|
+
"software framework",
|
|
20
|
+
]
|
|
21
|
+
dependencies = [
|
|
22
|
+
"cgse-common",
|
|
23
|
+
"cgse-core",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
[project.optional-dependencies]
|
|
27
|
+
test = ["pytest", "pytest-mock", "pytest-cov"]
|
|
28
|
+
|
|
29
|
+
[project.scripts]
|
|
30
|
+
tgf4000_cs = 'egse.arbitrary_wave_generator.aim_tti.tgf4000_cs:app'
|
|
31
|
+
#tgf4000_sim = 'egse.arbitrary_wave_generator.aim_tti.tgf4000_sim:app'
|
|
32
|
+
|
|
33
|
+
#[project.gui-scripts]
|
|
34
|
+
#tgf4000_ui = "egse.arbitrary_wave_generator.aim_tti.tgf4000_ui:main"
|
|
35
|
+
|
|
36
|
+
[project.entry-points."cgse.version"]
|
|
37
|
+
aim-tti-awg = 'egse.version:get_version_installed'
|
|
38
|
+
|
|
39
|
+
[project.entry-points."cgse.settings"]
|
|
40
|
+
aim-tti-awg = "aim_tti_awg:settings.yaml"
|
|
41
|
+
|
|
42
|
+
[project.entry-points."cgse.service.device_command"]
|
|
43
|
+
tgf4000 = 'aim_tti_awg.cgse_services:tgf4000'
|
|
44
|
+
|
|
45
|
+
[project.entry-points."cgse.explore"]
|
|
46
|
+
explore = "aim_tti_awg.cgse_explore"
|
|
47
|
+
|
|
48
|
+
[tool.pytest.ini_options]
|
|
49
|
+
asyncio_mode = "auto"
|
|
50
|
+
|
|
51
|
+
[tool.hatch.build.targets.sdist]
|
|
52
|
+
exclude = [
|
|
53
|
+
"/tests",
|
|
54
|
+
"/pytest.ini",
|
|
55
|
+
"/.gitignore",
|
|
56
|
+
]
|
|
57
|
+
|
|
58
|
+
[tool.hatch.build.targets.wheel]
|
|
59
|
+
packages = ["src/egse", "src/aim_tti_awg"]
|
|
60
|
+
|
|
61
|
+
[tool.ruff]
|
|
62
|
+
line-length = 120
|
|
63
|
+
|
|
64
|
+
[tool.ruff.lint]
|
|
65
|
+
extend-select = ["E501"]
|
|
66
|
+
|
|
67
|
+
[build-system]
|
|
68
|
+
requires = ["hatchling"]
|
|
69
|
+
build-backend = "hatchling.build"
|
|
70
|
+
|
|
71
|
+
[dependency-groups]
|
|
72
|
+
dev = [
|
|
73
|
+
"setuptools", # needed by PyCharm
|
|
74
|
+
"pytest>=8.3.4",
|
|
75
|
+
"pytest-cov>=6.0.0",
|
|
76
|
+
"pytest-mock>=3.14.0",
|
|
77
|
+
"ruff>=0.9.0",
|
|
78
|
+
"nox>=2025.2.9",
|
|
79
|
+
"setuptools>=75.8.2", # needed by PyCharm
|
|
80
|
+
"pytest-asyncio>=0.26.0",
|
|
81
|
+
"ipython",
|
|
82
|
+
]
|
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
__all__ = [
|
|
2
|
+
"show_processes",
|
|
3
|
+
]
|
|
4
|
+
|
|
5
|
+
import re
|
|
6
|
+
|
|
7
|
+
from egse.process import ProcessInfo
|
|
8
|
+
from egse.process import get_processes
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def show_processes():
|
|
12
|
+
"""Returns of list of ProcessInfo data classes for matching processes from this package."""
|
|
13
|
+
|
|
14
|
+
def filter_procs(pi: ProcessInfo):
|
|
15
|
+
pattern = r"tgf4000"
|
|
16
|
+
|
|
17
|
+
return re.search(pattern, pi.command)
|
|
18
|
+
|
|
19
|
+
return get_processes(filter_procs)
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import subprocess
|
|
2
|
+
from typing import Annotated
|
|
3
|
+
|
|
4
|
+
import rich
|
|
5
|
+
import sys
|
|
6
|
+
import typer
|
|
7
|
+
|
|
8
|
+
from egse.system import redirect_output_to_log
|
|
9
|
+
|
|
10
|
+
tgf4000 = typer.Typer(name="tgf4000", help="Aim -TTi, Dual-channel arbitrary function generator", no_args_is_help=True)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@tgf4000.command(name="start")
|
|
14
|
+
def start_tgf40000(
|
|
15
|
+
device_id: Annotated[str, typer.Argument(help="the device identifier, identifies the hardware controller")],
|
|
16
|
+
simulator: Annotated[
|
|
17
|
+
bool, typer.Option("--simulator", "--sim", help="use a device simulator as the backend")
|
|
18
|
+
] = False,
|
|
19
|
+
):
|
|
20
|
+
"""Starts the TGF4000 service.
|
|
21
|
+
|
|
22
|
+
Args:
|
|
23
|
+
device_id: TGF4000-A identifier.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
rich.print("Starting service tgf4000")
|
|
27
|
+
out = redirect_output_to_log("tgf4000.start.log")
|
|
28
|
+
|
|
29
|
+
cmd = [sys.executable, "-m", "egse.arbitrary_wave_generator.aim_tti.tgf4000_cs", "start", device_id]
|
|
30
|
+
if simulator:
|
|
31
|
+
cmd.append("--simulator")
|
|
32
|
+
subprocess.Popen(
|
|
33
|
+
cmd,
|
|
34
|
+
stdout=out,
|
|
35
|
+
stderr=out,
|
|
36
|
+
stdin=subprocess.DEVNULL,
|
|
37
|
+
close_fds=True,
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
@tgf4000.command(name="stop")
|
|
42
|
+
def stop_tgf4000(
|
|
43
|
+
device_id: Annotated[str, typer.Argument(help="the device identifier, identifies the hardware controller")],
|
|
44
|
+
):
|
|
45
|
+
"""Stops the TGF4000 service.
|
|
46
|
+
|
|
47
|
+
Args:
|
|
48
|
+
device_id: TGF4000 identifier.
|
|
49
|
+
"""
|
|
50
|
+
|
|
51
|
+
rich.print("Terminating service TGF4000")
|
|
52
|
+
|
|
53
|
+
out = redirect_output_to_log("tgf4000_cs.stop.log")
|
|
54
|
+
|
|
55
|
+
subprocess.Popen(
|
|
56
|
+
[sys.executable, "-m", "egse.arbitrary_wave_generator.aim_tti.tgf4000_cs", "stop", device_id],
|
|
57
|
+
stdout=out,
|
|
58
|
+
stderr=out,
|
|
59
|
+
stdin=subprocess.DEVNULL,
|
|
60
|
+
close_fds=True,
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
@tgf4000.command(name="status")
|
|
65
|
+
def status_tgf4000(
|
|
66
|
+
device_id: Annotated[str, typer.Argument(help="the device identifier, identifies the hardware controller")],
|
|
67
|
+
):
|
|
68
|
+
"""Prints status information on the TGF4000 service.
|
|
69
|
+
|
|
70
|
+
Args:
|
|
71
|
+
device_id: TGF4000 identifier.
|
|
72
|
+
"""
|
|
73
|
+
|
|
74
|
+
proc = subprocess.Popen(
|
|
75
|
+
[sys.executable, "-m", "egse.arbitrary_wave_generator.aim_tti.tgf4000_cs", "status", device_id],
|
|
76
|
+
stdout=subprocess.PIPE,
|
|
77
|
+
stderr=subprocess.PIPE,
|
|
78
|
+
stdin=subprocess.DEVNULL,
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
stdout, stderr = proc.communicate()
|
|
82
|
+
|
|
83
|
+
rich.print(stdout.decode(), end="")
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
@tgf4000.command(name="start-sim")
|
|
87
|
+
def start_tgf4000_sim(
|
|
88
|
+
device_id: Annotated[str, typer.Argument(help="the device identifier, identifies the hardware controller")],
|
|
89
|
+
):
|
|
90
|
+
"""Start the TGF4000 Simulator.
|
|
91
|
+
|
|
92
|
+
Args:
|
|
93
|
+
device_id: TGF4000 identifier.
|
|
94
|
+
"""
|
|
95
|
+
|
|
96
|
+
rich.print("Starting service TGF4000 Simulator")
|
|
97
|
+
|
|
98
|
+
out = redirect_output_to_log("tgf4000_sim.start.log")
|
|
99
|
+
|
|
100
|
+
subprocess.Popen(
|
|
101
|
+
[sys.executable, "-m", "egse.arbitrary_wave_generator.aim_tti.tgf4000_sim", "start", device_id],
|
|
102
|
+
stdout=out,
|
|
103
|
+
stderr=out,
|
|
104
|
+
stdin=subprocess.DEVNULL,
|
|
105
|
+
close_fds=True,
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
@tgf4000.command(name="stop-sim")
|
|
110
|
+
def stop_tgf4000_sim(
|
|
111
|
+
device_id: Annotated[str, typer.Argument(help="the device identifier, identifies the hardware controller")],
|
|
112
|
+
):
|
|
113
|
+
"""Stops the TGF4000 Simulator.
|
|
114
|
+
|
|
115
|
+
Args:
|
|
116
|
+
device_id: TGF4000 identifier.
|
|
117
|
+
"""
|
|
118
|
+
|
|
119
|
+
rich.print("Terminating the TGF4000 simulator.")
|
|
120
|
+
|
|
121
|
+
out = redirect_output_to_log("tgf4000_sim.stop.log")
|
|
122
|
+
|
|
123
|
+
subprocess.Popen(
|
|
124
|
+
[sys.executable, "-m", "egse.arbitrary_wave_generator.aim_tti.tgf4000_sim", "stop", device_id],
|
|
125
|
+
stdout=out,
|
|
126
|
+
stderr=out,
|
|
127
|
+
stdin=subprocess.DEVNULL,
|
|
128
|
+
close_fds=True,
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
if __name__ == "__main__":
|
|
133
|
+
tgf4000()
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
PACKAGES:
|
|
2
|
+
AIM_TTI_AWG
|
|
3
|
+
|
|
4
|
+
Aim-TTi TGF4000:
|
|
5
|
+
CMD_DELAY: 0.5 # Time between subsequent commands [s]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Aim-TTi TGF4000 Control Server:
|
|
9
|
+
PROTOCOL: tcp
|
|
10
|
+
AWG1:
|
|
11
|
+
SERVICE_TYPE: AWG1
|
|
12
|
+
PROCESS_NAME: AWG1
|
|
13
|
+
PROTOCOL: tcp
|
|
14
|
+
HOST: localhost
|
|
15
|
+
COMMANDING_PORT: 0 # The port on which the controller listens to commands - REQ-REP
|
|
16
|
+
MONITORING_PORT: 0 # The port on which the controller sends periodic status information of the device - PUB-SUB
|
|
17
|
+
SERVICE_PORT: 0 # The port on which the controller listens for configuration and administration - REQ-REP
|
|
18
|
+
METRICS_PORT: 0 # The HTTP port where Prometheus will connect to for retrieving metrics
|
|
19
|
+
DELAY: 10 # The delay time between publishing status information [seconds]
|
|
20
|
+
STORAGE_MNEMONIC: AWG1 # The mnemonic to be used in the filename storing the housekeeping data
|