Open RTS
Full implementation of the Somfy RTS protocol
Loading...
Searching...
No Matches
rts_remote_store.h
Go to the documentation of this file.
1#ifndef RTS_REMOTE_STORE_H
2#define RTS_REMOTE_STORE_H
3
4#include <stdbool.h>
5#include <stdint.h>
6
7#include "errors.h"
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
30 int8_t (*get_code)(struct rts_remote_store *store, uint32_t remote_address,
31 uint16_t *code);
32 int8_t (*set_code)(struct rts_remote_store *store, uint32_t remote_address,
33 uint16_t code);
34 int8_t (*forget)(struct rts_remote_store *store, uint32_t remote_address);
35 int8_t (*clear)(struct rts_remote_store *store);
36 void (*close)(struct rts_remote_store *store);
37
38 union {
39 void *user_data_ptr;
40 int user_data_int;
41 };
42};
43
53void rts_remote_store_set_code(struct rts_remote_store *store,
54 uint32_t remote_address, uint16_t rolling_code);
55
66uint16_t rts_remote_store_get_code(struct rts_remote_store *store,
67 uint32_t remote_address);
68
79uint16_t rts_remote_store_next_code(struct rts_remote_store *store,
80 uint32_t remote_address);
81
90bool rts_remote_store_known_remote(struct rts_remote_store *store,
91 uint32_t remote_address);
92
101void rts_remote_store_forget(struct rts_remote_store *store,
102 uint32_t remote_address);
103
111void rts_remote_store_clear(struct rts_remote_store *store);
112
121void rts_remote_store_close(struct rts_remote_store *store);
122
127#ifdef __cplusplus
128} // extern "C"
129#endif
130
131#endif // RTS_REMOTE_STORE_H
Provides an interface for a datastore which contains details about remote controls and rolling codes.
Definition rts_remote_store.h:29