|
| TaskQueueProducer (const T &value, std::shared_ptr< reactesp::EventLoop > consumer_event_loop, unsigned int poll_rate=990) |
|
| TaskQueueProducer (const T &value, unsigned int poll_rate=990) |
|
virtual void | set (const T &value) override |
|
bool | wait (T &value, unsigned int max_duration_ms) |
| Wait for a value to be available in the queue.
|
|
| ObservableValue ()=default |
|
| ObservableValue (const T &value) |
|
| ObservableValue (const ObservableValue &)=delete |
|
ObservableValue & | operator= (const ObservableValue &)=delete |
|
const T & | operator= (const T &value) |
|
T & | operator++ () |
|
T & | operator-- () |
|
T | operator++ (int) |
|
T | operator-- (int) |
|
const T & | operator+= (const T &value) |
|
const T & | operator-= (const T &value) |
|
virtual void | set_input (const T &new_value) |
|
void | connect_from (ValueProducer< T > *producer) |
|
| ValueProducer () |
|
| ValueProducer (const T &initial_value) |
|
virtual const T & | get () const |
|
template<typename VConsumer > |
std::enable_if< std::is_base_of< ValueConsumer< typenameVConsumer::input_type >, VConsumer >::value &&std::is_convertible< T, typenameVConsumer::input_type >::value, std::shared_ptr< VConsumer > >::type | connect_to (std::shared_ptr< VConsumer > consumer) |
| Connect a producer to a transform with a different input type.
|
|
template<typename VConsumer > |
std::enable_if< std::is_base_of< ValueConsumer< typenameVConsumer::input_type >, VConsumer >::value &&std::is_convertible< T, typenameVConsumer::input_type >::value, VConsumer * >::type | connect_to (VConsumer *consumer) |
|
template<typename VConsumer > |
std::enable_if< std::is_base_of< ValueConsumer< typenameVConsumer::input_type >, VConsumer >::value &&std::is_convertible< T, typenameVConsumer::input_type >::value, VConsumer * >::type | connect_to (VConsumer &consumer) |
|
void | emit (const T &new_value) |
|
| Observable () |
|
| Observable (Observable &&other) |
| Move constructor.
|
|
void | notify () |
|
void | attach (std::function< void()> observer) |
|
template<class T>
class sensesp::TaskQueueProducer< T >
Producer class that works across task boundaries.
Normal ObservableValues call the observer callbacks within the same task content. In a multi-task software, this is not always preferable. This class allows you to produce values in one task and consume them in another.
- Template Parameters
-
- Parameters
-
consumer_event_loop | The event loop in which the values should be consumed. |
poll_rate | How often to poll the queue. Note: in microseconds! A value of 0 means that the queue will be polled on every tick. |
Definition at line 80 of file task_queue_producer.h.