This repository has been archived by the owner on Jul 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
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_get() on top of coap_req
This commit is phasing out direct CoAP dependency and low-level CoAP handling requirement when using golioth_lightdb_get() API. Add new golioth_lightdb_get_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/get to new API. Provide examples for both synchronous golioth_lightdb_get() and asynchronous (callback based) golioth_lightdb_get_cb() API. Add LOG_INF() 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
176 additions
and
144 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
Oops, something went wrong.