Skip to content

Observers

Luis Llamas edited this page Apr 25, 2019 · 6 revisions

Observer Do

Performs an action on each emitted item

Do(ReactiveAction<T> action)

Observer Finally

Performs an action at the end of the sequence

Finally(ReactiveCallback action)

Observer DoAndFinally

Performs an action on each emmited item, and another action at the end of the sequence

DoAndFinally(ReactiveAction<T> doAction, ReactiveCallback finallyAction)

Observer DoNothing

Suscribes to and observable but do nothing with received items.

Usefull when you use ForEach or If operators, but no really interested in a Observer

DoAndFinally(ReactiveAction<T> doAction, ReactiveCallback finallyAction)

Observer Property

Stores received item in a variable

ToProperty(T & property)

Observer Array

Stores received items in an existing array

ToArray(T *array, size_t length)

Observer CircularBuffer

Stores received items in an existing array, treated as a circular buffer

ToCircularBuffer(T *array, size_t length)

Observer Digital Output

Sends received item to an digital pin

ToDigital(uint8_t pin)

Observer Analog Output

Sends received item to an analog pin

ToAnalog(uint8_t pin)

Observer Serial

Sends received item to serial port

ToSerial()