#include <liblwm2m.h>
#include <stdio.h>
#include <unistd.h>
#include "mbedtls/certs.h"
#include "mbedtls/error.h"
#include "mbedtls/net_sockets.h"
#include "mbedtls/ssl.h"
#include "mbedtls/timing.h"
#include "openthread/ip6.h"
#include "openthread/random_crypto.h"
#include "openthread/udp.h"
#include "cascoda-util/cascoda_tasklet.h"
#include "ca821x_error.h"
Go to the source code of this file.
|
struct | connection_t |
| The struct for holding information about each connection the lwm2m stack uses. More...
|
|
◆ LWM2M_BSSERVER_PORT
#define LWM2M_BSSERVER_PORT 5685 |
◆ LWM2M_BSSERVER_PORT_STR
#define LWM2M_BSSERVER_PORT_STR "5685" |
◆ LWM2M_DTLS_PORT
#define LWM2M_DTLS_PORT 5684 |
◆ LWM2M_DTLS_PORT_STR
#define LWM2M_DTLS_PORT_STR "5684" |
◆ LWM2M_STANDARD_PORT
#define LWM2M_STANDARD_PORT 5683 |
◆ LWM2M_STANDARD_PORT_STR
#define LWM2M_STANDARD_PORT_STR "5683" |
◆ connection_t
The struct for holding information about each connection the lwm2m stack uses.
◆ anonymous enum
Enumerator |
---|
CIPHERSUITE_COUNT | We only configure one ciphersuite on the client, based on authentication method.
|
CONPOOL_SIZE | Maximum number of concurrent connections.
|
LINK_MTU | Maximum Transmission Unit for link.
|
◆ connection_create()
connection_t* connection_create |
( |
otInstance * |
aInstance, |
|
|
lwm2m_context_t * |
lwm2mH, |
|
|
lwm2m_object_t * |
securityObj, |
|
|
int |
instanceId |
|
) |
| |
Called from example code directly to create a connection when connecting to a server.
Note that the connection will not be immediately active, and will require some time to resolve hostname and form DTLS connection with the server.
- Parameters
-
aInstance | Openthread Instance pointer |
lwm2mH | Wakaama context pointer |
securityObj | Pointer to LWM2M security object (to extract creds) |
instanceId | Security object instance ID |
- Returns
- Pointer to the connection created, or NULL if error.
◆ connection_free()
Free a connection created with connection_create.
- Parameters
-
con | The connection to free |
◆ connection_rx_info_callback()
void connection_rx_info_callback |
( |
uint16_t |
aPktLen | ) |
|
Callback that can be implemented by the application to track receive statistics.
- Parameters
-
aPktLen | Length of the received packet |
◆ connection_tx_info_callback()
void connection_tx_info_callback |
( |
uint16_t |
aPktLen | ) |
|
Callback that can be implemented by the application to track transmit statistics.
- Parameters
-
aPktLen | Length of the received packet |