Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
 4.1.99
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
openthread.h File Reference

OpenThread stack public header. More...

#include <zephyr/kernel.h>
#include <zephyr/net/net_if.h>
#include <zephyr/kernel/thread.h>
#include <openthread/instance.h>
#include <openthread/message.h>

Go to the source code of this file.

Data Structures

struct  openthread_state_changed_callback
 OpenThread state change callback
More...
 
struct  openthread_state_changed_cb
 OpenThread state change callback structure. More...
 

Typedefs

typedef void(* openthread_receive_cb) (otMessage *message, void *context)
 The common callback type for receiving IPv4 (translated by NAT64) and IPv6 datagrams.
 

Functions

int openthread_state_changed_callback_register (struct openthread_state_changed_callback *cb)
 Register callbacks that will be called when a certain configuration or state changes occur within OpenThread.
 
int openthread_state_changed_callback_unregister (struct openthread_state_changed_callback *cb)
 Unregister OpenThread configuration or state changed callbacks.
 
int openthread_state_changed_cb_register (struct openthread_context *ot_context, struct openthread_state_changed_cb *cb)
 Registers callbacks which will be called when certain configuration or state changes occur within OpenThread.
 
int openthread_state_changed_cb_unregister (struct openthread_context *ot_context, struct openthread_state_changed_cb *cb)
 Unregisters OpenThread configuration or state changed callbacks.
 
k_tid_t openthread_thread_id_get (void)
 Get OpenThread thread identification.
 
struct openthread_context * openthread_get_default_context (void)
 Get pointer to default OpenThread context.
 
struct otInstance * openthread_get_default_instance (void)
 Get pointer to default OpenThread instance.
 
int openthread_init (void)
 Initialize the OpenThread module.
 
int openthread_run (void)
 Run the OpenThread network.
 
int openthread_stop (void)
 Disable the OpenThread network.
 
int openthread_start (struct openthread_context *ot_context)
 Starts the OpenThread network.
 
void openthread_set_receive_cb (openthread_receive_cb cb, void *context)
 Set the additional callback for receiving packets.
 
void openthread_mutex_lock (void)
 Lock internal mutex before accessing OpenThread API.
 
int openthread_mutex_try_lock (void)
 Try to lock internal mutex before accessing OpenThread API.
 
void openthread_mutex_unlock (void)
 Unlock internal mutex after accessing OpenThread API.
 
void openthread_api_mutex_lock (struct openthread_context *ot_context)
 Lock internal mutex before accessing OT API.
 
int openthread_api_mutex_try_lock (struct openthread_context *ot_context)
 Try to lock internal mutex before accessing OT API.
 
void openthread_api_mutex_unlock (struct openthread_context *ot_context)
 Unlock internal mutex after accessing OT API.
 

Detailed Description

OpenThread stack public header.