mqtt_sn_client_transport.h
Go to the documentation of this file.
1 /**
2  * @file mqtt_sn_client_transport.h
3  * @brief Transport protocol abstraction layer
4  *
5  * @section License
6  *
7  * Copyright (C) 2010-2018 Oryx Embedded SARL. All rights reserved.
8  *
9  * This file is part of CycloneTCP Open.
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software Foundation,
23  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24  *
25  * @author Oryx Embedded SARL (www.oryx-embedded.com)
26  * @version 1.9.0
27  **/
28 
29 #ifndef _MQTT_SN_CLIENT_TRANSPORT_H
30 #define _MQTT_SN_CLIENT_TRANSPORT_H
31 
32 //Dependencies
33 #include "core/net.h"
34 #include "mqtt_sn/mqtt_sn_client.h"
35 
36 //C++ guard
37 #ifdef __cplusplus
38  extern "C" {
39 #endif
40 
41 //MQTT-SN related functions
46 
48  const IpAddr *destIpAddr, uint16_t destPort, const void *data,
49  size_t length);
50 
52  const void *data, size_t length);
53 
55  IpAddr *srcIpAddr, uint16_t *srcPort, void *data, size_t size,
56  size_t *received, systime_t timeout);
57 
58 //C++ guard
59 #ifdef __cplusplus
60  }
61 #endif
62 
63 #endif
uint32_t systime_t
Definition: compiler_port.h:44
uint16_t destPort
Definition: tcp.h:301
TCP/IP stack core.
IP network address.
Definition: ip.h:57
error_t mqttSnClientReceiveDatagram(MqttSnClientContext *context, IpAddr *srcIpAddr, uint16_t *srcPort, void *data, size_t size, size_t *received, systime_t timeout)
Receive a datagram.
error_t mqttSnClientOpenConnection(MqttSnClientContext *context, bool_t secure)
Open network connection.
error_t mqttSnClientSendDatagram(MqttSnClientContext *context, const void *data, size_t length)
Send a datagram.
#define MqttSnClientContext
error_t mqttSnClientBroadcastDatagram(MqttSnClientContext *context, const IpAddr *destIpAddr, uint16_t destPort, const void *data, size_t length)
Broadcast a datagram.
Ipv4Addr srcIpAddr
Definition: ipcp.h:75
void mqttSnClientCloseConnection(MqttSnClientContext *context)
Close network connection.
uint16_t srcPort
Definition: tcp.h:300
error_t
Error codes.
Definition: error.h:40
Ipv4Addr destIpAddr
Definition: ipcp.h:76
uint8_t data[]
Definition: dtls_misc.h:167
error_t mqttSnClientShutdownConnection(MqttSnClientContext *context)
Shutdown network connection.
MQTT-SN client.
uint8_t length
Definition: dtls_misc.h:140
int bool_t
Definition: compiler_port.h:47
error_t mqttSnClientEstablishConnection(MqttSnClientContext *context)
Establish network connection.