39#define MQTT_TOPIC_MAX_LENGTH 512
40#define MQTT_MESSAGE_MAX_LENGTH 512
48#define REGEX_NOT_STATE_OR_MQTT_CLIENT_TOPICS "^(?!((ucl\\/by-unid\\/.*\\/State$)|(ucl\\/by-mqtt-client\\/.*))).*"
49#define REGEX_NOT_STATE_TOPIC "^(?!ucl\\/by-unid\\/.*\\/State$).*"
50#define REGEX_ALL_TOPICS "^.+"
62 const size_t message_length);
66 const size_t message_length,
107 const size_t message_length,
void uic_mqtt_unsubscribe(const char *topic, mqtt_message_callback_t callback)
Unsubscribe from a topic.
Definition: uic_mqtt.c:190
void uic_mqtt_unsubscribe_ex(const char *topic, mqtt_message_callback_ex_t callback, void *user)
Unsubscribe from a topic.
Definition: uic_mqtt.c:195
void uic_mqtt_subscribe_ex(const char *topic, mqtt_message_callback_ex_t callback, void *user)
Subscribe to a topic.
Definition: uic_mqtt.c:153
int uic_mqtt_teardown()
Definition: uic_mqtt.c:140
const char * uic_mqtt_get_client_id()
Gets the MQTT Client ID in used by the MQTT Client.
Definition: uic_mqtt.c:215
void uic_mqtt_unretain(const char *prefix_pattern)
Un-retain a previously retained message.
Definition: uic_mqtt.c:173
void uic_mqtt_publish(const char *topic, const char *message, const size_t message_length, bool retain)
Add the message and topic to publisher queue system.
Definition: uic_mqtt.c:160
sl_status_t uic_mqtt_setup()
Definition: uic_mqtt.c:101
void uic_mqtt_unretain_by_regex(const char *regex)
Un-retain a previously retained message.
Definition: uic_mqtt.c:181
void uic_mqtt_subscribe(const char *topic, mqtt_message_callback_t callback)
Subscribe to a topic.
Definition: uic_mqtt.c:148
void(* mqtt_message_callback_ex_t)(const char *topic, const char *message, const size_t message_length, void *user)
Definition: uic_mqtt.h:64
void uic_mqtt_set_after_connect_callback(mqtt_connection_callbacks_t callback)
Set a callback which will be executed after having connected.
Definition: uic_mqtt.c:209
void(* mqtt_message_callback_t)(const char *topic, const char *message, const size_t message_length)
A callback type for pushing incoming messages.
Definition: uic_mqtt.h:60
void(* mqtt_connection_callbacks_t)()
A callback type for a before disconnect and after connect.
Definition: uic_mqtt.h:73
void uic_mqtt_set_before_disconnect_callback(mqtt_connection_callbacks_t callback)
Set a callback which will be executed before calling a disconnect.
Definition: uic_mqtt.c:202
bool uic_mqtt_is_connected_to_broker()
Checks if we are currently connected to an MQTT Broker.
Definition: uic_mqtt.c:220
int uic_mqtt_count_topics(const char *prefix_pattern)
Count the number of topics published.
Definition: uic_mqtt.c:168
uint32_t sl_status_t
Definition: sl_status.h:139