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 {
52 };
53 
54 enum
55 {
56  BC_RADIO_PUB_EVENT_PUSH_BUTTON = 0,
57  BC_RADIO_PUB_EVENT_PIR_MOTION = 1,
58  BC_RADIO_PUB_EVENT_LCD_BUTTON_LEFT = 2,
59  BC_RADIO_PUB_EVENT_LCD_BUTTON_RIGHT = 3,
60  BC_RADIO_PUB_EVENT_ACCELEROMETER_ALERT = 4,
61  BC_RADIO_PUB_EVENT_HOLD_BUTTON = 5
62 };
63 
64 enum
65 {
66  BC_RADIO_PUB_STATE_LED = 0,
67  BC_RADIO_PUB_STATE_RELAY_MODULE_0 = 1,
68  BC_RADIO_PUB_STATE_RELAY_MODULE_1 = 2,
69  BC_RADIO_PUB_STATE_POWER_MODULE_RELAY = 3
70 };
71 
72 enum
73 {
74  BC_RADIO_PUB_VALUE_HOLD_DURATION_BUTTON = 0
75 };
76 
82 
83 bool bc_radio_pub_event_count(uint8_t event_id, uint16_t *event_count);
84 
89 
90 bool bc_radio_pub_push_button(uint16_t *event_count);
91 
97 
98 bool bc_radio_pub_temperature(uint8_t channel, float *celsius);
99 
105 
106 bool bc_radio_pub_humidity(uint8_t channel, float *percentage);
107 
113 
114 bool bc_radio_pub_luminosity(uint8_t channel, float *lux);
115 
122 
123 bool bc_radio_pub_barometer(uint8_t channel, float *pascal, float *meter);
124 
129 
130 bool bc_radio_pub_co2(float *concentration);
131 
136 
137 bool bc_radio_pub_battery(float *voltage);
138 
145 
146 bool bc_radio_pub_acceleration(float *x_axis, float *y_axis, float *z_axis);
147 
153 
154 bool bc_radio_pub_buffer(void *buffer, size_t length);
155 
161 
162 bool bc_radio_pub_state(uint8_t state_id, bool *state);
163 
168 
169 bool bc_radio_pub_value_int(uint8_t value_id, int *value);
170 
176 
177 bool bc_radio_pub_bool(const char *subtopic, bool *value);
178 
184 
185 bool bc_radio_pub_int(const char *subtopic, int *value);
186 
192 
193 bool bc_radio_pub_uint32(const char *subtopic, uint32_t *value);
194 
200 
201 bool bc_radio_pub_float(const char *subtopic, float *value);
202 
208 
209 bool bc_radio_pub_string(const char *subtopic, const char *value);
210 
215 
216 void bc_radio_pub_decode(uint64_t *id, uint8_t *buffer, size_t length);
217 
219 
220 #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