|
AM263Px MCU+ SDK
10.01.00
|
|
Go to the documentation of this file.
55 #define MAX_NUM_DBLIST 20
61 typedef struct keydata{
66 typedef struct key_range{
92 #define SIMPLEDB_FLAG_CREATE (1u<<0u)
93 #define SIMPLEDB_FLAG_APPEND (1u<<1u)
95 uint32_t vlen, uint8_t
flags);
102 void **value, uint32_t *vlen);
125 #define SIMPLEDB_FORWARD 1
126 #define SIMPLEDB_BACKWARD -1
127 #define SIMPLEDB_NOMOVE 0
129 void **kdata, uint32_t *ksize,
void **vdata, uint32_t *vsize,
int simpledb_get_from_range(simpledb_data_t *sdbd, simpledb_range_t *rangedp, void **kdata, uint32_t *ksize, void **vdata, uint32_t *vsize, int direction)
void simpledb_get_range_release(simpledb_data_t *sdbd, simpledb_range_t *rangedp)
struct simpledb_range simpledb_range_t
Definition: simpledb.h:59
int simpledb_del(simpledb_data_t *sdbd, simpledb_keydata_t *kd)
delete the key item. need to be unlocked status.
simpledb_keydata_t * kd1
Definition: simpledb.h:67
int simpledb_put(simpledb_data_t *sdbd, simpledb_keydata_t *kd, void *value, uint32_t vlen, uint8_t flags)
void simpledb_move_top_range(simpledb_data_t *sdbd, simpledb_range_t *rangedp)
int simpledb_move_in_range(simpledb_data_t *sdbd, simpledb_range_t *rangedp, int direction)
int simpledb_del_in_range(simpledb_data_t *sdbd, simpledb_range_t *rangedp, int direction)
Definition: simpledb.h:61
unibase general global header
uint32_t ksize
Definition: simpledb.h:62
uint8_t flags
Definition: hsmclient_msg.h:2
void simpledb_close(simpledb_data_t *sdbd)
close the db. if pfname is set at the open, the config(rw) data is saved.
simpledb_range_t * simpledb_get_range(simpledb_data_t *sdbd, key_range_t *krange)
get datarange pointer which the keys are between (key1, key2)
simpledb_data_t * simpledb_open(const char *pfname)
open the db. if pfname is set, the config(rw) data is restored from the file.
int simpledb_savedata(simpledb_data_t *sdbd, key_range_t **keyranges)
save data to a file
void simpledb_move_bottom_range(simpledb_data_t *sdbd, simpledb_range_t *rangedp)
int simpledb_get(simpledb_data_t *sdbd, simpledb_keydata_t *kd, void **value, uint32_t *vlen)
get data from the db
int simpledb_get_release(simpledb_data_t *sdbd, simpledb_keydata_t *kd)
struct simpledb_data simpledb_data_t
Definition: simpledb.h:57
simpledb_keydata_t * kd2
Definition: simpledb.h:68
Definition: simpledb.h:66
void * kdata
Definition: simpledb.h:63
int simpledb_wait_release(simpledb_data_t *sdbd, int toutms)