mirror of
https://github.com/espressif/openthread.git
synced 2026-08-14 06:37:46 +00:00
Add otGetFactoryAssignedIeeeEui64() to API. (#592)
- Change cli.cpp to use OpenThread API rather than platform API.
This commit is contained in:
@@ -502,6 +502,15 @@ const uint8_t *otGetExtendedPanId(otInstance *aInstance);
|
||||
*/
|
||||
void otSetExtendedPanId(otInstance *aInstance, const uint8_t *aExtendedPanId);
|
||||
|
||||
/**
|
||||
* Get the factory-assigned IEEE EUI-64.
|
||||
*
|
||||
* @param[in] aInstance A pointer to the OpenThread instance.
|
||||
* @param[out] aEui64 A pointer to where the factory-assigned IEEE EUI-64 is placed.
|
||||
*
|
||||
*/
|
||||
void otGetFactoryAssignedIeeeEui64(otInstance *aInstance, otExtAddress *aEui64);
|
||||
|
||||
/**
|
||||
* This function returns a pointer to the Leader's RLOC.
|
||||
*
|
||||
|
||||
+1
-2
@@ -52,7 +52,6 @@
|
||||
#include <common/encoding.hpp>
|
||||
#include <common/new.hpp>
|
||||
#include <net/ip6.hpp>
|
||||
#include <platform/radio.h>
|
||||
#include <platform/random.h>
|
||||
#include <platform/uart.h>
|
||||
|
||||
@@ -556,7 +555,7 @@ void Interpreter::ProcessEui64(int argc, char *argv[])
|
||||
|
||||
VerifyOrExit(argc == 0, error = kThreadError_Parse);
|
||||
|
||||
otPlatRadioGetIeeeEui64(mInstance, extAddress.m8);
|
||||
otGetFactoryAssignedIeeeEui64(mInstance, &extAddress);
|
||||
OutputBytes(extAddress.m8, OT_EXT_ADDRESS_SIZE);
|
||||
sServer->OutputFormat("\r\n");
|
||||
|
||||
|
||||
@@ -175,6 +175,11 @@ void otSetExtendedPanId(otInstance *, const uint8_t *aExtendedPanId)
|
||||
sThreadNetif->GetMle().SetMeshLocalPrefix(mlPrefix);
|
||||
}
|
||||
|
||||
void otGetFactoryAssignedIeeeEui64(otInstance *aInstance, otExtAddress *aEui64)
|
||||
{
|
||||
otPlatRadioGetIeeeEui64(aInstance, aEui64->m8);
|
||||
}
|
||||
|
||||
ThreadError otGetLeaderRloc(otInstance *, otIp6Address *aAddress)
|
||||
{
|
||||
ThreadError error;
|
||||
|
||||
Reference in New Issue
Block a user