HOPS
HOPS class reference
MHO_PythonSubprocessContract.hh
Go to the documentation of this file.
1 #ifndef MHO_PythonSubprocessContract_HH__
2 #define MHO_PythonSubprocessContract_HH__
3 
4 #include <string>
5 
6 namespace hops
7 {
8 namespace python_subprocess
9 {
10 
43 //bump when the request/response field layout OR the invocation convention
44 //changes incompatibly. v2: the child is invoked as
45 //`python -m <module> <request_file> <response_file>` and writes its JSON
46 //response into <response_file> (rather than to stdout) so that stray output
47 //from user control/plot code cannot corrupt the contract.
48 static const int kSchemaVersion = 2;
49 
50 //common field names
51 static const char* const kSchemaVersionKey = "schema_version";
52 static const char* const kOkKey = "ok";
53 static const char* const kErrorKey = "error";
54 
55 //control request/response
56 namespace control
57 {
58 static const char* const kModule = "hops_control"; // python -m hops_control
59 static const char* const kPassInfoKey = "pass_info";
60 static const char* const kConfigKey = "config";
61 static const char* const kScriptPathKey = "script_path";
62 static const char* const kStatementsKey = "statements";
63 } // namespace control
64 
65 //plot request/response
66 namespace plot
67 {
68 static const char* const kModule = "hops_visualization.fourfit_plot";
69 static const char* const kPlotDictKey = "plot_dict";
70 static const char* const kShowPlotKey = "show_plot";
71 static const char* const kDiskFileKey = "disk_file";
72 static const char* const kOutputFileKey = "output_file";
73 } // namespace plot
74 
75 } // namespace python_subprocess
76 
77 } // namespace hops
78 
79 #endif
struct type_plot plot
Definition: fourfit3.c:57
Definition: MHO_AdhocFlagging.hh:18