39#define MQTT_LIB_QOS (2)
40#define MQTT_LIB_MAX_SIZE_TOPIC_NAME (256)
41#define MQTT_LIB_MAX_NB_TOPIC_NAME (256)
42#define MQTT_LIB_CONNECTION_TIMEOUT (4)
43#define MQTT_LIB_KEEPALIVE (4)
96 const char** subTopic,
A platform independent API for atomic integer operations.
enum _SOPC_ReturnStatus SOPC_ReturnStatus
Common enumerations for S2OPC.
S2OPC memory allocation wrappers.
SOPC_ReturnStatus SOPC_MQTT_Send_Message(MqttContextClient *contextClient, const char *topic, SOPC_Buffer message)
Send message to topic destination with MQTT client, contextClient must be successfully initialized wi...
void FctMessageReceived(uint8_t *data, uint16_t size, void *pUser)
Definition sopc_mqtt_transport_layer.h:61
MQTT_CLIENT_STATE
Definition sopc_mqtt_transport_layer.h:48
@ SOPC_MQTT_CLIENT_CONNECTED
Definition sopc_mqtt_transport_layer.h:54
@ SOPC_MQTT_CLIENT_UNITIALIZED
Definition sopc_mqtt_transport_layer.h:49
@ SOPC_MQTT_CLIENT_INITIALIZED
Definition sopc_mqtt_transport_layer.h:51
@ SOPC_MQTT_CLIENT_FAILED_CONNECT
Definition sopc_mqtt_transport_layer.h:55
@ SOPC_MQTT_CLIENT_DISCONNECTED
Definition sopc_mqtt_transport_layer.h:53
@ SOPC_MQTT_CLIENT_LOST_CONNECTION
Definition sopc_mqtt_transport_layer.h:56
struct MQTT_CONTEXT_CLIENT MqttContextClient
Definition sopc_mqtt_transport_layer.h:45
SOPC_ReturnStatus SOPC_MQTT_InitializeAndConnect_Client(MqttContextClient *contextClient, const char *uri, const char *username, const char *password, const char **subTopic, uint16_t nbSubTopic, FctMessageReceived *cbMessageReceived, SOPC_PubSub_OnFatalError *cbFatalError, void *userContext)
Initialize MQTT client and connection, Shall be called after SOPC_MQTT_Create_Client To use MQTT clie...
bool SOPC_MQTT_Client_Is_Connected(MqttContextClient *contextClient)
Return if client is connected or not.
MqttClientState SOPC_MQTT_Client_Get_State(MqttContextClient *contextClient)
Return state of the client.
SOPC_ReturnStatus SOPC_MQTT_Create_Client(MqttContextClient **contextClient)
Allocate memory for MQTT context client. Must be freed with SOPC_MQTT_Release_Client.
enum MQTT_CLIENT_STATE MqttClientState
void SOPC_MQTT_Release_Client(MqttContextClient *contextClient)
Disconnect from server and free MQTT client context pointer.
void SOPC_PubSub_OnFatalError(void *userContext, const char *message)
Definition sopc_pubsub_conf.h:73
A platform independent API to handle time reference management.
Bytes buffer structure.
Definition sopc_buffer.h:38