NcpBase: Simplify the set handlers by refactoring common code (#1898)

This commit simplifies the set handlers in `NcpBase` by refactoring
common code (which sends the spinel response to the `PROP_VALUE_SET`
command) into a new method `SendSetPropertyResponse()`. It also changes
the error handling in set handlers to use `VerifyOrExit`/`SuccessOrExit`.
This commit is contained in:
Abtin Keshavarzian
2017-06-13 13:26:46 -07:00
committed by Jonathan Hui
parent b0db5510b4
commit b205bf03ff
2 changed files with 730 additions and 1262 deletions
+729 -1262
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -453,6 +453,7 @@ private:
otError GetPropertyHandler_NEST_LEGACY_ULA_PREFIX(uint8_t header, spinel_prop_key_t key);
#endif
otError SendSetPropertyResponse(uint8_t aHeader, spinel_prop_key_t aKey, otError aError);
otError SetPropertyHandler_POWER_STATE(uint8_t header, spinel_prop_key_t key, const uint8_t *value_ptr,
uint16_t value_len);