-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lightdb: rework golioth_lightdb_set() on top of coap_req
This commit is phasing out direct CoAP dependency and low-level CoAP handling requirement when using golioth_lightdb_set() API. Add new golioth_lightdb_set_cb() callback based API, which is really just a thin wrapper around golioth_coap_req_cb() API, but leaves user flexibility of calling it from other golioth callback (which are all executed from system_client thread) as well as from time-sensitive threads like system workqueue. Update samples/lightdb/set to new API. Provide examples for both synchronous golioth_lightdb_set() and asynchronous (callback based) golioth_lightdb_set_cb() API. Add LOG_DBG() statements before and after lightdb API calls, so that it makes it clear that main thread blocks on the synchronous API, while continuing execution with the callback-based API. Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
- Loading branch information
Showing
5 changed files
with
119 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters