add: mqtt status client
This commit is contained in:
parent
1d1ae61310
commit
679175f1a9
11 changed files with 119 additions and 40 deletions
include
|
@ -21,6 +21,7 @@ typedef struct
|
|||
run_type_t run_type;
|
||||
char name[MAX_NAME_LENGTH + 1];
|
||||
uint16_t discovery_port;
|
||||
uint16_t mqtt_port;
|
||||
uint8_t relay_count;
|
||||
config_relay_t *relay_configs;
|
||||
} config_t;
|
||||
|
|
17
include/connections.h
Normal file
17
include/connections.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
#ifndef CONTROLLER_CONNECTIONS_H
|
||||
#define CONTROLLER_CONNECTIONS_H
|
||||
|
||||
#include <mongoose.h>
|
||||
|
||||
struct mg_connection*
|
||||
connection_discovery_bind(struct mg_mgr *mgr);
|
||||
|
||||
struct mg_connection*
|
||||
connection_command_bind(struct mg_mgr *mgr);
|
||||
|
||||
struct mg_connection*
|
||||
connection_mqtt_connect(struct mg_mgr *mgr);
|
||||
|
||||
extern struct mg_connection *global_connection_mqtt;
|
||||
|
||||
#endif /* CONTROLLER_CONNECTIONS_H */
|
|
@ -12,6 +12,7 @@ typedef struct
|
|||
{
|
||||
uint8_t number;
|
||||
int is_on;
|
||||
int sent_to_broker;
|
||||
char name[MAX_NAME_LENGTH + 1];
|
||||
schedule_t *schedules[7];
|
||||
} relay_t;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue