STADLS
run.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "stadls/vx/genpybind.h"
5 
6 namespace fisch::vx {
7 
8 class PlaybackProgram;
9 
10 } // namespace fisch::vx
11 
13 
22 template <typename Connection>
23 RunTimeInfo run(Connection& connection, PlaybackProgram& program);
24 
33 template <typename Connection>
34 RunTimeInfo run(Connection& connection, PlaybackProgram&& program);
35 
44 template <typename Connection>
45 RunTimeInfo run(Connection& connection, std::shared_ptr<fisch::vx::PlaybackProgram> const& program);
46 
47 } // namespace stadls::vx
48 
49 #if defined(__GENPYBIND__) or defined(__GENPYBIND_GENERATED__)
50 
51 #include <pybind11/pybind11.h>
52 #include "pyhxcomm/vx/connection_handle.h"
53 
54 namespace stadls::vx {
55 
56 namespace detail {
57 
58 template <typename... Ts>
59 struct RunUnrollPyBind11Helper
60 {
61  RunUnrollPyBind11Helper(pybind11::module&){};
62 };
63 
64 template <typename T, typename... Ts>
65 struct RunUnrollPyBind11Helper<std::variant<T, Ts...>>
66  : RunUnrollPyBind11Helper<std::variant<Ts...>>
67 {
68  using parent_t = RunUnrollPyBind11Helper<std::variant<Ts...>>;
69 
70  RunUnrollPyBind11Helper(pybind11::module& m) : parent_t(m)
71  {
72  m.def("run", [](T& conn, ::stadls::vx::PlaybackProgram& prog) {
73  return ::stadls::vx::run<T>(conn, prog);
74  });
75  m.def("run", [](T& conn, std::shared_ptr<::fisch::vx::PlaybackProgram> const& prog) {
76  return ::stadls::vx::run<T>(conn, prog);
77  });
78  }
79 };
80 
81 } // namespace detail
82 
83 } // namespace stadls::vx
84 #endif
85 
86 #include "stadls/vx/run.tcc"
Sequential stream of executable instructions for the executor and result-container for event response...
#define GENPYBIND_TAG_STADLS_VX
Definition: genpybind.h:4
stadls::vx::PlaybackProgram PlaybackProgram
RunTimeInfo run(Connection &, PlaybackProgram &)
Transfer and execute the given playback program and fetch results.
fisch::vx::RunTimeInfo RunTimeInfo
Definition: run_time_info.h:8