Add otGetFactoryAssignedIeeeEui64() to API. (#592)

- Change cli.cpp to use OpenThread API rather than platform API.
This commit is contained in:
Jonathan Hui
2016-09-14 12:01:09 -07:00
committed by GitHub
parent 654f953fda
commit 9393f468bd
3 changed files with 15 additions and 2 deletions
+9
View File
@@ -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
View File
@@ -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");
+5
View File
@@ -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;