[ncp] include prop set support for THREAD_CHILD_TIMEOUT in MTD build (#2943)

This commit is contained in:
Abtin Keshavarzian
2018-08-02 00:55:35 -05:00
committed by Jonathan Hui
parent 601b99b394
commit d67c4e2f6b
3 changed files with 16 additions and 16 deletions
+3 -3
View File
@@ -703,6 +703,9 @@ NcpBase::PropertyHandler NcpBase::FindSetPropertyHandler(spinel_prop_key_t aKey)
case SPINEL_PROP_IPV6_ICMP_PING_OFFLOAD_MODE:
handler = &NcpBase::HandlePropertySet<SPINEL_PROP_IPV6_ICMP_PING_OFFLOAD_MODE>;
break;
case SPINEL_PROP_THREAD_CHILD_TIMEOUT:
handler = &NcpBase::HandlePropertySet<SPINEL_PROP_THREAD_CHILD_TIMEOUT>;
break;
case SPINEL_PROP_THREAD_RLOC16_DEBUG_PASSTHRU:
handler = &NcpBase::HandlePropertySet<SPINEL_PROP_THREAD_RLOC16_DEBUG_PASSTHRU>;
break;
@@ -777,9 +780,6 @@ NcpBase::PropertyHandler NcpBase::FindSetPropertyHandler(spinel_prop_key_t aKey)
case SPINEL_PROP_NET_PSKC:
handler = &NcpBase::HandlePropertySet<SPINEL_PROP_NET_PSKC>;
break;
case SPINEL_PROP_THREAD_CHILD_TIMEOUT:
handler = &NcpBase::HandlePropertySet<SPINEL_PROP_THREAD_CHILD_TIMEOUT>;
break;
case SPINEL_PROP_THREAD_NETWORK_ID_TIMEOUT:
handler = &NcpBase::HandlePropertySet<SPINEL_PROP_THREAD_NETWORK_ID_TIMEOUT>;
break;
-13
View File
@@ -468,19 +468,6 @@ exit:
}
#endif // #if OPENTHREAD_CONFIG_ENABLE_STEERING_DATA_SET_OOB
template <> otError NcpBase::HandlePropertySet<SPINEL_PROP_THREAD_CHILD_TIMEOUT>(void)
{
uint32_t timeout = 0;
otError error = OT_ERROR_NONE;
SuccessOrExit(error = mDecoder.ReadUint32(timeout));
otThreadSetChildTimeout(mInstance, timeout);
exit:
return error;
}
template <> otError NcpBase::HandlePropertyGet<SPINEL_PROP_THREAD_PREFERRED_ROUTER_ID>(void)
{
return mEncoder.WriteUint8(mPreferredRouteId);
+13
View File
@@ -2199,6 +2199,19 @@ template <> otError NcpBase::HandlePropertyGet<SPINEL_PROP_THREAD_CHILD_TIMEOUT>
return mEncoder.WriteUint32(otThreadGetChildTimeout(mInstance));
}
template <> otError NcpBase::HandlePropertySet<SPINEL_PROP_THREAD_CHILD_TIMEOUT>(void)
{
uint32_t timeout = 0;
otError error = OT_ERROR_NONE;
SuccessOrExit(error = mDecoder.ReadUint32(timeout));
otThreadSetChildTimeout(mInstance, timeout);
exit:
return error;
}
template <> otError NcpBase::HandlePropertyGet<SPINEL_PROP_THREAD_RLOC16>(void)
{
return mEncoder.WriteUint16(otThreadGetRloc16(mInstance));