Change API name: otNetworkSettingErase -> otPersistentInfoErase (#1126)

This commit is contained in:
Abtin Keshavarzian
2017-01-10 15:18:44 -08:00
committed by Jonathan Hui
parent 8198e8794f
commit 6db94b6c27
3 changed files with 10 additions and 6 deletions
+8 -4
View File
@@ -1675,7 +1675,10 @@ OTAPI ThreadError OTCALL otGetAssignLinkQuality(otInstance *aInstance, const uin
OTAPI void OTCALL otSetAssignLinkQuality(otInstance *aInstance, const uint8_t *aExtAddr, uint8_t aLinkQuality);
/**
* This method triggers platform reset.
* This method triggers a platform reset.
*
* The reset process ensures that all the OpenThread state/info (stored in volatile memory) is erased. Note that the
* `otPlatformReset` does not erase any persistent state/info saved in non-volatile memory.
*
* @param[in] aInstance A pointer to an OpenThread instance.
*/
@@ -1689,15 +1692,16 @@ OTAPI void OTCALL otPlatformReset(otInstance *aInstance);
OTAPI void OTCALL otFactoryReset(otInstance *aInstance);
/**
* This method erases all the settings stored on non-volatile memory.
* This function erases all the OpenThread persistent info (network settings) stored on non-volatile memory.
* Erase is successful only if the device is in `disabled` state/role.
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @retval kThreadError_None All data was wiped successfully.
* @retval kThreadError_None All persistent info/state was erased successfully.
* @retval kThreadError_InvalidState Device is not in `disabled` state/role.
*
*/
ThreadError otNetworkSettingsErase(otInstance *aInstance);
ThreadError otPersistentInfoErase(otInstance *aInstance);
/**
* Get the ROUTER_DOWNGRADE_THRESHOLD parameter used in the Router role.
+1 -1
View File
@@ -703,7 +703,7 @@ void otFactoryReset(otInstance *aInstance)
otPlatReset(aInstance);
}
ThreadError otNetworkSettingsErase(otInstance *aInstance)
ThreadError otPersistentInfoErase(otInstance *aInstance)
{
ThreadError error = kThreadError_None;
+1 -1
View File
@@ -1439,7 +1439,7 @@ ThreadError NcpBase::CommandHandler_NET_CLEAR(uint8_t header, unsigned int comma
(void)arg_ptr;
(void)arg_len;
return SendLastStatus(header, ThreadErrorToSpinelStatus(otNetworkSettingsErase(mInstance)));
return SendLastStatus(header, ThreadErrorToSpinelStatus(otPersistentInfoErase(mInstance)));
}
ThreadError NcpBase::CommandHandler_NET_RECALL(uint8_t header, unsigned int command, const uint8_t *arg_ptr,