-
Notifications
You must be signed in to change notification settings - Fork 1.1k
AliOS Things API KV Guide
librae8226 edited this page Mar 1, 2018
·
1 revision
int aos_kv_set(const char *key, const void *value, int len, int sync)
-
Description
Add a new KV pair.
-
Parameters
IN/OUT NAME DESC [in] key the key of the KV pair. [in] value the value of the KV pair. [in] len the length of the value. [in] sync save the KV pair to flash right now (should always be 1). -
Returns
0 on success, negative error on failure.
int aos_kv_get(const char *key, void *buffer, int *buffer_len)
-
Description
Get the KV pair's value stored in buffer by its key.
-
Parameters
IN/OUT NAME DESC [in] key the key of the KV pair to get. [out] buffer the memory to store the value. [in-out] buffer_len in: the length of the input buffer. out: the real length of the value. -
Returns
0 on success, negative error on failure.
int aos_kv_del(const char *key)
-
Description
Delete the KV pair by its key.
-
Parameters
IN/OUT NAME DESC [in] key the key of the KV pair to delete. -
Returns
0 on success, negative error on failure.
| Home | Tutorial | Hardware | Porting Guide | Utilities | API Reference | Technical Docs | Certification |
Crafted with ❤️ by AliOS Things Team.