1#ifndef SENSESP_SRC_SENSESP_TRANSFORMS_ZIP_H_
2#define SENSESP_SRC_SENSESP_TRANSFORMS_ZIP_H_
4#include <elapsedMillis.h>
21 for (
int i = 0; i < N; i++) {
35 for (
int i = 0; i < N; i++) {
42 for (
int i = 0; i < N; i++) {
56template <
typename T1,
typename T2>
63 std::get<0>(
values) = value;
69 std::get<1>(
values) = value;
88template <
typename T1,
typename T2,
typename T3>
95 std::get<0>(
values) = value;
101 std::get<1>(
values) = value;
107 std::get<2>(
values) = value;
126template <
typename T1,
typename T2,
typename T3,
typename T4>
135 std::get<0>(
values) = value;
141 std::get<1>(
values) = value;
147 std::get<2>(
values) = value;
153 std::get<3>(
values) = value;
172template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
183 std::get<0>(
values) = value;
189 std::get<1>(
values) = value;
195 std::get<2>(
values) = value;
201 std::get<3>(
values) = value;
207 std::get<4>(
values) = value;
Provides an easy way of calling a function based on the output of any ValueProducer.
A base class for any sensor or piece of code that outputs a value for consumption elsewhere.
void emit(const std::tuple< T1, T2 > &new_value)
Zip three producer values into a tuple.
std::tuple< LambdaConsumer< T1 >, LambdaConsumer< T2 >, LambdaConsumer< T3 > > consumers
std::tuple< T1, T2, T3 > values
void emit_tuple() override
Zip four producer values into a tuple.
std::tuple< LambdaConsumer< T1 >, LambdaConsumer< T2 >, LambdaConsumer< T3 >, LambdaConsumer< T4 > > consumers
void emit_tuple() override
std::tuple< T1, T2, T3, T4 > values
Zip five producer values into a tuple.
std::tuple< LambdaConsumer< T1 >, LambdaConsumer< T2 >, LambdaConsumer< T3 >, LambdaConsumer< T4 >, LambdaConsumer< T5 > > consumers
void emit_tuple() override
std::tuple< T1, T2, T3, T4, T5 > values
virtual void check_emit()
virtual void emit_tuple()=0
Zip two producer values into a tuple.
std::tuple< T1, T2 > values
void emit_tuple() override
std::tuple< LambdaConsumer< T1 >, LambdaConsumer< T2 > > consumers