1struct Hamburg : heph::conduit::Node<Hamburg> {
2 static auto name() -> std::string_view {
3 return "hamburg";
4 }
5
6 using InputPolicyT = heph::conduit::InputPolicy<1, heph::conduit::RetrievalMethod::POLL,
7 heph::conduit::SetMethod::OVERWRITE>;
8
9 heph::conduit::QueuedInput<float, InputPolicyT> tigris{ this, "tigris" };
10 heph::conduit::QueuedInput<std::int64_t, InputPolicyT> ganges{ this, "ganges" };
11 heph::conduit::QueuedInput<std::int32_t, InputPolicyT> nile{ this, "nile" };
12 heph::conduit::QueuedInput<std::string> danube{ this, "danube" };
13
14 static auto trigger(Hamburg& self) {
15 return stdexec::when_all(self.tigris.get(), self.ganges.get(), self.nile.get(), self.danube.get());
16 }
17
18 static auto execute(std::optional<float> t, std::optional<std::int64_t> g, std::optional<std::int32_t> n,
19 std::string d) -> std::string {
20 heph::log(heph::INFO, "hamburg", "tigris", t, "ganges", g, "nile", n, "danube", d);
21
22 return fmt::format("hamburg/parana:{}", d);
23 }
24};