diff --git a/script/local.py b/script/local.py index 8bc7e64..9cf5c0b 100644 --- a/script/local.py +++ b/script/local.py @@ -114,7 +114,7 @@ parameter_queue = None statistics =None current_pipeline = None -def start_pipeline(name, pars, port=DEFAULT_PIPELINE_PORT): +def start_pipeline(name, parameters, port=DEFAULT_PIPELINE_PORT): global stop_event, parameter_queue, statistics if name is None: raise Exception("Pipeline name undefined") @@ -123,6 +123,7 @@ def start_pipeline(name, pars, port=DEFAULT_PIPELINE_PORT): stop_event = threading.Event() parameter_queue = queue.Queue() statistics = Namespace() + pipeline_config = PipelineConfig(name, parameters=parameters) def send(port): print ("Startint pipeline ", name, " on port: ", port) try: diff --git a/script/test/test_pipeline2.py b/script/test/test_pipeline2.py new file mode 100644 index 0000000..03ac12e --- /dev/null +++ b/script/test/test_pipeline2.py @@ -0,0 +1,10 @@ + +#viewer.show_stream("tcp://localhost:" + str(DEFAULT_PIPELINE_PORT)) +#pipeline_config = PipelineConfig("test_pipeline", parameters={"camera_name": "simulation", "function":"transparent"}) +#start_pipeline("test_pipeline", {"camera_name": "simulation", "function":"transparent"}) + +with source(host="127.0.0.1", port=DEFAULT_PIPELINE_PORT, mode=SUB, receive_timeout = 3000) as stream: + data = stream.receive() + if not data: + raise Exception("Received None message.") + print (data.data.data.keys())