From 96fd0865f9e41dcd6046a8fb54b3b398f6c08766 Mon Sep 17 00:00:00 2001 From: Alex-Pro-commit <73656348+Alex-Pro-commit@users.noreply.github.com> Date: Mon, 25 Jul 2022 14:36:13 -0400 Subject: [PATCH] created an abstract --- .../examples/labgraph_monitor_example.py | 16 ++++++++++++---- python | 0 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 python diff --git a/extensions/yaml_support/labgraph_monitor/examples/labgraph_monitor_example.py b/extensions/yaml_support/labgraph_monitor/examples/labgraph_monitor_example.py index 59bcc7247..38f331e21 100644 --- a/extensions/yaml_support/labgraph_monitor/examples/labgraph_monitor_example.py +++ b/extensions/yaml_support/labgraph_monitor/examples/labgraph_monitor_example.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # Copyright 2004-present Facebook. All Rights Reserved. +from wsgiref.simple_server import demo_app import labgraph as lg from typing import Dict, Tuple @@ -101,9 +102,9 @@ def setup(self) -> None: AttenuatorConfig( attenuation=ATTENUATION, ) - ) - - def connections(self) -> lg.Connections: + ) + + def returnConnect(self): return ( (self.NOISE_GENERATOR.NOISE_GENERATOR_OUTPUT, self.ROLLING_AVERAGER.ROLLING_AVERAGER_INPUT), (self.NOISE_GENERATOR.NOISE_GENERATOR_OUTPUT, self.AMPLIFIER.AMPLIFIER_INPUT), @@ -115,6 +116,10 @@ def connections(self) -> lg.Connections: (self.SERIALIZER.SERIALIZER_OUTPUT, self.WS_SERVER_NODE.topic), ) + def connections(self) -> lg.Connections: + + return self.returnConnect() + def process_modules(self) -> Tuple[lg.Module, ...]: return ( self.NOISE_GENERATOR, @@ -130,4 +135,7 @@ def process_modules(self) -> Tuple[lg.Module, ...]: set_graph_topology(graph=graph) runner = lg.ParallelRunner(graph=graph) - runner.run() \ No newline at end of file + runner.run() + + + diff --git a/python b/python new file mode 100644 index 000000000..e69de29bb