master
h 24 lines 1.19 KB
Raw
1 // SPDX-License-Identifier: GPL-3.0-or-later
2 #ifndef ACLK_TX_MSGS_H
3 #define ACLK_TX_MSGS_H
4
5 #include <json-c/json.h>
6 #include "libnetdata/libnetdata.h"
7 #include "mqtt_websockets/mqtt_wss_client.h"
8 #include "schema-wrappers/schema_wrappers.h"
9 #include "aclk_util.h"
10
11 uint16_t aclk_send_bin_message_subtopic_pid(mqtt_wss_client client, char *msg, size_t msg_len, enum aclk_topics subtopic, const char *msgname);
12
13 void aclk_http_msg_v2_err(mqtt_wss_client client, const char *topic, const char *msg_id, int http_code, int ec, const char* emsg, const char *payload, size_t payload_len);
14 short aclk_http_msg_v2(mqtt_wss_client client, const char *topic, const char *msg_id, usec_t t_exec, usec_t created,
15 short http_code, const char *payload, size_t payload_len);
16 short aclk_http_msg_v2_direct(mqtt_wss_client client, const char *topic, const char *msg_id,
17 usec_t t_exec, usec_t created, short http_code,
18 const char *http_headers, size_t http_headers_len,
19 const char *body, size_t body_len);
20
21 uint16_t aclk_send_agent_connection_update(mqtt_wss_client client, int reachable);
22 char *aclk_generate_lwt(size_t *size);
23
24 #endif