0.01.00
instance_api.cpp File Reference

This file implements the OpenThread Instance API. More...

Macros

#define WPP_NAME   "instance_api.tmh"
 

Functions

static otDEFINE_ALIGNED_VAR (sInstanceRaw, sizeof(otInstance), uint64_t)
 
otInstanceotGetInstance (void)
 This function returns a pointer to the single otInstance (if initialized and ready). More...
 
ot::ThreadNetifotGetThreadNetif (void)
 This function returns a reference to the single thread network interface instance. More...
 
ot::MeshForwarderotGetMeshForwarder (void)
 This function returns a reference to the single MeshForwarder instance. More...
 
ot::TaskletSchedulerotGetTaskletScheduler (void)
 This function returns a reference to the single TaskletShceduler instance. More...
 
ot::Ip6::Ip6otGetIp6 (void)
 This function returns a reference to the single Ip6 instance. More...
 
void otInstancePostConstructor (otInstance *aInstance)
 
otInstanceotInstanceInitSingle (void)
 This function initializes the static single instance of the OpenThread library. More...
 
bool otInstanceIsInitialized (otInstance *aInstance)
 This function indicates whether or not the instance is valid/initialized. More...
 
void otInstanceFinalize (otInstance *aInstance)
 This function disables the OpenThread library. More...
 
otError otSetStateChangedCallback (otInstance *aInstance, otStateChangedCallback aCallback, void *aCallbackContext)
 This function registers a callback to indicate when certain configuration or state changes within OpenThread. More...
 
void otRemoveStateChangeCallback (otInstance *aInstance, otStateChangedCallback aCallback, void *aCallbackContext)
 This function removes a callback to indicate when certain configuration or state changes within OpenThread. More...
 
void otInstanceReset (otInstance *aInstance)
 This method triggers a platform reset. More...
 
void otInstanceFactoryReset (otInstance *aInstance)
 This method deletes all the settings stored on non-volatile memory, and then triggers platform reset. More...
 
otError otInstanceErasePersistentInfo (otInstance *aInstance)
 This function erases all the OpenThread persistent info (network settings) stored on non-volatile memory. More...
 
otLogLevel otGetDynamicLogLevel (otInstance *aInstance)
 This function returns the current dynamic log level. More...
 
otError otSetDynamicLogLevel (otInstance *aInstance, otLogLevel aLogLevel)
 This function sets the dynamic log level. More...
 

Variables

otInstancesInstance = NULL
 

Detailed Description

This file implements the OpenThread Instance API.

Function Documentation

§ otGetInstance()

otInstance* otGetInstance ( void  )

This function returns a pointer to the single otInstance (if initialized and ready).

Returns
A pointer to single otInstance structure, or NULL if the instance is not ready, i.e. either it is not yet initialized (no call to otInstanceInitSingle()) or it is finalized (call to otInstanceFinalize()).

§ otGetIp6()

ot::Ip6::Ip6& otGetIp6 ( void  )

This function returns a reference to the single Ip6 instance.

Returns
A reference to the Ip6 instance.

§ otGetMeshForwarder()

ot::MeshForwarder& otGetMeshForwarder ( void  )

This function returns a reference to the single MeshForwarder instance.

Returns
A reference to the MeshForwarder instance.

§ otGetTaskletScheduler()

ot::TaskletScheduler& otGetTaskletScheduler ( void  )

This function returns a reference to the single TaskletShceduler instance.

Returns
A reference to the TaskletShceduler instance.

§ otGetThreadNetif()

ot::ThreadNetif& otGetThreadNetif ( void  )

This function returns a reference to the single thread network interface instance.

Returns
A reference to the thread network interface instance.