35 #ifndef OPENTHREAD_THREAD_H_ 36 #define OPENTHREAD_THREAD_H_ 117 void *aCallbackContext);
510 void *aCallbackContext);
522 const uint8_t aTlvTypes[], uint8_t aCount);
534 const uint8_t aTlvTypes[], uint8_t aCount);
555 #endif // OPENTHREAD_THREAD_H_ This structure represents an IPv6 address.
Definition: types.h:417
This type represents all the static / global variables used by OpenThread allocated in one place...
Definition: openthread-instance.h:59
This structure represents the IP level counters.
Definition: types.h:1050
otDeviceRole
Represents a Thread device role.
Definition: types.h:910
This file defines the types and structures used in the OpenThread library API.
OTAPI otError OTCALL otThreadBecomeChild(otInstance *aInstance)
Attempt to reattach as a child.
Definition: thread_api.cpp:250
void(* otReceiveDiagnosticGetCallback)(otMessage *aMessage, const otMessageInfo *aMessageInfo, void *aContext)
This function pointer is called when Network Diagnostic Get response is received. ...
Definition: thread.h:497
OTAPI void OTCALL otThreadSetChildTimeout(otInstance *aInstance, uint32_t aTimeout)
Set the Thread Child Timeout used when operating in the Child role.
Definition: thread_api.cpp:52
OTAPI otError OTCALL otThreadSetMeshLocalPrefix(otInstance *aInstance, const uint8_t *aMeshLocalPrefix)
This function sets the Mesh Local Prefix.
Definition: thread_api.cpp:185
This structure holds diagnostic information for a Thread Router.
Definition: types.h:970
OTAPI otError OTCALL otThreadGetParentInfo(otInstance *aInstance, otRouterInfo *aParentInfo)
The function retrieves diagnostic information for a Thread Router as parent.
Definition: thread_api.cpp:304
OTAPI bool OTCALL otThreadGetAutoStart(otInstance *aInstance)
This function queries if the Thread stack is configured to automatically start on reinitialization...
Definition: thread_api.cpp:445
This structure represents an MLE Link Mode configuration.
Definition: types.h:646
OTAPI void OTCALL otThreadSetKeySequenceCounter(otInstance *aInstance, uint32_t aKeySequenceCounter)
Set the thrKeySequenceCounter.
Definition: thread_api.cpp:230
OTAPI otError OTCALL otThreadSetExtendedPanId(otInstance *aInstance, const uint8_t *aExtendedPanId)
Set the IEEE 802.15.4 Extended PAN ID.
Definition: thread_api.cpp:62
This file defines the top-level OpenThread APIs related to message buffer and queues.
void otThreadSetReceiveDiagnosticGetCallback(otInstance *aInstance, otReceiveDiagnosticGetCallback aCallback, void *aCallbackContext)
This function registers a callback to provide received raw Network Diagnostic Get response payload...
OTAPI otError OTCALL otThreadSetNetworkName(otInstance *aInstance, const char *aNetworkName)
Set the Thread Network Name.
Definition: thread_api.cpp:210
This type points to an OpenThread message buffer.
Definition: types.h:479
OTAPI uint8_t OTCALL otThreadGetLeaderWeight(otInstance *aInstance)
Get the Leader's Weight.
Definition: thread_api.cpp:289
OTAPI otError OTCALL otThreadSendDiagnosticGet(otInstance *aInstance, const otIp6Address *aDestination, const uint8_t aTlvTypes[], uint8_t aCount)
Send a Network Diagnostic Get request.
OTAPI otError OTCALL otThreadSetLinkMode(otInstance *aInstance, otLinkModeConfig aConfig)
Set the MLE Link Mode configuration.
Definition: thread_api.cpp:127
OTAPI uint32_t OTCALL otThreadGetKeySequenceCounter(otInstance *aInstance)
Get the thrKeySequenceCounter.
Definition: thread_api.cpp:225
OTAPI uint16_t OTCALL otThreadGetRloc16(otInstance *aInstance)
Get the RLOC16.
Definition: thread_api.cpp:299
OTAPI otError OTCALL otThreadSetMasterKey(otInstance *aInstance, const otMasterKey *aKey)
Set the thrMasterKey.
Definition: thread_api.cpp:159
This structure holds diagnostic information for a neighboring Thread node.
Definition: types.h:923
OTAPI otError OTCALL otThreadGetLeaderRloc(otInstance *aInstance, otIp6Address *aLeaderRloc)
This function returns a pointer to the Leader's RLOC.
Definition: thread_api.cpp:85
OTAPI bool OTCALL otThreadIsSingleton(otInstance *aInstance)
This function indicates whether a node is the only router on the network.
Definition: thread_api.cpp:476
OTAPI uint32_t OTCALL otThreadGetPartitionId(otInstance *aInstance)
Get the Partition ID.
Definition: thread_api.cpp:294
This structure represents the Thread Leader Data.
Definition: types.h:999
OTAPI const otIpCounters *OTCALL otThreadGetIp6Counters(otInstance *aInstance)
Get the IPv6 counters.
Definition: thread_api.cpp:493
OTAPI otDeviceRole OTCALL otThreadGetDeviceRole(otInstance *aInstance)
Get the device role.
Definition: thread_api.cpp:267
OTAPI otError OTCALL otThreadGetParentAverageRssi(otInstance *aInstance, int8_t *aParentRssi)
The function retrieves the average RSSI for the Thread Parent.
Definition: thread_api.cpp:329
OTAPI uint8_t OTCALL otThreadGetLeaderRouterId(otInstance *aInstance)
Get the Leader's Router ID.
Definition: thread_api.cpp:284
OTAPI otLinkModeConfig OTCALL otThreadGetLinkMode(otInstance *aInstance)
Get the MLE Link Mode configuration.
Definition: thread_api.cpp:97
OTAPI otError OTCALL otThreadSetAutoStart(otInstance *aInstance, bool aStartAutomatically)
This function configures the Thread stack to automatically start on reinitialization.
Definition: thread_api.cpp:464
OTAPI otError OTCALL otThreadGetLeaderData(otInstance *aInstance, otLeaderData *aLeaderData)
This function get the Thread Leader Data.
Definition: thread_api.cpp:272
OTAPI uint32_t OTCALL otThreadGetKeySwitchGuardTime(otInstance *aInstance)
Get the thrKeySwitchGuardTime.
Definition: thread_api.cpp:235
This structure represents the local and peer IPv6 socket addresses.
Definition: types.h:436
OTAPI otError OTCALL otThreadSendDiagnosticReset(otInstance *aInstance, const otIp6Address *aDestination, const uint8_t aTlvTypes[], uint8_t aCount)
Send a Network Diagnostic Reset request.
OTAPI otError OTCALL otThreadSetEnabled(otInstance *aInstance, bool aEnabled)
This function starts Thread protocol operation.
Definition: thread_api.cpp:423
OTAPI const otIp6Address *OTCALL otThreadGetMeshLocalEid(otInstance *aInstance)
This function returns a pointer to the Mesh Local EID.
Definition: thread_api.cpp:175
OTAPI otError OTCALL otThreadGetParentLastRssi(otInstance *aInstance, int8_t *aLastRssi)
The function retrieves the RSSI of the last packet from the Thread Parent.
Definition: thread_api.cpp:345
OTAPI otError OTCALL otThreadBecomeDetached(otInstance *aInstance)
Detach from the Thread network.
Definition: thread_api.cpp:245
int16_t otNeighborInfoIterator
Used to iterate through neighbor table.
Definition: types.h:942
OTAPI const uint8_t *OTCALL otThreadGetMeshLocalPrefix(otInstance *aInstance)
This function returns a pointer to the Mesh Local Prefix.
Definition: thread_api.cpp:180
OTAPI otError OTCALL otThreadGetNextNeighborInfo(otInstance *aInstance, otNeighborInfoIterator *aIterator, otNeighborInfo *aInfo)
This function gets the next neighbor information.
Definition: thread_api.cpp:255
OTAPI const otMasterKey *OTCALL otThreadGetMasterKey(otInstance *aInstance)
Get the thrMasterKey.
Definition: thread_api.cpp:154
This file defines the OpenThread IEEE 802.15.4 Link Layer API.
OTAPI bool OTCALL otThreadIsDiscoverInProgress(otInstance *aInstance)
This function determines if an MLE Thread Discovery is currently in progress.
Definition: thread_api.cpp:488
OTAPI uint32_t OTCALL otThreadGetChildTimeout(otInstance *aInstance)
Get the Thread Child Timeout used when operating in the Child role.
Definition: thread_api.cpp:47
OTAPI const char *OTCALL otThreadGetNetworkName(otInstance *aInstance)
Get the Thread Network Name.
Definition: thread_api.cpp:205
void(OTCALL * otHandleActiveScanResult)(otActiveScanResult *aResult, void *aContext)
This function pointer is called during an IEEE 802.15.4 Active Scan when an IEEE 802.15.4 Beacon is received or the scan completes.
Definition: link.h:63
otError
This enumeration represents error codes used throughout OpenThread.
Definition: types.h:107
OTAPI const uint8_t *OTCALL otThreadGetExtendedPanId(otInstance *aInstance)
Get the IEEE 802.15.4 Extended PAN ID.
Definition: thread_api.cpp:57
OTAPI void OTCALL otThreadSetKeySwitchGuardTime(otInstance *aInstance, uint32_t aKeySwitchGuardTime)
Set the thrKeySwitchGuardTime.
Definition: thread_api.cpp:240
This structure represents a Thread Master Key.
Definition: types.h:297
OTAPI otError OTCALL otThreadDiscover(otInstance *aInstance, uint32_t aScanChannels, uint16_t aPanId, bool aJoiner, bool aEnableEui64Filtering, otHandleActiveScanResult aCallback, void *aCallbackContext)
This function starts a Thread Discovery scan.
Definition: thread_api.cpp:481
const otIp6Address * otThreadGetLinkLocalIp6Address(otInstance *aInstance)
This function returns the Thread link-local IPv6 address.
Definition: thread_api.cpp:200