mirror of
https://github.com/espressif/openthread.git
synced 2026-08-12 21:57:47 +00:00
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:
committed by
Jonathan Hui
parent
b0db5510b4
commit
b205bf03ff
+729
-1262
File diff suppressed because it is too large
Load Diff
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user