Open RTS
Full implementation of the Somfy RTS protocol
|
Assembles pulses received via rts_frame_builder_handle_pulse, into a complete rts_frame, and delivers them to the user-provided callback. More...
#include <rts_frame_builder.h>
Inherited by RTSFrameBuilder.
Related Symbols | |
(Note that these are not member symbols.) | |
void | rts_frame_builder_init (struct rts_frame_builder *builder, struct rts_timings *timings) |
Initialize an rts_frame_builder with the specified timings. | |
void | rts_frame_builder_handle_pulse (struct rts_frame_builder *builder, bool state, uint32_t micros) |
Inform the frame builder about a new pulse. | |
void | rts_frame_builder_set_callback (struct rts_frame_builder *builder, void(*callback)(struct rts_frame *frame, uint8_t count, uint32_t duration, void *user_data), void *user_data) |
Set a callback to call when new complete frames are received. | |
Assembles pulses received via rts_frame_builder_handle_pulse, into a complete rts_frame, and delivers them to the user-provided callback.
This class will fire the configured callback every time a valid RTS frame is received. It does not perform any sort of deduplication, or validation of remote addresses or rolling codes, which makes it ideal for building a "frame sniffer", "remote sniffer", or any kind of promiscuous receiver.
An rts_frame_builder can be attached to an rts_pulse_source (eg. a GPIO or radio) with rts_pulse_source_attach to observe pulses and build frames automatically.