OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
PythonServiceInterface.h
Go to the documentation of this file.
1/*****************************************************************/
8#pragma once
9#include <string>
10#include <tuple>
11#include <optional>
12#include <map>
13#include <memory>
14
16#include "OTCore/Variable.h"
19
20namespace ot
21{
23 {
24 public:
25
26 using scriptParameter = std::optional<std::list<ot::Variable>>;
27 PythonServiceInterface(const std::string& pythonExecutionServiceURL);
28 void AddScriptWithParameter(const std::string& scriptName, const scriptParameter& scriptParameter);
29 void AddPortData(const std::string& portName, const ot::GenericDataStructList& data);
30
31 ot::ReturnMessage SendExecutionOrder();
32
33 ot::ReturnMessage SendSingleExecutionCommand(const std::string& command);
34
35 private:
36 const std::string _pythonExecutionServiceURL;
37 std::list<std::tuple<std::string, scriptParameter>> _scriptNamesWithParameter;
38
39 std::map<std::string, ot::GenericDataStructList> _portDataByPortName;
40 ot::JsonDocument AssembleMessage();
41 };
42}
#define OT_SERVICEFOUNDATION_API_EXPORT
Definition FoundationAPIExport.h:7
JSON document.
Definition JSON.h:276
Definition PythonServiceInterface.h:23
std::optional< std::list< ot::Variable > > scriptParameter
Definition PythonServiceInterface.h:26
Definition ReturnMessage.h:14
Definition Connector.h:8
std::list< ot::GenericDataStruct * > GenericDataStructList
Definition GenericDataStruct.h:27