nRF5 SDK for Thread v0.9.0
Modules | Functions
Configuration

This module includes functions for configuration. More...

Modules

 General
 This module includes functions that manage configuration parameters for the Thread Child, Router, and Leader roles.
 
 Router/Leader
 This module includes functions that manage configuration parameters for the Thread Router and Leader roles.
 
 Test
 This module includes functions that manage configuration parameters required for Thread Certification testing.
 
 Border Router
 This module includes functions that manage configuration parameters that apply to the Thread Border Router role.
 

Functions

OTAPI ThreadError OTCALL otThreadSetEnabled (otInstance *aInstance, bool aEnabled)
 
OTAPI bool OTCALL otThreadGetAutoStart (otInstance *aInstance)
 
OTAPI ThreadError OTCALL otThreadSetAutoStart (otInstance *aInstance, bool aStartAutomatically)
 
OTAPI bool OTCALL otThreadIsSingleton (otInstance *aInstance)
 
OTAPI ThreadError OTCALL otThreadDiscover (otInstance *aInstance, uint32_t aScanChannels, uint16_t aPanid, otHandleActiveScanResult aCallback, void *aCallbackContext)
 
OTAPI bool OTCALL otThreadIsDiscoverInProgress (otInstance *aInstance)
 

Detailed Description

This module includes functions for configuration.

Function Documentation

OTAPI ThreadError OTCALL otThreadDiscover ( otInstance *  aInstance,
uint32_t  aScanChannels,
uint16_t  aPanid,
otHandleActiveScanResult  aCallback,
void *  aCallbackContext 
)

This function starts a Thread Discovery scan.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aScanChannelsA bit vector indicating which channels to scan (e.g. OT_CHANNEL_11_MASK).
[in]aPanIdThe PAN ID filter (set to Broadcast PAN to disable filter).
[in]aCallbackA pointer to a function called on receiving an MLE Discovery Response or scan completes.
[in]aCallbackContextA pointer to application-specific context.
Return values
kThreadError_NoneAccepted the Thread Discovery request.
kThreadError_BusyAlready performing an Thread Discovery.
OTAPI bool OTCALL otThreadGetAutoStart ( otInstance *  aInstance)

This function queries if the Thread stack is configured to automatically start on reinitialization.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Return values
TRUEIt is configured to automatically start.
FALSEIt is not configured to automatically start.
OTAPI bool OTCALL otThreadIsDiscoverInProgress ( otInstance *  aInstance)

This function determines if an MLE Thread Discovery is currently in progress.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
OTAPI bool OTCALL otThreadIsSingleton ( otInstance *  aInstance)

This function indicates whether a node is the only router on the network.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Return values
TRUEIt is the only router in the network.
FALSEIt is a child or is not a single router in the network.
OTAPI ThreadError OTCALL otThreadSetAutoStart ( otInstance *  aInstance,
bool  aStartAutomatically 
)

This function configures the Thread stack to automatically start on reinitialization. It has no effect on the current Thread state.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aStartAutomaticallyTRUE to automatically start; FALSE to not automatically start.
OTAPI ThreadError OTCALL otThreadSetEnabled ( otInstance *  aInstance,
bool  aEnabled 
)

This function starts Thread protocol operation.

The interface must be up when calling this function.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aEnabledTRUE if Thread is enabled, FALSE otherwise.
Return values
kThreadError_NoneSuccessfully started Thread protocol operation.
kThreadError_InvalidStateThe network interface was not not up.

Documentation feedback | Developer Zone | Subscribe | Updated