mirror of
https://github.com/espressif/openthread.git
synced 2026-09-04 00:00:06 +00:00
Operational Dataset API cleanup.
This commit is contained in:
@@ -56,6 +56,7 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\core\api\commissioner_api.cpp" />
|
||||
<ClCompile Include="..\..\src\core\api\dataset_api.cpp" />
|
||||
<ClCompile Include="..\..\src\core\api\dhcp6_api.cpp" />
|
||||
<ClCompile Include="..\..\src\core\api\ip6_api.cpp" />
|
||||
<ClCompile Include="..\..\src\core\api\joiner_api.cpp" />
|
||||
|
||||
@@ -63,6 +63,9 @@
|
||||
<ClCompile Include="..\..\src\core\api\commissioner_api.cpp">
|
||||
<Filter>Source Files\api</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\core\api\dataset_api.cpp">
|
||||
<Filter>Source Files\api</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\core\api\dhcp6_api.cpp">
|
||||
<Filter>Source Files\api</Filter>
|
||||
</ClCompile>
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\core\api\commissioner_api.cpp" />
|
||||
<ClCompile Include="..\..\src\core\api\dataset_api.cpp" />
|
||||
<ClCompile Include="..\..\src\core\api\dhcp6_api.cpp" />
|
||||
<ClCompile Include="..\..\src\core\api\ip6_api.cpp" />
|
||||
<ClCompile Include="..\..\src\core\api\joiner_api.cpp" />
|
||||
|
||||
@@ -63,6 +63,9 @@
|
||||
<ClCompile Include="..\..\src\core\api\commissioner_api.cpp">
|
||||
<Filter>Source Files\api</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\core\api\dataset_api.cpp">
|
||||
<Filter>Source Files\api</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\core\api\dhcp6_api.cpp">
|
||||
<Filter>Source Files\api</Filter>
|
||||
</ClCompile>
|
||||
|
||||
@@ -1412,7 +1412,7 @@ otLinkSetChannel(
|
||||
OTAPI
|
||||
ThreadError
|
||||
OTCALL
|
||||
otSetDelayTimerMinimal(
|
||||
otDatasetSetDelayTimerMinimal(
|
||||
_In_ otInstance *aInstance,
|
||||
uint32_t aDelayTimerMinimal
|
||||
)
|
||||
@@ -1426,7 +1426,7 @@ otSetDelayTimerMinimal(
|
||||
OTAPI
|
||||
uint32_t
|
||||
OTCALL
|
||||
otGetDelayTimerMinimal(
|
||||
otDatasetGetDelayTimerMinimal(
|
||||
_In_ otInstance *aInstance
|
||||
)
|
||||
{
|
||||
@@ -2180,7 +2180,7 @@ otRemoveStateChangeCallback(
|
||||
OTAPI
|
||||
ThreadError
|
||||
OTCALL
|
||||
otGetActiveDataset(
|
||||
otDatasetGetActive(
|
||||
_In_ otInstance *aInstance,
|
||||
_Out_ otOperationalDataset *aDataset
|
||||
)
|
||||
@@ -2192,7 +2192,7 @@ otGetActiveDataset(
|
||||
OTAPI
|
||||
ThreadError
|
||||
OTCALL
|
||||
otSetActiveDataset(
|
||||
otDatasetSetActive(
|
||||
_In_ otInstance *aInstance,
|
||||
const otOperationalDataset *aDataset
|
||||
)
|
||||
@@ -2204,7 +2204,7 @@ otSetActiveDataset(
|
||||
OTAPI
|
||||
ThreadError
|
||||
OTCALL
|
||||
otGetPendingDataset(
|
||||
otDatasetGetPending(
|
||||
_In_ otInstance *aInstance,
|
||||
_Out_ otOperationalDataset *aDataset
|
||||
)
|
||||
@@ -2216,7 +2216,7 @@ otGetPendingDataset(
|
||||
OTAPI
|
||||
ThreadError
|
||||
OTCALL
|
||||
otSetPendingDataset(
|
||||
otDatasetSetPending(
|
||||
_In_ otInstance *aInstance,
|
||||
const otOperationalDataset *aDataset
|
||||
)
|
||||
@@ -2228,7 +2228,7 @@ otSetPendingDataset(
|
||||
OTAPI
|
||||
ThreadError
|
||||
OTCALL
|
||||
otSendActiveGet(
|
||||
otDatasetSendMgmtActiveGet(
|
||||
_In_ otInstance *aInstance,
|
||||
const uint8_t *aTlvTypes,
|
||||
uint8_t aLength,
|
||||
@@ -2260,7 +2260,7 @@ otSendActiveGet(
|
||||
OTAPI
|
||||
ThreadError
|
||||
OTCALL
|
||||
otSendActiveSet(
|
||||
otDatasetSendMgmtActiveSet(
|
||||
_In_ otInstance *aInstance,
|
||||
const otOperationalDataset *aDataset,
|
||||
const uint8_t *aTlvs,
|
||||
@@ -2290,7 +2290,7 @@ otSendActiveSet(
|
||||
OTAPI
|
||||
ThreadError
|
||||
OTCALL
|
||||
otSendPendingGet(
|
||||
otDatasetSendMgmtPendingGet(
|
||||
_In_ otInstance *aInstance,
|
||||
const uint8_t *aTlvTypes,
|
||||
uint8_t aLength,
|
||||
@@ -2322,7 +2322,7 @@ otSendPendingGet(
|
||||
OTAPI
|
||||
ThreadError
|
||||
OTCALL
|
||||
otSendPendingSet(
|
||||
otDatasetSendMgmtPendingSet(
|
||||
_In_ otInstance *aInstance,
|
||||
const otOperationalDataset *aDataset,
|
||||
const uint8_t *aTlvs,
|
||||
|
||||
@@ -2327,12 +2327,12 @@ otLwfIoCtl_otActiveDataset(
|
||||
|
||||
if (InBufferLength >= sizeof(otOperationalDataset))
|
||||
{
|
||||
status = ThreadErrorToNtstatus(otSetActiveDataset(pFilter->otCtx, (otOperationalDataset*)InBuffer));
|
||||
status = ThreadErrorToNtstatus(otDatasetSetActive(pFilter->otCtx, (otOperationalDataset*)InBuffer));
|
||||
*OutBufferLength = 0;
|
||||
}
|
||||
else if (*OutBufferLength >= sizeof(otOperationalDataset))
|
||||
{
|
||||
status = ThreadErrorToNtstatus(otGetActiveDataset(pFilter->otCtx, (otOperationalDataset*)OutBuffer));
|
||||
status = ThreadErrorToNtstatus(otDatasetGetActive(pFilter->otCtx, (otOperationalDataset*)OutBuffer));
|
||||
*OutBufferLength = sizeof(otOperationalDataset);
|
||||
}
|
||||
else
|
||||
@@ -2359,12 +2359,12 @@ otLwfIoCtl_otPendingDataset(
|
||||
|
||||
if (InBufferLength >= sizeof(otOperationalDataset))
|
||||
{
|
||||
status = ThreadErrorToNtstatus(otSetPendingDataset(pFilter->otCtx, (otOperationalDataset*)InBuffer));
|
||||
status = ThreadErrorToNtstatus(otDatasetSetPending(pFilter->otCtx, (otOperationalDataset*)InBuffer));
|
||||
*OutBufferLength = 0;
|
||||
}
|
||||
else if (*OutBufferLength >= sizeof(otOperationalDataset))
|
||||
{
|
||||
status = ThreadErrorToNtstatus(otGetPendingDataset(pFilter->otCtx, (otOperationalDataset*)OutBuffer));
|
||||
status = ThreadErrorToNtstatus(otDatasetGetPending(pFilter->otCtx, (otOperationalDataset*)OutBuffer));
|
||||
*OutBufferLength = sizeof(otOperationalDataset);
|
||||
}
|
||||
else
|
||||
@@ -5753,7 +5753,7 @@ otLwfIoCtl_otSendActiveGet(
|
||||
aAddress = (otIp6Address*)(InBuffer + sizeof(uint8_t) + aLength);
|
||||
|
||||
status = ThreadErrorToNtstatus(
|
||||
otSendActiveGet(
|
||||
otDatasetSendMgmtActiveGet(
|
||||
pFilter->otCtx,
|
||||
aTlvTypes,
|
||||
aLength,
|
||||
@@ -5791,7 +5791,7 @@ otLwfIoCtl_otSendActiveSet(
|
||||
if (InBufferLength >= sizeof(otOperationalDataset) + sizeof(uint8_t) + aLength)
|
||||
{
|
||||
status = ThreadErrorToNtstatus(
|
||||
otSendActiveSet(
|
||||
otDatasetSendMgmtActiveSet(
|
||||
pFilter->otCtx,
|
||||
aDataset,
|
||||
aTlvTypes,
|
||||
@@ -5832,7 +5832,7 @@ otLwfIoCtl_otSendPendingGet(
|
||||
aAddress = (otIp6Address*)(InBuffer + sizeof(uint8_t) + aLength);
|
||||
|
||||
status = ThreadErrorToNtstatus(
|
||||
otSendPendingGet(
|
||||
otDatasetSendMgmtPendingGet(
|
||||
pFilter->otCtx,
|
||||
aTlvTypes,
|
||||
aLength,
|
||||
@@ -5870,7 +5870,7 @@ otLwfIoCtl_otSendPendingSet(
|
||||
if (InBufferLength >= sizeof(otOperationalDataset) + sizeof(uint8_t) + aLength)
|
||||
{
|
||||
status = ThreadErrorToNtstatus(
|
||||
otSendPendingSet(
|
||||
otDatasetSendMgmtPendingSet(
|
||||
pFilter->otCtx,
|
||||
aDataset,
|
||||
aTlvTypes,
|
||||
|
||||
@@ -1949,7 +1949,7 @@ OTNODEAPI int32_t OTCALL otNodeSetActiveDataset(otNode* aNode, uint64_t aTimesta
|
||||
aDataset.mIsMasterKeySet = true;
|
||||
}
|
||||
|
||||
auto result = otSetActiveDataset(aNode->mInstance, &aDataset);
|
||||
auto result = otDatasetSetActive(aNode->mInstance, &aDataset);
|
||||
otLogFuncExit();
|
||||
return result;
|
||||
}
|
||||
@@ -1985,7 +1985,7 @@ OTNODEAPI int32_t OTCALL otNodeSetPendingDataset(otNode* aNode, uint64_t aActive
|
||||
aDataset.mIsChannelSet = true;
|
||||
}
|
||||
|
||||
auto result = otSetPendingDataset(aNode->mInstance, &aDataset);
|
||||
auto result = otDatasetSetPending(aNode->mInstance, &aDataset);
|
||||
otLogFuncExit();
|
||||
return result;
|
||||
}
|
||||
@@ -2053,7 +2053,7 @@ OTNODEAPI int32_t OTCALL otNodeSendPendingSet(otNode* aNode, uint64_t aActiveTim
|
||||
aDataset.mIsNetworkNameSet = true;
|
||||
}
|
||||
|
||||
auto result = otSendPendingSet(aNode->mInstance, &aDataset, nullptr, 0);
|
||||
auto result = otDatasetSendMgmtPendingSet(aNode->mInstance, &aDataset, nullptr, 0);
|
||||
otLogFuncExit();
|
||||
return result;
|
||||
}
|
||||
@@ -2138,7 +2138,7 @@ OTNODEAPI int32_t OTCALL otNodeSendActiveSet(otNode* aNode, uint64_t aActiveTime
|
||||
tlvsLength = (uint8_t)length;
|
||||
}
|
||||
|
||||
auto result = otSendActiveSet(aNode->mInstance, &aDataset, tlvsLength == 0 ? nullptr : tlvs, tlvsLength);
|
||||
auto result = otDatasetSendMgmtActiveSet(aNode->mInstance, &aDataset, tlvsLength == 0 ? nullptr : tlvs, tlvsLength);
|
||||
otLogFuncExit();
|
||||
return result;
|
||||
}
|
||||
|
||||
+1
-142
@@ -38,6 +38,7 @@
|
||||
#include <openthread-types.h>
|
||||
|
||||
#include "openthread/crypto.h"
|
||||
#include "openthread/dataset.h"
|
||||
#include "openthread/ip6.h"
|
||||
#include "openthread/link.h"
|
||||
#include "openthread/message.h"
|
||||
@@ -368,28 +369,6 @@ OTAPI bool OTCALL otIsDiscoverInProgress(otInstance *aInstance);
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Set minimal delay timer.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aDelayTimerMinimal The value of minimal delay timer (in ms).
|
||||
*
|
||||
* @retval kThreadError_None Successfully set minimal delay timer.
|
||||
* @retval kThreadError_InvalidArgs If @p aDelayTimerMinimal is not valid.
|
||||
*
|
||||
*/
|
||||
OTAPI ThreadError OTCALL otSetDelayTimerMinimal(otInstance *aInstance, uint32_t aDelayTimerMinimal);
|
||||
|
||||
/**
|
||||
* Get minimal delay timer.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
*
|
||||
* @retval the value of minimal delay timer (in ms).
|
||||
*
|
||||
*/
|
||||
OTAPI uint32_t OTCALL otGetDelayTimerMinimal(otInstance *aInstance);
|
||||
|
||||
/**
|
||||
* Get the maximum number of children currently allowed.
|
||||
*
|
||||
@@ -621,126 +600,6 @@ OTAPI ThreadError OTCALL otSetStateChangedCallback(otInstance *aInstance, otStat
|
||||
OTAPI void OTCALL otRemoveStateChangeCallback(otInstance *aInstance, otStateChangedCallback aCallback,
|
||||
void *aCallbackContext);
|
||||
|
||||
/**
|
||||
* This function gets the Active Operational Dataset.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[out] aDataset A pointer to where the Active Operational Dataset will be placed.
|
||||
*
|
||||
* @retval kThreadError_None Successfully retrieved the Active Operational Dataset.
|
||||
* @retval kThreadError_InvalidArgs @p aDataset was NULL.
|
||||
*
|
||||
*/
|
||||
OTAPI ThreadError OTCALL otGetActiveDataset(otInstance *aInstance, otOperationalDataset *aDataset);
|
||||
|
||||
/**
|
||||
* This function sets the Active Operational Dataset.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aDataset A pointer to the Active Operational Dataset.
|
||||
*
|
||||
* @retval kThreadError_None Successfully set the Active Operational Dataset.
|
||||
* @retval kThreadError_NoBufs Insufficient buffer space to set the Active Operational Datset.
|
||||
* @retval kThreadError_InvalidArgs @p aDataset was NULL.
|
||||
*
|
||||
*/
|
||||
OTAPI ThreadError OTCALL otSetActiveDataset(otInstance *aInstance, const otOperationalDataset *aDataset);
|
||||
|
||||
/**
|
||||
* This function indicates whether a valid network is present in the Active Operational Dataset or not.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
*
|
||||
* @returns TRUE if a valid network is present in the Active Operational Dataset, FALSE otherwise.
|
||||
*
|
||||
*/
|
||||
OTAPI bool OTCALL otIsNodeCommissioned(otInstance *aInstance);
|
||||
|
||||
/**
|
||||
* This function gets the Pending Operational Dataset.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[out] aDataset A pointer to where the Pending Operational Dataset will be placed.
|
||||
*
|
||||
* @retval kThreadError_None Successfully retrieved the Pending Operational Dataset.
|
||||
* @retval kThreadError_InvalidArgs @p aDataset was NULL.
|
||||
*
|
||||
*/
|
||||
OTAPI ThreadError OTCALL otGetPendingDataset(otInstance *aInstance, otOperationalDataset *aDataset);
|
||||
|
||||
/**
|
||||
* This function sets the Pending Operational Dataset.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aDataset A pointer to the Pending Operational Dataset.
|
||||
*
|
||||
* @retval kThreadError_None Successfully set the Pending Operational Dataset.
|
||||
* @retval kThreadError_NoBufs Insufficient buffer space to set the Pending Operational Dataset.
|
||||
* @retval kThreadError_InvalidArgs @p aDataset was NULL.
|
||||
*
|
||||
*/
|
||||
OTAPI ThreadError OTCALL otSetPendingDataset(otInstance *aInstance, const otOperationalDataset *aDataset);
|
||||
|
||||
/**
|
||||
* This function sends MGMT_ACTIVE_GET.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aTlvTypes A pointer to the TLV Types.
|
||||
* @param[in] aLength The length of TLV Types.
|
||||
* @param[in] aAddress A pointer to the IPv6 destination, if it is NULL, will use Leader ALOC as default.
|
||||
*
|
||||
* @retval kThreadError_None Successfully send the meshcop dataset command.
|
||||
* @retval kThreadError_NoBufs Insufficient buffer space to send.
|
||||
*
|
||||
*/
|
||||
OTAPI ThreadError OTCALL otSendActiveGet(otInstance *aInstance, const uint8_t *aTlvTypes, uint8_t aLength,
|
||||
const otIp6Address *aAddress);
|
||||
|
||||
/**
|
||||
* This function sends MGMT_ACTIVE_SET.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aDataset A pointer to operational dataset.
|
||||
* @param[in] aTlvs A pointer to TLVs.
|
||||
* @param[in] aLength The length of TLVs.
|
||||
*
|
||||
* @retval kThreadError_None Successfully send the meshcop dataset command.
|
||||
* @retval kThreadError_NoBufs Insufficient buffer space to send.
|
||||
*
|
||||
*/
|
||||
OTAPI ThreadError OTCALL otSendActiveSet(otInstance *aInstance, const otOperationalDataset *aDataset,
|
||||
const uint8_t *aTlvs, uint8_t aLength);
|
||||
|
||||
/**
|
||||
* This function sends MGMT_PENDING_GET.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aTlvTypes A pointer to the TLV Types.
|
||||
* @param[in] aLength The length of TLV Types.
|
||||
* @param[in] aAddress A pointer to the IPv6 destination, if it is NULL, will use Leader ALOC as default.
|
||||
*
|
||||
* @retval kThreadError_None Successfully send the meshcop dataset command.
|
||||
* @retval kThreadError_NoBufs Insufficient buffer space to send.
|
||||
*
|
||||
*/
|
||||
OTAPI ThreadError OTCALL otSendPendingGet(otInstance *aInstance, const uint8_t *aTlvTypes, uint8_t aLength,
|
||||
const otIp6Address *aAddress);
|
||||
|
||||
/**
|
||||
* This function sends MGMT_PENDING_SET.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aDataset A pointer to operational dataset.
|
||||
* @param[in] aTlvs A pointer to TLVs.
|
||||
* @param[in] aLength The length of TLVs.
|
||||
*
|
||||
* @retval kThreadError_None Successfully send the meshcop dataset command.
|
||||
* @retval kThreadError_NoBufs Insufficient buffer space to send.
|
||||
*
|
||||
*/
|
||||
OTAPI ThreadError OTCALL otSendPendingSet(otInstance *aInstance, const otOperationalDataset *aDataset,
|
||||
const uint8_t *aTlvs, uint8_t aLength);
|
||||
|
||||
/**
|
||||
* Set the preferred Router Id.
|
||||
*
|
||||
|
||||
@@ -32,6 +32,7 @@ openthread_headers = \
|
||||
coap.h \
|
||||
commissioner.h \
|
||||
crypto.h \
|
||||
dataset.h \
|
||||
dhcp6_client.h \
|
||||
dhcp6_server.h \
|
||||
ip6.h \
|
||||
|
||||
@@ -0,0 +1,205 @@
|
||||
/*
|
||||
* Copyright (c) 2016, The OpenThread Authors.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the copyright holder nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief
|
||||
* This file defines the OpenThread Operational Dataset API.
|
||||
*/
|
||||
|
||||
#ifndef OPENTHREAD_DATASET_H_
|
||||
#define OPENTHREAD_DATASET_H_
|
||||
|
||||
#include "openthread-types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @addtogroup dataset Operational Dataset
|
||||
*
|
||||
* @brief
|
||||
* This module includes functions for Operational Dataset configuration.
|
||||
*
|
||||
* @{
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* This function indicates whether a valid network is present in the Active Operational Dataset or not.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
*
|
||||
* @returns TRUE if a valid network is present in the Active Operational Dataset, FALSE otherwise.
|
||||
*
|
||||
*/
|
||||
OTAPI bool OTCALL otDatasetIsCommissioned(otInstance *aInstance);
|
||||
|
||||
/**
|
||||
* This function gets the Active Operational Dataset.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[out] aDataset A pointer to where the Active Operational Dataset will be placed.
|
||||
*
|
||||
* @retval kThreadError_None Successfully retrieved the Active Operational Dataset.
|
||||
* @retval kThreadError_InvalidArgs @p aDataset was NULL.
|
||||
*
|
||||
*/
|
||||
OTAPI ThreadError OTCALL otDatasetGetActive(otInstance *aInstance, otOperationalDataset *aDataset);
|
||||
|
||||
/**
|
||||
* This function sets the Active Operational Dataset.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aDataset A pointer to the Active Operational Dataset.
|
||||
*
|
||||
* @retval kThreadError_None Successfully set the Active Operational Dataset.
|
||||
* @retval kThreadError_NoBufs Insufficient buffer space to set the Active Operational Datset.
|
||||
* @retval kThreadError_InvalidArgs @p aDataset was NULL.
|
||||
*
|
||||
*/
|
||||
OTAPI ThreadError OTCALL otDatasetSetActive(otInstance *aInstance, const otOperationalDataset *aDataset);
|
||||
|
||||
/**
|
||||
* This function gets the Pending Operational Dataset.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[out] aDataset A pointer to where the Pending Operational Dataset will be placed.
|
||||
*
|
||||
* @retval kThreadError_None Successfully retrieved the Pending Operational Dataset.
|
||||
* @retval kThreadError_InvalidArgs @p aDataset was NULL.
|
||||
*
|
||||
*/
|
||||
OTAPI ThreadError OTCALL otDatasetGetPending(otInstance *aInstance, otOperationalDataset *aDataset);
|
||||
|
||||
/**
|
||||
* This function sets the Pending Operational Dataset.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aDataset A pointer to the Pending Operational Dataset.
|
||||
*
|
||||
* @retval kThreadError_None Successfully set the Pending Operational Dataset.
|
||||
* @retval kThreadError_NoBufs Insufficient buffer space to set the Pending Operational Dataset.
|
||||
* @retval kThreadError_InvalidArgs @p aDataset was NULL.
|
||||
*
|
||||
*/
|
||||
OTAPI ThreadError OTCALL otDatasetSetPending(otInstance *aInstance, const otOperationalDataset *aDataset);
|
||||
|
||||
/**
|
||||
* This function sends MGMT_ACTIVE_GET.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aTlvTypes A pointer to the TLV Types.
|
||||
* @param[in] aLength The length of TLV Types.
|
||||
* @param[in] aAddress A pointer to the IPv6 destination, if it is NULL, will use Leader ALOC as default.
|
||||
*
|
||||
* @retval kThreadError_None Successfully send the meshcop dataset command.
|
||||
* @retval kThreadError_NoBufs Insufficient buffer space to send.
|
||||
*
|
||||
*/
|
||||
OTAPI ThreadError OTCALL otDatasetSendMgmtActiveGet(otInstance *aInstance, const uint8_t *aTlvTypes, uint8_t aLength,
|
||||
const otIp6Address *aAddress);
|
||||
|
||||
/**
|
||||
* This function sends MGMT_ACTIVE_SET.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aDataset A pointer to operational dataset.
|
||||
* @param[in] aTlvs A pointer to TLVs.
|
||||
* @param[in] aLength The length of TLVs.
|
||||
*
|
||||
* @retval kThreadError_None Successfully send the meshcop dataset command.
|
||||
* @retval kThreadError_NoBufs Insufficient buffer space to send.
|
||||
*
|
||||
*/
|
||||
OTAPI ThreadError OTCALL otDatasetSendMgmtActiveSet(otInstance *aInstance, const otOperationalDataset *aDataset,
|
||||
const uint8_t *aTlvs, uint8_t aLength);
|
||||
|
||||
/**
|
||||
* This function sends MGMT_PENDING_GET.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aTlvTypes A pointer to the TLV Types.
|
||||
* @param[in] aLength The length of TLV Types.
|
||||
* @param[in] aAddress A pointer to the IPv6 destination, if it is NULL, will use Leader ALOC as default.
|
||||
*
|
||||
* @retval kThreadError_None Successfully send the meshcop dataset command.
|
||||
* @retval kThreadError_NoBufs Insufficient buffer space to send.
|
||||
*
|
||||
*/
|
||||
OTAPI ThreadError OTCALL otDatasetSendMgmtPendingGet(otInstance *aInstance, const uint8_t *aTlvTypes, uint8_t aLength,
|
||||
const otIp6Address *aAddress);
|
||||
|
||||
/**
|
||||
* This function sends MGMT_PENDING_SET.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aDataset A pointer to operational dataset.
|
||||
* @param[in] aTlvs A pointer to TLVs.
|
||||
* @param[in] aLength The length of TLVs.
|
||||
*
|
||||
* @retval kThreadError_None Successfully send the meshcop dataset command.
|
||||
* @retval kThreadError_NoBufs Insufficient buffer space to send.
|
||||
*
|
||||
*/
|
||||
OTAPI ThreadError OTCALL otDatasetSendMgmtPendingSet(otInstance *aInstance, const otOperationalDataset *aDataset,
|
||||
const uint8_t *aTlvs, uint8_t aLength);
|
||||
|
||||
/**
|
||||
* Get minimal delay timer.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
*
|
||||
* @retval the value of minimal delay timer (in ms).
|
||||
*
|
||||
*/
|
||||
OTAPI uint32_t OTCALL otDatasetGetDelayTimerMinimal(otInstance *aInstance);
|
||||
|
||||
/**
|
||||
* Set minimal delay timer.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aDelayTimerMinimal The value of minimal delay timer (in ms).
|
||||
*
|
||||
* @retval kThreadError_None Successfully set minimal delay timer.
|
||||
* @retval kThreadError_InvalidArgs If @p aDelayTimerMinimal is not valid.
|
||||
*
|
||||
*/
|
||||
OTAPI ThreadError OTCALL otDatasetSetDelayTimerMinimal(otInstance *aInstance, uint32_t aDelayTimerMinimal);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // OPENTHREAD_DATASET_H_
|
||||
+2
-2
@@ -668,13 +668,13 @@ void Interpreter::ProcessDelayTimerMin(int argc, char *argv[])
|
||||
|
||||
if (argc == 0)
|
||||
{
|
||||
sServer->OutputFormat("%d\r\n", (otGetDelayTimerMinimal(mInstance) / 1000));
|
||||
sServer->OutputFormat("%d\r\n", (otDatasetGetDelayTimerMinimal(mInstance) / 1000));
|
||||
}
|
||||
else if (argc == 1)
|
||||
{
|
||||
unsigned long value;
|
||||
SuccessOrExit(error = ParseUnsignedLong(argv[0], value));
|
||||
SuccessOrExit(error = otSetDelayTimerMinimal(mInstance, static_cast<uint32_t>(value * 1000)));
|
||||
SuccessOrExit(error = otDatasetSetDelayTimerMinimal(mInstance, static_cast<uint32_t>(value * 1000)));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+10
-10
@@ -227,7 +227,7 @@ ThreadError Dataset::ProcessHelp(otInstance *aInstance, int argc, char *argv[])
|
||||
ThreadError Dataset::ProcessActive(otInstance *aInstance, int argc, char *argv[])
|
||||
{
|
||||
otOperationalDataset dataset;
|
||||
otGetActiveDataset(aInstance, &dataset);
|
||||
otDatasetGetActive(aInstance, &dataset);
|
||||
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
@@ -298,11 +298,11 @@ ThreadError Dataset::ProcessCommit(otInstance *aInstance, int argc, char *argv[]
|
||||
|
||||
if (strcmp(argv[0], "active") == 0)
|
||||
{
|
||||
SuccessOrExit(error = otSetActiveDataset(aInstance, &sDataset));
|
||||
SuccessOrExit(error = otDatasetSetActive(aInstance, &sDataset));
|
||||
}
|
||||
else if (strcmp(argv[0], "pending") == 0)
|
||||
{
|
||||
SuccessOrExit(error = otSetPendingDataset(aInstance, &sDataset));
|
||||
SuccessOrExit(error = otDatasetSetPending(aInstance, &sDataset));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -421,7 +421,7 @@ exit:
|
||||
ThreadError Dataset::ProcessPending(otInstance *aInstance, int argc, char *argv[])
|
||||
{
|
||||
otOperationalDataset dataset;
|
||||
otGetPendingDataset(aInstance, &dataset);
|
||||
otDatasetGetPending(aInstance, &dataset);
|
||||
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
@@ -549,11 +549,11 @@ ThreadError Dataset::ProcessMgmtSetCommand(otInstance *aInstance, int argc, char
|
||||
|
||||
if (strcmp(argv[0], "active") == 0)
|
||||
{
|
||||
SuccessOrExit(error = otSendActiveSet(aInstance, &dataset, tlvs, static_cast<uint8_t>(length)));
|
||||
SuccessOrExit(error = otDatasetSendMgmtActiveSet(aInstance, &dataset, tlvs, static_cast<uint8_t>(length)));
|
||||
}
|
||||
else if (strcmp(argv[0], "pending") == 0)
|
||||
{
|
||||
SuccessOrExit(error = otSendPendingSet(aInstance, &dataset, tlvs, static_cast<uint8_t>(length)));
|
||||
SuccessOrExit(error = otDatasetSendMgmtPendingSet(aInstance, &dataset, tlvs, static_cast<uint8_t>(length)));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -643,13 +643,13 @@ ThreadError Dataset::ProcessMgmtGetCommand(otInstance *aInstance, int argc, char
|
||||
|
||||
if (strcmp(argv[0], "active") == 0)
|
||||
{
|
||||
SuccessOrExit(error = otSendActiveGet(aInstance, tlvs, static_cast<uint8_t>(length),
|
||||
destAddrSpecified ? &address : NULL));
|
||||
SuccessOrExit(error = otDatasetSendMgmtActiveGet(aInstance, tlvs, static_cast<uint8_t>(length),
|
||||
destAddrSpecified ? &address : NULL));
|
||||
}
|
||||
else if (strcmp(argv[0], "pending") == 0)
|
||||
{
|
||||
SuccessOrExit(error = otSendPendingGet(aInstance, tlvs, static_cast<uint8_t>(length),
|
||||
destAddrSpecified ? &address : NULL));
|
||||
SuccessOrExit(error = otDatasetSendMgmtPendingGet(aInstance, tlvs, static_cast<uint8_t>(length),
|
||||
destAddrSpecified ? &address : NULL));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -41,6 +41,7 @@ CPPFLAGS_COMMON = \
|
||||
SOURCES_COMMON = \
|
||||
openthread.cpp \
|
||||
api/crypto_api.cpp \
|
||||
api/dataset_api.cpp \
|
||||
api/ip6_api.cpp \
|
||||
api/link_api.cpp \
|
||||
api/message_api.cpp \
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
/*
|
||||
* Copyright (c) 2016, The OpenThread Authors.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the copyright holder nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* This file implements the OpenThread Operational Dataset API.
|
||||
*/
|
||||
|
||||
#include "openthread/dataset.h"
|
||||
|
||||
#include "openthread-instance.h"
|
||||
|
||||
using namespace Thread;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
bool otDatasetIsCommissioned(otInstance *aInstance)
|
||||
{
|
||||
otOperationalDataset dataset;
|
||||
|
||||
otDatasetGetActive(aInstance, &dataset);
|
||||
|
||||
if ((dataset.mIsMasterKeySet) && (dataset.mIsNetworkNameSet) &&
|
||||
(dataset.mIsExtendedPanIdSet) && (dataset.mIsPanIdSet) && (dataset.mIsChannelSet))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
ThreadError otDatasetGetActive(otInstance *aInstance, otOperationalDataset *aDataset)
|
||||
{
|
||||
ThreadError error = kThreadError_None;
|
||||
|
||||
VerifyOrExit(aDataset != NULL, error = kThreadError_InvalidArgs);
|
||||
|
||||
aInstance->mThreadNetif.GetActiveDataset().GetLocal().Get(*aDataset);
|
||||
|
||||
exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
ThreadError otDatasetSetActive(otInstance *aInstance, const otOperationalDataset *aDataset)
|
||||
{
|
||||
ThreadError error;
|
||||
|
||||
VerifyOrExit(aDataset != NULL, error = kThreadError_InvalidArgs);
|
||||
|
||||
error = aInstance->mThreadNetif.GetActiveDataset().Set(*aDataset);
|
||||
|
||||
exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
ThreadError otDatasetGetPending(otInstance *aInstance, otOperationalDataset *aDataset)
|
||||
{
|
||||
ThreadError error = kThreadError_None;
|
||||
|
||||
VerifyOrExit(aDataset != NULL, error = kThreadError_InvalidArgs);
|
||||
|
||||
aInstance->mThreadNetif.GetPendingDataset().GetLocal().Get(*aDataset);
|
||||
|
||||
exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
ThreadError otDatasetSetPending(otInstance *aInstance, const otOperationalDataset *aDataset)
|
||||
{
|
||||
ThreadError error;
|
||||
|
||||
VerifyOrExit(aDataset != NULL, error = kThreadError_InvalidArgs);
|
||||
|
||||
error = aInstance->mThreadNetif.GetPendingDataset().Set(*aDataset);
|
||||
|
||||
exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
ThreadError otDatasetSendMgmtActiveGet(otInstance *aInstance, const uint8_t *aTlvTypes, uint8_t aLength,
|
||||
const otIp6Address *aAddress)
|
||||
{
|
||||
return aInstance->mThreadNetif.GetActiveDataset().SendGetRequest(aTlvTypes, aLength, aAddress);
|
||||
}
|
||||
|
||||
ThreadError otDatasetSendMgmtActiveSet(otInstance *aInstance, const otOperationalDataset *aDataset,
|
||||
const uint8_t *aTlvs, uint8_t aLength)
|
||||
{
|
||||
return aInstance->mThreadNetif.GetActiveDataset().SendSetRequest(*aDataset, aTlvs, aLength);
|
||||
}
|
||||
|
||||
ThreadError otDatasetSendMgmtPendingGet(otInstance *aInstance, const uint8_t *aTlvTypes, uint8_t aLength,
|
||||
const otIp6Address *aAddress)
|
||||
{
|
||||
return aInstance->mThreadNetif.GetPendingDataset().SendGetRequest(aTlvTypes, aLength, aAddress);
|
||||
}
|
||||
|
||||
ThreadError otDatasetSendMgmtPendingSet(otInstance *aInstance, const otOperationalDataset *aDataset,
|
||||
const uint8_t *aTlvs, uint8_t aLength)
|
||||
{
|
||||
return aInstance->mThreadNetif.GetPendingDataset().SendSetRequest(*aDataset, aTlvs, aLength);
|
||||
}
|
||||
|
||||
uint32_t otDatasetGetDelayTimerMinimal(otInstance *aInstance)
|
||||
{
|
||||
return aInstance->mThreadNetif.GetLeader().GetDelayTimerMinimal();
|
||||
}
|
||||
|
||||
ThreadError otDatasetSetDelayTimerMinimal(otInstance *aInstance, uint32_t aDelayTimerMinimal)
|
||||
{
|
||||
return aInstance->mThreadNetif.GetLeader().SetDelayTimerMinimal(aDelayTimerMinimal);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
@@ -88,16 +88,6 @@ otInstance::otInstance(void) :
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
ThreadError otSetDelayTimerMinimal(otInstance *aInstance, uint32_t aDelayTimerMinimal)
|
||||
{
|
||||
return aInstance->mThreadNetif.GetLeader().SetDelayTimerMinimal(aDelayTimerMinimal);
|
||||
}
|
||||
|
||||
uint32_t otGetDelayTimerMinimal(otInstance *aInstance)
|
||||
{
|
||||
return aInstance->mThreadNetif.GetLeader().GetDelayTimerMinimal();
|
||||
}
|
||||
|
||||
uint8_t otGetMaxAllowedChildren(otInstance *aInstance)
|
||||
{
|
||||
uint8_t aNumChildren;
|
||||
@@ -877,93 +867,6 @@ ThreadError otIcmp6SendEchoRequest(otInstance *aInstance, otMessage aMessage,
|
||||
aIdentifier);
|
||||
}
|
||||
|
||||
ThreadError otGetActiveDataset(otInstance *aInstance, otOperationalDataset *aDataset)
|
||||
{
|
||||
ThreadError error = kThreadError_None;
|
||||
|
||||
VerifyOrExit(aDataset != NULL, error = kThreadError_InvalidArgs);
|
||||
|
||||
aInstance->mThreadNetif.GetActiveDataset().GetLocal().Get(*aDataset);
|
||||
|
||||
exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
ThreadError otSetActiveDataset(otInstance *aInstance, const otOperationalDataset *aDataset)
|
||||
{
|
||||
ThreadError error;
|
||||
|
||||
VerifyOrExit(aDataset != NULL, error = kThreadError_InvalidArgs);
|
||||
|
||||
error = aInstance->mThreadNetif.GetActiveDataset().Set(*aDataset);
|
||||
|
||||
exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
bool otIsNodeCommissioned(otInstance *aInstance)
|
||||
{
|
||||
otOperationalDataset dataset;
|
||||
|
||||
otGetActiveDataset(aInstance, &dataset);
|
||||
|
||||
if ((dataset.mIsMasterKeySet) && (dataset.mIsNetworkNameSet) &&
|
||||
(dataset.mIsExtendedPanIdSet) && (dataset.mIsPanIdSet) && (dataset.mIsChannelSet))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
ThreadError otGetPendingDataset(otInstance *aInstance, otOperationalDataset *aDataset)
|
||||
{
|
||||
ThreadError error = kThreadError_None;
|
||||
|
||||
VerifyOrExit(aDataset != NULL, error = kThreadError_InvalidArgs);
|
||||
|
||||
aInstance->mThreadNetif.GetPendingDataset().GetLocal().Get(*aDataset);
|
||||
|
||||
exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
ThreadError otSetPendingDataset(otInstance *aInstance, const otOperationalDataset *aDataset)
|
||||
{
|
||||
ThreadError error;
|
||||
|
||||
VerifyOrExit(aDataset != NULL, error = kThreadError_InvalidArgs);
|
||||
|
||||
error = aInstance->mThreadNetif.GetPendingDataset().Set(*aDataset);
|
||||
|
||||
exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
ThreadError otSendActiveGet(otInstance *aInstance, const uint8_t *aTlvTypes, uint8_t aLength,
|
||||
const otIp6Address *aAddress)
|
||||
{
|
||||
return aInstance->mThreadNetif.GetActiveDataset().SendGetRequest(aTlvTypes, aLength, aAddress);
|
||||
}
|
||||
|
||||
ThreadError otSendActiveSet(otInstance *aInstance, const otOperationalDataset *aDataset, const uint8_t *aTlvs,
|
||||
uint8_t aLength)
|
||||
{
|
||||
return aInstance->mThreadNetif.GetActiveDataset().SendSetRequest(*aDataset, aTlvs, aLength);
|
||||
}
|
||||
|
||||
ThreadError otSendPendingGet(otInstance *aInstance, const uint8_t *aTlvTypes, uint8_t aLength,
|
||||
const otIp6Address *aAddress)
|
||||
{
|
||||
return aInstance->mThreadNetif.GetPendingDataset().SendGetRequest(aTlvTypes, aLength, aAddress);
|
||||
}
|
||||
|
||||
ThreadError otSendPendingSet(otInstance *aInstance, const otOperationalDataset *aDataset, const uint8_t *aTlvs,
|
||||
uint8_t aLength)
|
||||
{
|
||||
return aInstance->mThreadNetif.GetPendingDataset().SendSetRequest(*aDataset, aTlvs, aLength);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
@@ -2055,7 +2055,7 @@ ThreadError NcpBase::GetPropertyHandler_NET_SAVED(uint8_t header, spinel_prop_ke
|
||||
SPINEL_CMD_PROP_VALUE_IS,
|
||||
key,
|
||||
SPINEL_DATATYPE_BOOL_S,
|
||||
otIsNodeCommissioned(mInstance)
|
||||
otDatasetIsCommissioned(mInstance)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user