Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_radio_node.h
1 #ifndef _BC_RADIO_NODE_H
2 #define _BC_RADIO_NODE_H
3 
4 #include <bc_radio.h>
5 #include <bc_radio_pub.h>
6 
10 
11 #define BC_RADIO_NODE_HEAD_SIZE (BC_RADIO_HEAD_SIZE + 1 + BC_RADIO_ID_SIZE)
12 #define BC_RADIO_NODE_MAX_BUFFER_SIZE (BC_RADIO_MAX_BUFFER_SIZE - BC_RADIO_ID_SIZE - 1)
13 #define BC_RADIO_NODE_MAX_COMPOUND_PART (BC_RADIO_NODE_MAX_BUFFER_SIZE / 5)
14 #define BC_RADIO_NODE_MAX_COMPOUND_BUFFER_SIZE (BC_RADIO_NODE_MAX_COMPOUND_PART * 5)
15 
16 enum
17 {
18  BC_RADIO_NODE_STATE_LED = BC_RADIO_PUB_STATE_LED,
19  BC_RADIO_NODE_STATE_RELAY_MODULE_0 = BC_RADIO_PUB_STATE_RELAY_MODULE_0,
20  BC_RADIO_NODE_STATE_RELAY_MODULE_1 = BC_RADIO_PUB_STATE_RELAY_MODULE_1,
21  BC_RADIO_NODE_STATE_POWER_MODULE_RELAY = BC_RADIO_PUB_STATE_POWER_MODULE_RELAY,
22 };
23 
24 typedef enum
25 {
26  BC_RADIO_NODE_LED_STRIP_EFFECT_TEST = 0,
27  BC_RADIO_NODE_LED_STRIP_EFFECT_RAINBOW = 1,
28  BC_RADIO_NODE_LED_STRIP_EFFECT_RAINBOW_CYCLE = 2,
29  BC_RADIO_NODE_LED_STRIP_EFFECT_THEATER_CHASE_RAINBOW = 3,
30  BC_RADIO_NODE_LED_STRIP_EFFECT_COLOR_WIPE = 4,
31  BC_RADIO_NODE_LED_STRIP_EFFECT_THEATER_CHASE = 5,
32  BC_RADIO_NODE_LED_STRIP_EFFECT_STROBOSCOPE = 6,
33  BC_RADIO_NODE_LED_STRIP_EFFECT_ICICLE = 7,
34  BC_RADIO_NODE_LED_STRIP_EFFECT_PULSE_COLOR = 8
35 
36 } bc_radio_node_led_strip_effect_t;
37 
44 
45 bool bc_radio_node_state_set(uint64_t *id, uint8_t state_id, bool *state);
46 
52 
53 bool bc_radio_node_state_get(uint64_t *id, uint8_t state_id);
54 
61 
62 bool bc_radio_node_buffer(uint64_t *id, void *buffer, size_t length);
63 
69 
70 bool bc_radio_node_led_strip_color_set(uint64_t *id, uint32_t color);
71 
77 
78 bool bc_radio_node_led_strip_brightness_set(uint64_t *id, uint8_t brightness);
79 
86 
87 bool bc_radio_node_led_strip_compound_set(uint64_t *id, uint8_t *compound, size_t length);
88 
96 
97 bool bc_radio_node_led_strip_effect_set(uint64_t *id, bc_radio_node_led_strip_effect_t type, uint16_t wait, uint32_t color);
98 
109 
110 bool bc_radio_node_led_strip_thermometer_set(uint64_t *id, float temperature, int8_t min, int8_t max, uint8_t white_dots, float *set_point, uint32_t set_point_color);
111 
116 
117 void bc_radio_node_decode(uint64_t *id, uint8_t *buffer, size_t length);
118 
120 
121 #endif // _BC_RADIO_NODE_H
bool bc_radio_node_led_strip_effect_set(uint64_t *id, bc_radio_node_led_strip_effect_t type, uint16_t wait, uint32_t color)
Send data to node.
bool bc_radio_node_state_get(uint64_t *id, uint8_t state_id)
Send request for get actual state.
Definition: bc_radio_node.c:28
bool bc_radio_node_buffer(uint64_t *id, void *buffer, size_t length)
Send data to node.
Definition: bc_radio_node.c:41
bool bc_radio_node_led_strip_compound_set(uint64_t *id, uint8_t *compound, size_t length)
Send data to node.
Definition: bc_radio_node.c:84
bool bc_radio_node_state_set(uint64_t *id, uint8_t state_id, bool *state)
Send request for set new state.
Definition: bc_radio_node.c:13
bool bc_radio_node_led_strip_color_set(uint64_t *id, uint32_t color)
Send data to node.
Definition: bc_radio_node.c:58
bool bc_radio_node_led_strip_brightness_set(uint64_t *id, uint8_t brightness)
Send data to node.
Definition: bc_radio_node.c:71
void bc_radio_node_decode(uint64_t *id, uint8_t *buffer, size_t length)
Internal decode function for bc_radio.c.
bool bc_radio_node_led_strip_thermometer_set(uint64_t *id, float temperature, int8_t min, int8_t max, uint8_t white_dots, float *set_point, uint32_t set_point_color)
Send data to node.