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
15
#include "
OTCore/GenericDataStruct.h
"
16
#include "
OTCore/Variable.h
"
17
#include "
OTCore/ReturnMessage.h
"
18
#include "
OTServiceFoundation/FoundationAPIExport.h
"
19
20
namespace
ot
21
{
22
class
OT_SERVICEFOUNDATION_API_EXPORT
PythonServiceInterface
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
}
FoundationAPIExport.h
OT_SERVICEFOUNDATION_API_EXPORT
#define OT_SERVICEFOUNDATION_API_EXPORT
Definition
FoundationAPIExport.h:7
GenericDataStruct.h
ReturnMessage.h
Variable.h
ot::JsonDocument
JSON document.
Definition
JSON.h:276
ot::PythonServiceInterface
Definition
PythonServiceInterface.h:23
ot::PythonServiceInterface::scriptParameter
std::optional< std::list< ot::Variable > > scriptParameter
Definition
PythonServiceInterface.h:26
ot::ReturnMessage
Definition
ReturnMessage.h:14
ot
Definition
Connector.h:8
ot::GenericDataStructList
std::list< ot::GenericDataStruct * > GenericDataStructList
Definition
GenericDataStruct.h:27
Libraries
OTServiceFoundation
include
OTServiceFoundation
PythonServiceInterface.h
Generated by
1.10.0