An open source implementation of Thread stack.
More...
An open source implementation of Thread stack.
- See also
- https://github.com/openthread/openthread
Thread is a mesh oriented network stack running for IEEE802.15.4 networks.
|
void | recv_pkt (otInstance *aInstance, netdev_t *dev) |
| Gets packet from driver and tells OpenThread about the reception. More...
|
|
void | send_pkt (otInstance *aInstance, netdev_t *dev, netdev_event_t event) |
| Inform OpenThread when tx is finished. More...
|
|
event_queue_t * | openthread_get_evq (void) |
| Get OpenThread event queue. More...
|
|
otInstance * | openthread_get_instance (void) |
| Get pointer to the OpenThread instance. More...
|
|
void | openthread_bootstrap (void) |
| Bootstrap OpenThread.
|
|
void | openthread_radio_init (netdev_t *dev, uint8_t *tb, uint8_t *rb) |
| Init OpenThread radio. More...
|
|
int | openthread_netdev_init (char *stack, int stacksize, char priority, const char *name, netdev_t *netdev) |
| Starts OpenThread thread. More...
|
|
kernel_pid_t | openthread_get_pid (void) |
| get PID of OpenThread thread. More...
|
|
void | ot_random_init (void) |
| Init OpenThread random.
|
|
uint8_t | ot_exec_command (otInstance *ot_instance, const char *command, void *arg, void *answer) |
| Execute OpenThread command. More...
|
|
uint8_t | ot_call_command (char *command, void *arg, void *answer) |
| Call OpenThread command in same thread as OT core (due to concurrency). More...
|
|
◆ openthread_get_evq()
Get OpenThread event queue.
- Returns
- pointer to the event queue
◆ openthread_get_instance()
otInstance* openthread_get_instance |
( |
void |
| ) |
|
Get pointer to the OpenThread instance.
- Returns
- pointer to the OpenThread instance
◆ openthread_get_pid()
get PID of OpenThread thread.
- Returns
- PID of OpenThread thread
◆ openthread_netdev_init()
int openthread_netdev_init |
( |
char * |
stack, |
|
|
int |
stacksize, |
|
|
char |
priority, |
|
|
const char * |
name, |
|
|
netdev_t * |
netdev |
|
) |
| |
Starts OpenThread thread.
- Parameters
-
[in] | stack | pointer to the stack designed for OpenThread |
[in] | stacksize | size of the stack |
[in] | priority | priority of the OpenThread stack |
[in] | name | name of the OpenThread stack |
[in] | netdev | pointer to the netdev interface |
- Returns
- PID of OpenThread thread
-
-EINVAL if there was an error creating the thread
◆ openthread_radio_init()
void openthread_radio_init |
( |
netdev_t * |
dev, |
|
|
uint8_t * |
tb, |
|
|
uint8_t * |
rb |
|
) |
| |
Init OpenThread radio.
- Parameters
-
[in] | dev | pointer to a netdev interface |
[in] | tb | pointer to the TX buffer designed for OpenThread |
[in] | rb | pointer to the RX buffer designed for Open_Thread |
◆ ot_call_command()
uint8_t ot_call_command |
( |
char * |
command, |
|
|
void * |
arg, |
|
|
void * |
answer |
|
) |
| |
Call OpenThread command in same thread as OT core (due to concurrency).
- Note
- An OpenThread command allows direct calls to OpenThread API (otXXX functions) without worrying about concurrency issues. All API calls should be made in OT_JOB type functions.
- Parameters
-
[in] | command | name of the command to call |
[in] | arg | arg for the command |
[out] | answer | answer for the command |
- Returns
- 0 on success, 1 on error
◆ ot_exec_command()
uint8_t ot_exec_command |
( |
otInstance * |
ot_instance, |
|
|
const char * |
command, |
|
|
void * |
arg, |
|
|
void * |
answer |
|
) |
| |
Execute OpenThread command.
Call this function only in OpenThread thread
- Parameters
-
[in] | ot_instance | OpenThread instance |
[in] | command | OpenThread command name |
[in] | arg | arg for the command |
[out] | answer | answer for the command |
- Returns
- 0 on success, 1 on error
◆ recv_pkt()
void recv_pkt |
( |
otInstance * |
aInstance, |
|
|
netdev_t * |
dev |
|
) |
| |
Gets packet from driver and tells OpenThread about the reception.
- Parameters
-
[in] | aInstance | pointer to an OpenThread instance |
[in] | dev | pointer to a netdev instance |
◆ send_pkt()
Inform OpenThread when tx is finished.
- Parameters
-
[in] | aInstance | pointer to an OpenThread instance |
[in] | dev | pointer to a netdev interface |
[in] | event | just occurred netdev event |