open62541 1.3.12
Open source implementation of OPC UA
Loading...
Searching...
No Matches
pubsub_mqtt.h
Go to the documentation of this file.
1/** This work is licensed under a Creative Commons CCZero 1.0 Universal License.
2 * See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
3 *
4 * Copyright 2018 (c) Fraunhofer IOSB (Author: Lukas Meling)
5 * Copyright (c) 2020 basysKom GmbH
6 */
7
8#ifndef UA_NETWORK_MQTT_H_
9#define UA_NETWORK_MQTT_H_
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
17
18#if defined(UA_ENABLE_MQTT_TLS_OPENSSL)
19#include <openssl/ssl.h>
20#elif defined(UA_ENABLE_MQTT_TLS_MBEDTLS)
21#include <mqtt_pal.h>
22#endif
23
24/** mqtt network layer specific internal data */
25typedef struct {
26 UA_NetworkAddressUrlDataType address;
29 uint8_t *mqttSendBuffer;
30 uint8_t *mqttRecvBuffer;
33#if defined(UA_ENABLE_MQTT_TLS_OPENSSL)
34 BIO *sockfd;
35#elif defined(UA_ENABLE_MQTT_TLS_MBEDTLS)
36 mqtt_pal_socket_handle sockfd;
37#else
38 int sockfd;
39#endif
40 void * mqttClient;
41 void (*callback)(UA_ByteString *encodedBuffer, UA_ByteString *topic);
50/** TODO:
51 * will topic,
52 * will message,
53 * keep alive
54 * ssl: flag
55 */
56
57
60
61
62#ifdef __cplusplus
63} // extern "C"
64#endif
65
66#endif /* UA_NETWORK_MQTT_H_ */
UA_PubSubTransportLayer UA_PubSubTransportLayerMQTT(void)
TODO: will topic, will message, keep alive ssl: flag.
This work is licensed under a Creative Commons CCZero 1.0 Universal License.
Definition pubsub_mqtt.h:25
UA_Connection * connection
Definition pubsub_mqtt.h:32
UA_NetworkAddressUrlDataType address
Definition pubsub_mqtt.h:26
_UA_BEGIN_DECLS typedef bool UA_Boolean
This Source Code Form is subject to the terms of the Mozilla Public License, v.
Definition types.h:26
uint32_t UA_UInt32
Definition types.h:56