Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_radio_pub.h
1 #ifndef _BC_RADIO_PUB_H
2 #define _BC_RADIO_PUB_H
3 
4 #include <bc_radio.h>
5 
9 
10 enum
11 {
42 };
43 
44 enum
45 {
46  BC_RADIO_PUB_EVENT_PUSH_BUTTON = 0,
47  BC_RADIO_PUB_EVENT_PIR_MOTION = 1,
48  BC_RADIO_PUB_EVENT_LCD_BUTTON_LEFT = 2,
49  BC_RADIO_PUB_EVENT_LCD_BUTTON_RIGHT = 3,
50  BC_RADIO_PUB_EVENT_ACCELEROMETER_ALERT = 4,
51  BC_RADIO_PUB_EVENT_HOLD_BUTTON = 5
52 };
53 
54 enum
55 {
56  BC_RADIO_PUB_STATE_LED = 0,
57  BC_RADIO_PUB_STATE_RELAY_MODULE_0 = 1,
58  BC_RADIO_PUB_STATE_RELAY_MODULE_1 = 2,
59  BC_RADIO_PUB_STATE_POWER_MODULE_RELAY = 3
60 };
61 
62 enum
63 {
64  BC_RADIO_PUB_VALUE_HOLD_DURATION_BUTTON = 0
65 };
66 
72 
73 bool bc_radio_pub_event_count(uint8_t event_id, uint16_t *event_count);
74 
79 
80 bool bc_radio_pub_push_button(uint16_t *event_count);
81 
87 
88 bool bc_radio_pub_temperature(uint8_t channel, float *celsius);
89 
95 
96 bool bc_radio_pub_humidity(uint8_t channel, float *percentage);
97 
103 
104 bool bc_radio_pub_luminosity(uint8_t channel, float *lux);
105 
112 
113 bool bc_radio_pub_barometer(uint8_t channel, float *pascal, float *meter);
114 
119 
120 bool bc_radio_pub_co2(float *concentration);
121 
126 
127 bool bc_radio_pub_battery(float *voltage);
128 
135 
136 bool bc_radio_pub_acceleration(float *x_axis, float *y_axis, float *z_axis);
137 
143 
144 bool bc_radio_pub_buffer(void *buffer, size_t length);
145 
151 
152 bool bc_radio_pub_state(uint8_t state_id, bool *state);
153 
158 
159 bool bc_radio_pub_value_int(uint8_t value_id, int *value);
160 
166 
167 bool bc_radio_pub_bool(const char *subtopic, bool *value);
168 
174 
175 bool bc_radio_pub_int(const char *subtopic, int *value);
176 
182 
183 bool bc_radio_pub_uint32(const char *subtopic, uint32_t *value);
184 
190 
191 bool bc_radio_pub_float(const char *subtopic, float *value);
192 
198 
199 bool bc_radio_pub_string(const char *subtopic, const char *value);
200 
205 
206 void bc_radio_pub_decode(uint64_t *id, uint8_t *buffer, size_t length);
207 
209 
210 #endif // _BC_RADIO_PUB_H
bool bc_radio_pub_value_int(uint8_t value_id, int *value)
Publish int value.
Definition: bc_radio_pub.c:155
bool bc_radio_pub_string(const char *subtopic, const char *value)
Publish string value in custom topic.
Definition: bc_radio_pub.c:247
bool bc_radio_pub_humidity(uint8_t channel, float *percentage)
Publish humidity.
Definition: bc_radio_pub.c:53
bool bc_radio_pub_bool(const char *subtopic, bool *value)
Publish bool value in custom topic.
Definition: bc_radio_pub.c:167
bool bc_radio_pub_state(uint8_t state_id, bool *state)
Publish battery.
Definition: bc_radio_pub.c:143
bool bc_radio_pub_co2(float *concentration)
Publish co2.
Definition: bc_radio_pub.c:90
bool bc_radio_pub_barometer(uint8_t channel, float *pascal, float *meter)
Publish barometer.
Definition: bc_radio_pub.c:77
bool bc_radio_pub_buffer(void *buffer, size_t length)
Publish buffer.
Definition: bc_radio_pub.c:127
bool bc_radio_pub_push_button(uint16_t *event_count)
Publish push button event count, same as use bc_radio_pub_event_count with BC_RADIO_PUB_EVENT_PUSH_BU...
Definition: bc_radio_pub.c:36
bool bc_radio_pub_uint32(const char *subtopic, uint32_t *value)
Publish uint32 value in custom topic.
Definition: bc_radio_pub.c:207
bool bc_radio_pub_acceleration(float *x_axis, float *y_axis, float *z_axis)
Publish acceleration.
Definition: bc_radio_pub.c:112
void bc_radio_pub_decode(uint64_t *id, uint8_t *buffer, size_t length)
Internal decode function for bc_radio.c.
Definition: bc_radio_pub.c:267
bool bc_radio_pub_battery(float *voltage)
Publish battery.
Definition: bc_radio_pub.c:101
bool bc_radio_pub_event_count(uint8_t event_id, uint16_t *event_count)
Publish event count.
Definition: bc_radio_pub.c:24
bool bc_radio_pub_int(const char *subtopic, int *value)
Publish int value in custom topic.
Definition: bc_radio_pub.c:187
bool bc_radio_pub_float(const char *subtopic, float *value)
Publish float value in custom topic.
Definition: bc_radio_pub.c:227
bool bc_radio_pub_luminosity(uint8_t channel, float *lux)
Publish luminosity.
Definition: bc_radio_pub.c:65
bool bc_radio_pub_temperature(uint8_t channel, float *celsius)
Publish temperature.
Definition: bc_radio_pub.c:41