Lines Matching full:client
9 * @brief MQTT-SN Client Implementation
12 * MQTT-SN Client's Application interface is defined in this header.
15 * @defgroup mqtt_sn_socket MQTT-SN Client library
63 * which the corresponding topic name is known in advance by both the client
157 * @param[in] client Identifies the client for which the event is notified.
161 typedef void (*mqtt_sn_evt_cb_t)(struct mqtt_sn_client *client, const struct mqtt_sn_evt *evt);
172 * @brief Will be called once on client init to initialize the transport.
179 * @brief Will be called on client deinit
196 int (*sendto)(struct mqtt_sn_client *client, void *buf, size_t sz, const void *dest_addr,
205 ssize_t (*recvfrom)(struct mqtt_sn_client *client, void *rx_buf, size_t rx_len,
218 int (*poll)(struct mqtt_sn_client *client);
251 * Structure describing an MQTT-SN client.
254 /** 1-23 character unique client ID */
273 /** Underlying transport to be used by the client */
300 /** Current state of the MQTT-SN client */
323 * @brief Initialize a client.
325 * @param client The MQTT-SN client to initialize.
326 * @param client_id The ID to be used by the client.
327 * @param transport The transport to be used by the client.
328 * @param evt_cb The event callback function for the client.
336 int mqtt_sn_client_init(struct mqtt_sn_client *client, const struct mqtt_sn_data *client_id,
341 * @brief Deinitialize the client.
345 * @param client The MQTT-SN client to deinitialize.
347 void mqtt_sn_client_deinit(struct mqtt_sn_client *client);
354 * @param client The MQTT-SN client to connect.
360 int mqtt_sn_add_gw(struct mqtt_sn_client *client, uint8_t gw_id, struct mqtt_sn_data gw_addr);
365 * @param client The MQTT-SN client to connect.
370 int mqtt_sn_search(struct mqtt_sn_client *client, uint8_t radius);
373 * @brief Connect the client.
375 * @param client The MQTT-SN client to connect.
381 int mqtt_sn_connect(struct mqtt_sn_client *client, bool will, bool clean_session);
384 * @brief Disconnect the client.
386 * @param client The MQTT-SN client to disconnect.
390 int mqtt_sn_disconnect(struct mqtt_sn_client *client);
393 * @brief Set the client into sleep state.
395 * @param client The MQTT-SN client to be put to sleep.
400 int mqtt_sn_sleep(struct mqtt_sn_client *client, uint16_t duration);
405 * @param client The MQTT-SN client that should subscribe.
411 int mqtt_sn_subscribe(struct mqtt_sn_client *client, enum mqtt_sn_qos qos,
417 * @param client The MQTT-SN client that should unsubscribe.
423 int mqtt_sn_unsubscribe(struct mqtt_sn_client *client, enum mqtt_sn_qos qos,
431 * @param client The MQTT-SN client that should publish.
439 int mqtt_sn_publish(struct mqtt_sn_client *client, enum mqtt_sn_qos qos,
446 * If the client's transport struct contains a poll-function, this function is non-blocking.
448 * @param client The MQTT-SN client to check for incoming data.
452 int mqtt_sn_input(struct mqtt_sn_client *client);
457 * @param[in] client The MQTT-SN client that uses this topic.
464 int mqtt_sn_get_topic_name(struct mqtt_sn_client *client, uint16_t id,