Open RTS
Full implementation of the Somfy RTS protocol
|
Provides an interface for a source of RTS pulses, eg a GPIO or radio. More...
#include <RTSPulseSource.hpp>
Inherits rts_pulse_source.
Inherited by RTSPulseSource_GPIO.
Public Member Functions | |
void | enable () |
Enable the pulse source. | |
void | disable () |
Disable the pulse source. | |
void | update () |
Check for new pulse data. | |
void | attach (RTSFrameBuilder *frameBuilder) |
Attach an observer. | |
Friends | |
class | RTSReceiver |
Additional Inherited Members | |
Related Symbols inherited from rts_pulse_source | |
void | rts_pulse_source_init_espidf_gpio (struct rts_pulse_source *pulse_source, uint8_t data_pin) |
Initialize an rts_pulse_source which receives pulses from the specified ESP-IDF GPIO pin. | |
void | rts_pulse_source_init_gpiod (struct rts_pulse_source *pulse_source, char *device, uint8_t data_pin) |
Initialize an rts_pulse_source which receives pulses from the specified Linux gpiod device. | |
void | rts_pulse_source_enable (struct rts_pulse_source *pulse_source) |
Enable the pulse source. | |
void | rts_pulse_source_disable (struct rts_pulse_source *pulse_source) |
Disable the pulse source. | |
void | rts_pulse_source_update (struct rts_pulse_source *pulse_source) |
Check for new pulse data, should be called every loop() | |
void | rts_pulse_source_attach (struct rts_pulse_source *pulse_source, struct rts_frame_builder *frame_builder) |
Attach an observer. | |
void | rts_pulse_source_close (struct rts_pulse_source *pulse_source) |
Close and free any resources allocated via a previous call to rts_pulse_source_init_*() | |
Provides an interface for a source of RTS pulses, eg a GPIO or radio.
Implementations must define the enable, disable, and update functions and set the function pointers in the rts_pulse_source struct.
When a new pulse is detected in rts_pulse_source_update, implementations should call rts_frame_builder_handle_pulse on the observer.
void RTSPulseSource::update | ( | ) |
Check for new pulse data.
Should be called every loop() if the pulse source does not keep itself updated (eg. using interrupts).
void RTSPulseSource::attach | ( | RTSFrameBuilder * | frameBuilder | ) |
Attach an observer.
frameBuilder | the RTSFrameBuilder instance observing this source. |