From 83e3b55f9986326c213efbdc8ac20559577362c0 Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Tue, 24 May 2022 11:27:09 +0200 Subject: Update diagram, added interfaces --- doc/architecture.drawio | 2 +- src/lab-control/function_generator.py | 23 +++++++++++++++++++++++ src/lab-control/oscilloscope.py | 17 +++++++++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 src/lab-control/function_generator.py create mode 100644 src/lab-control/oscilloscope.py diff --git a/doc/architecture.drawio b/doc/architecture.drawio index 48dab57..cabb248 100644 --- a/doc/architecture.drawio +++ b/doc/architecture.drawio @@ -1 +1 @@ -7Vtbc9o4FP41zKQP6fiCHXgMkKSXZMuGbJvdl46wBdZEtlxbEOivX8mWsC2ZS4gpmQkzGYKOLpbO5TsXi5bdDxc3CYiDO+JD3LIMf9GyBy3L6rgu++SEZU5wHDsnTBPk5ySzIIzQbyiIhqDOkA/TykBKCKYorhI9EkXQoxUaSBLyXB02Ibj61BhMoUYYeQDr1B/Ip4Ggmm636PgE0TQQj+5YF3lHCORgcZI0AD55LpHsq5bdTwih+bdw0YeY807yJZ93vaZ3tbEERnSXCdPge3j18we8/xr/F4wvRj9vv8zOxSpzgGfiwC3LxWy9Xsy3TJeCD+6vGd9nLwTJFEUt+5L1GvGCfTJidlpOP6ckzvvapT4KF/QcYDQV8zy2YZgUa7JvU/E/ezIqEUDIFuxhvfWZrzEBHlyRq1MqKzKmIPUp40SjSMK31EMYk9QjMSwtMVYnMFqs0oKE802qsTyiuf60e/EZwwktMXrd2nUbPMzzsrEQpLMEXoYxRnTmwzMU0Q/5rAkmgNZxvjRv+PRAhk/rJh3lKPd3o10OccQdXifw1wxG3nLffVqVHVpzmFDE0O8yN9dBZtA9YbyDfGc9wkaxh3AsmzBDYZQJiajAbtMS7WsQIsxR/xPEc8hX5eZBQ8wHrZ5dxi8JRmwPcFEiCTy7gSSENFmyIbJXegnhXKyOaD8XUL3yJEEJpU1bEIFwD9PV2gWCsi8CRF8AqNY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Juw5aRDNGaKTILzBZPy/Oywb985r3jqfFgXmYdLNRojuhTwWpZthyLpbbnyPFqKR+UV97DDDH98MTnlR7h7NrCaO/oEtL6VMtDWXEjvrHMEfWm1S/7hr9lo0P7hhkYT75h+MY5cw5bcw7ffYvO0X0DznHhar2btrOfc3gd+70eg7zf6x6O4R7924+GgzTbEe9cVC/tOWZH3K7riOvY0dwXpmZH/J/cLJNMnNDAoZJyrc2qVhHJK7vcRnd7hWs5u6ZiuwaeA+RiHT3eOHvGm64eb/SNDu1QZq5+C0asYmFVF8b8C/JT56URENGT7roG+lL5la/VVDnVPIqsa6GTPBDNl9L3KH6LHVnIoujOTATHugbdqUNT72avadHUmod3MOs4ddoPqN6al65q1XuoHo1649bwff0duQeYp0w48Ey+Ibd8F0R8XL02Y6w4YULjRtPZzWiaaNveDX6AvzL8OXj6O/o4m5L+MLmvefN5u9ZPCcOeVYdVrTpsy4QMx/dqEoYmyo5a9ZvFl8CMkHmSAAGMmJy8Hp2mTDpeTwGF+Ct854QKyiQ2uthrEoVas2giUag98Q5vZ/2BeUIzyq17N7tOuQ2kCbUHrvsmp3jJBszgI2P5esbEUX0Ns1onpJjQy3z49WYbIytyH8DLgOnmjM+/O+HJsUzOTDJqTc53DmRzZlV6wN7W2kC9Vwt4kwaO0qbSOr9LPPnlNlV3y0Z7t6nYcPXvfIJ99T+R7tX/ \ No newline at end of file diff --git a/src/lab-control/function_generator.py b/src/lab-control/function_generator.py new file mode 100644 index 0000000..b7b5266 --- /dev/null +++ b/src/lab-control/function_generator.py @@ -0,0 +1,23 @@ +class FunctionGenerator: + FUNCTION_SINE = 0 + FUNCTION_SQUARE = 1 + FUNCTION_SAWTOOTH = 2 + + def __init__(self): + raise Exception("This class should not be instantiated directly, please extend it instead") + + def setOn(self, channel: int) -> None: + pass + + def setOff(self, channel: int) -> None: + pass + + def setFrequency(self, channel: int, frequency: float) -> None: + pass + + def setAmplitude(self, channel: int, amplitude: float) -> None: + pass + + def setFunction(self, channel: int, function: int) -> None: + pass + diff --git a/src/lab-control/oscilloscope.py b/src/lab-control/oscilloscope.py new file mode 100644 index 0000000..a09f8a0 --- /dev/null +++ b/src/lab-control/oscilloscope.py @@ -0,0 +1,17 @@ +class Oscilloscope: + def __init__(self): + raise Exception("This class should not be instantiated directly, please extend it instead") + + def measureAmplitude(self, channel: int) -> float: + pass + + def measurePkToPk(self, channel: int) -> float: + pass + + def measureRMS(self, channel: int) -> float: + pass + + def measureFrequency(self, channel: int) -> float: + pass + + -- cgit v1.2.3