#define DEBUG_LOG_MODULE_NAME "LOC PROV APP"
#define DEBUG_LOG_MAX_LEVEL LVL_INFO
.psk = {0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9,
0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9,
0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9,
0xd1, 0xd2, 0xd3, 0xd4, 0xd5}
};
static uint8_t m_led_id = 0;
static bool button_event = 0;
static bool on_joining_end_cb(bool success);
static uint32_t send_data(void)
{
static uint32_t id = 0;
.
bytes = (
const uint8_t *) &
id,
.num_bytes = sizeof(id),
.src_endpoint = 26,
.dest_endpoint = 26,
};
id++;
return 10*1000;
}
static uint32_t periodic_task(void)
{
if(button_event)
{
button_event = 0;
}
return 500;
}
static void on_prov_proxy_enabled_cb(bool enabled)
{
if (enabled)
{
}
else
{
}
}
static bool on_joining_end_cb(bool success)
{
(void) success;
return false;
}
static void button_start_joining_cb(uint8_t button_id,
button_event_e event)
{
(void) button_id;
(void) event;
button_event = 1;
}
{
(void) button_id;
(void) event;
}
{
(void) functions;
lib_settings->getNodeRole(&role);
};
{
m_led_id = 1;
}
else
{
m_led_id = 0;
}
}
app_scheduler_res_e App_Scheduler_addTask_execTime(task_cb_f cb, uint32_t delay_ms, uint32_t exec_time_us)
Add a task.
app_scheduler_res_e App_Scheduler_cancelTask(task_cb_f cb)
Cancel a task.
#define APP_SCHEDULER_SCHEDULE_ASAP
Value to return from task or as initial time to be executed ASAP.
#define LOG(level, fmt,...)
Print a log message if its severity is lower or equal to DEBUG_LOG_MAX_LEVEL.
Board-independent LED functions.
led_res_e Led_toggle(uint8_t led_id)
Toggle the given LED.
led_res_e Led_set(uint8_t led_id, bool state)
Turn the given LED on or off.
Local_provisioning_res_e Local_provisioning_init(local_provisioning_psk_t *psk, local_provisioning_proxy_enabled_cb on_proxy_enabled_cb, const local_provisioning_config_t *conf)
Initialize the Local provisioning library.
bool Local_provisioning_is_provisioned()
Is the node provisioned A node is considered provisioned if it has a valid config with network securi...
void Local_provisioning_reset_node()
Reset all node settings.
Local_provisioning_res_e Local_provisioning_start_joining(local_provisioning_joining_beacon_selection_f cb_beacons, local_provisioning_joining_done_cb cb_end)
Start a joining session Node will start a joining request.
Configuration for the Local provisioning library.
Pre shared key structure.
app_lib_data_send_res_e Shared_Data_sendData(app_lib_data_to_send_t *data, app_lib_data_data_sent_cb_f sent_cb)
Send data. The packet to send is represented as a app_lib_data_to_send_t struct.
app_res_e Stack_State_startStack()
Start the stack.
List of global functions, passed to App_entrypoint()
A struct for lib_data->sendData().
#define APP_LIB_SETTINGS_LL_ROLE_BIT
LL role bit.