MQTT services definitions moved to mqtt header
This commit is contained in:
parent
92a1cc3cc7
commit
9f20a1b08b
|
|
@ -47,6 +47,10 @@ typedef int mqtt_app_err_t;
|
||||||
#define API_FILE_EMPTY_ERR 15
|
#define API_FILE_EMPTY_ERR 15
|
||||||
#define API_UNKNOWN_ERR 16
|
#define API_UNKNOWN_ERR 16
|
||||||
|
|
||||||
|
#define EXTERNAL_SERVICE_NAME "RS485"
|
||||||
|
#define UPLINK_SUBTOPIC "UPLINK" // Device publish to this topic
|
||||||
|
#define DOWNLINK_SUBTOPIC "DWLINK" // Device listen from this topic
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
char topic[CONFIG_WEBGUIAPP_MQTT_MAX_TOPIC_LENGTH];
|
char topic[CONFIG_WEBGUIAPP_MQTT_MAX_TOPIC_LENGTH];
|
||||||
|
|
|
||||||
|
|
@ -29,10 +29,6 @@
|
||||||
#define TAG "MQTT"
|
#define TAG "MQTT"
|
||||||
#define SERVICE_NAME "SYSTEM" // Dedicated service name
|
#define SERVICE_NAME "SYSTEM" // Dedicated service name
|
||||||
|
|
||||||
#define EXTERNAL_SERVICE_NAME "RS485"
|
|
||||||
#define UPLINK_SUBTOPIC "UPLINK" // Device publish to this topic
|
|
||||||
#define DOWNLINK_SUBTOPIC "DWLINK" // Device listen from this topic
|
|
||||||
|
|
||||||
#define MQTT_DEBUG_MODE CONFIG_WEBGUIAPP_MQTT_DEBUG_LEVEL
|
#define MQTT_DEBUG_MODE CONFIG_WEBGUIAPP_MQTT_DEBUG_LEVEL
|
||||||
|
|
||||||
#define MQTT_MESSAGE_BUFER_LENTH 10 //size of mqtt queue
|
#define MQTT_MESSAGE_BUFER_LENTH 10 //size of mqtt queue
|
||||||
|
|
|
||||||
|
|
@ -131,8 +131,8 @@ void serial_RX_task(void *arg)
|
||||||
|
|
||||||
if (GetSysConf()->serialSettings.Flags.IsBridgeEnabled)
|
if (GetSysConf()->serialSettings.Flags.IsBridgeEnabled)
|
||||||
{
|
{
|
||||||
ExternalServiceMQTTSend(rxbuf, buffered_size, 0);
|
ExternalServiceMQTTSend(EXTERNAL_SERVICE_NAME, rxbuf, buffered_size, 0);
|
||||||
ExternalServiceMQTTSend(rxbuf, buffered_size, 1);
|
ExternalServiceMQTTSend(EXTERNAL_SERVICE_NAME, rxbuf, buffered_size, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ReceiveHandlerAPI();
|
ReceiveHandlerAPI();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user