Wirepas SDK
wms_joining.h
Go to the documentation of this file.
1/* Copyright 2019 Wirepas Ltd. All Rights Reserved.
2 *
3 * See file LICENSE.txt for full license details.
4 *
5 */
6
16#ifndef APP_LIB_JOINING_H_
17#define APP_LIB_JOINING_H_
18
19#include <stdlib.h>
20#include <stdint.h>
21#include <stdbool.h>
22
23#include "wms_app.h"
24#include "wms_settings.h" // For app_lib_settings_net_addr_t and
25 // app_lib_settings_net_channel_t
26#include "wms_time.h" // For app_lib_time_timestamp_coarse_t
27
29#define APP_LIB_JOINING_NAME 0x000a2336
30
32#define APP_LIB_JOINING_VERSION 0x201
33
39#define APP_LIB_JOINING_MIN_INTERVAL 100
40
46#define APP_LIB_JOINING_MAX_INTERVAL 8000
47
53#define APP_LIB_JOINING_MIN_TIMEOUT 100
54
60#define APP_LIB_JOINING_MAX_TIMEOUT 10000
61
69#define APP_LIB_JOINING_MAX_PAYLOAD_NUM_BYTES 64
70
91
114
151
153 app_lib_joining_received_beacon_t;
154
166 const app_lib_joining_received_beacon_t * beacons,
167 size_t num_beacons);
168
193
213
219
240
249
271
285
292
299
314
315#endif /* APP_LIB_JOINING_H_ */
app_res_e
Definition wms_app.h:202
app_lib_joining_beacon_rx_cb_f cb
app_res_e(* app_lib_joining_enable_remote_api_f)(bool enable)
Enable or disable Remote API control for transmitting joining beacons.
#define APP_LIB_JOINING_MAX_PAYLOAD_NUM_BYTES
Maximum number of payload bytes in a joining beacon.
Definition wms_joining.h:69
app_lib_joining_rx_status_e
Status values for beacon reception callback.
Definition wms_joining.h:78
@ APP_LIB_JOINING_RX_STATUS_INTERRUPTED
Definition wms_joining.h:87
@ APP_LIB_JOINING_RX_STATUS_OUT_OF_SPACE
Definition wms_joining.h:89
@ APP_LIB_JOINING_RX_STATUS_DONE
Definition wms_joining.h:80
@ APP_LIB_JOINING_RX_STATUS_STOPPED
Definition wms_joining.h:82
app_lib_joining_start_joining_process_f startJoiningProcess
app_lib_joining_start_joining_beacon_tx_f startJoiningBeaconTx
app_res_e(* app_lib_joining_start_joining_process_f)(app_lib_settings_net_addr_t addr, app_lib_settings_net_channel_t channel)
Start the joining process by joining a cluster as a joining member.
app_lib_joining_start_joining_beacon_rx_f startJoiningBeaconRx
void(* app_lib_joining_beacon_rx_cb_f)(app_lib_joining_rx_status_e status, const app_lib_joining_received_beacon_t *beacons, size_t num_beacons)
Function type for joining beacon RX callback.
app_res_e(* app_lib_joining_enable_proxy_f)(bool enable)
Enable or disable built-in proxy for handling joining data packets.
app_lib_settings_net_channel_t channel
app_res_e(* app_lib_joining_start_joining_beacon_rx_f)(const app_lib_joining_beacon_rx_param_t *param)
Start receiving joining beacons.
app_res_e(* app_lib_joining_stop_joining_beacon_rx_f)(void)
Stop receiving joining beacons.
app_lib_joining_stop_joining_process_f stopJoiningProcess
struct app_lib_joining_received_beacon_s * next
app_res_e(* app_lib_joining_stop_joining_beacon_tx_f)(void)
Stop transmitting joining beacons.
app_res_e(* app_lib_joining_start_joining_beacon_tx_f)(const app_lib_joining_beacon_tx_param_t *param)
Start transmitting joining beacons.
app_lib_settings_net_addr_t addr
app_res_e(* app_lib_joining_stop_joining_process_f)(void)
Stop the joining process and restore network address and channel.
app_lib_joining_enable_remote_api_f enableRemoteApi
app_lib_joining_stop_joining_beacon_rx_f stopJoiningBeaconRx
app_lib_joining_enable_proxy_f enableProxy
app_lib_time_timestamp_coarse_t time
app_lib_joining_stop_joining_beacon_tx_f stopJoiningBeaconTx
Parameters for sending joining beacons.
Definition wms_joining.h:98
Received joining beacon.
Parameters for receiving joining beacons.
List of library functions.
uint32_t app_lib_settings_net_addr_t
Network address type definition.
uint8_t app_lib_settings_net_channel_t
Channel type definition.
uint32_t app_lib_time_timestamp_coarse_t
Coarse timestamp type.
Definition wms_time.h:50