Go to the source code of this file.
Typedefs | |
typedef struct yang_db_runtime_data | yang_db_runtime_dataq_t |
Functions | |
yang_db_runtime_dataq_t * | yang_db_runtime_init (uc_dbald *dbald, uc_hwald *hwald) |
void | yang_db_runtime_close (yang_db_runtime_dataq_t *ydrd) |
int | yang_db_runtime_readfile (yang_db_runtime_dataq_t *ydrd, const char *fname, uc_notice_data_t *ucntd) |
read from a config file, and set data. More... | |
int | yang_db_runtime_get_vtype (uc_dbald *dbald, uint8_t *aps) |
get value type of 'aps' leaf More... | |
int | yang_db_runtime_put_oneline (yang_db_runtime_dataq_t *ydrd, char *kstr, char *vstr, uint8_t onhw) |
write one node db data by a string line More... | |
int | yang_db_runtime_askaction (yang_db_runtime_dataq_t *ydrd, uc_notice_data_t *ucntd) |
ask to call 'uc_nc_askaction_push' More... | |
uc_range * | yang_db_runtime_range_fromline (yang_db_runtime_dataq_t *ydrd, const char *line, void **kvs, uint8_t *kss, bool status) |
get a range from line More... | |
int | yang_db_runtime_get_oneline (yang_db_runtime_dataq_t *ydrd, const char *line, void **value, uint32_t *vsize) |
get one node db data by a string line More... | |
int | yang_db_runtime_notice_register (yang_db_runtime_dataq_t *ydrd, uc_notice_data_t *ucntd, const char *line, char *semname, UC_NOTICE_SIG_T **sem) |
uint8_t | yang_db_runtime_getvknum (uc_dbald *dbald, uint8_t *aps) |
int | yang_db_runtime_getvkvtype (uc_dbald *dbald, uint8_t *aps, uint8_t vkindex, uint8_t *vkey, uint8_t *vtype) |
int | yang_db_runtime_getvkstr (uc_dbald *dbald, uint8_t *aps, uint8_t vkindex, char **rstr) |
int | yang_db_runtime_waititem (yang_db_runtime_dataq_t *ydrd, const char *witem, void *waitv, uint32_t wvsize, int tout_ms) |
wait witem, if waitv!=NULL wait unitl the value matches. if waitv==NULL wait appearance of witem. More... | |
int | yang_db_runtime_apkv2keyvkstr (uc_dbald *dbald, uint8_t *aps, kvs_t *kvs, uint8_t *kss, char **rstr) |
'key node string' and 'value key node string' of (aps,kvs,kss) More... | |
int | yang_db_runtime_getkeyvkstr (uc_dbald *dbald, void *key, uint32_t ksize, char **rstr) |
'key node string' and 'value key node string' of key More... | |
int | yang_db_runtime_proc_nodestring (yang_db_runtime_dataq_t *ydrd, bool reset, char *kstr, char *vstr) |
int | yang_db_runtime_state_keyvkstr (yang_db_runtime_dataq_t *ydrd, char **rstr) |
call yang_db_runtime_getkeyvkstr with the internal ydrd state More... | |
const char * | convxml2conf_getconf (yang_db_runtime_dataq_t *ydrd, const char *ifname, const char *ofname) |
convert xml format config file to Excelfore format config file More... | |
typedef struct yang_db_runtime_data yang_db_runtime_dataq_t |
yang_db_runtime_dataq_t* yang_db_runtime_init | ( | uc_dbald * | dbald, |
uc_hwald * | hwald | ||
) |
void yang_db_runtime_close | ( | yang_db_runtime_dataq_t * | ydrd | ) |
int yang_db_runtime_readfile | ( | yang_db_runtime_dataq_t * | ydrd, |
const char * | fname, | ||
uc_notice_data_t * | ucntd | ||
) |
read from a config file, and set data.
ydrd | yang_db_runtime_dataq_t |
fname | config file name |
ucntd | uc_notice handle to ask an action to uniconf. if NULL no action is pushed. |
int yang_db_runtime_get_vtype | ( | uc_dbald * | dbald, |
uint8_t * | aps | ||
) |
get value type of 'aps' leaf
int yang_db_runtime_put_oneline | ( | yang_db_runtime_dataq_t * | ydrd, |
char * | kstr, | ||
char * | vstr, | ||
uint8_t | onhw | ||
) |
write one node db data by a string line
ydrd | yang_db_runtime_dataq_t |
kstr | key string |
vstr | value string |
onhw | action on hardware |
int yang_db_runtime_askaction | ( | yang_db_runtime_dataq_t * | ydrd, |
uc_notice_data_t * | ucntd | ||
) |
ask to call 'uc_nc_askaction_push'
ydrd | yang_db_runtime_dataq_t |
ucntd | uc_notice_data_t |
uc_range* yang_db_runtime_range_fromline | ( | yang_db_runtime_dataq_t * | ydrd, |
const char * | line, | ||
void ** | kvs, | ||
uint8_t * | kss, | ||
bool | status | ||
) |
get a range from line
ydrd | yang_db_runtime_dataq_t |
line | key string |
kvs | return value keys, it must have MAX_KV_DEPTH+1 of void pointer space |
kss | return value key sizes, it must have MAX_KV_DEPTH of uint8_t space |
status | true:get range from status('ro') area, false: get from config('rw') area |
int yang_db_runtime_get_oneline | ( | yang_db_runtime_dataq_t * | ydrd, |
const char * | line, | ||
void ** | value, | ||
uint32_t * | vsize | ||
) |
get one node db data by a string line
ydrd | yang_db_runtime_dataq_t |
line | key string |
value | value pointer to return read value. it is reallocated inside the function. it must be NULL or allocated address. |
vsize | value size |
int yang_db_runtime_notice_register | ( | yang_db_runtime_dataq_t * | ydrd, |
uc_notice_data_t * | ucntd, | ||
const char * | line, | ||
char * | semname, | ||
UC_NOTICE_SIG_T ** | sem | ||
) |
uint8_t yang_db_runtime_getvknum | ( | uc_dbald * | dbald, |
uint8_t * | aps | ||
) |
int yang_db_runtime_getvkvtype | ( | uc_dbald * | dbald, |
uint8_t * | aps, | ||
uint8_t | vkindex, | ||
uint8_t * | vkey, | ||
uint8_t * | vtype | ||
) |
int yang_db_runtime_getvkstr | ( | uc_dbald * | dbald, |
uint8_t * | aps, | ||
uint8_t | vkindex, | ||
char ** | rstr | ||
) |
int yang_db_runtime_waititem | ( | yang_db_runtime_dataq_t * | ydrd, |
const char * | witem, | ||
void * | waitv, | ||
uint32_t | wvsize, | ||
int | tout_ms | ||
) |
wait witem, if waitv!=NULL wait unitl the value matches. if waitv==NULL wait appearance of witem.
ydrd | yang_db_runtime_dataq_t |
witem | wait item |
waitv | wait value |
wvsize | wait value size |
tout_ms | wait timeout (ms) |
int yang_db_runtime_apkv2keyvkstr | ( | uc_dbald * | dbald, |
uint8_t * | aps, | ||
kvs_t * | kvs, | ||
uint8_t * | kss, | ||
char ** | rstr | ||
) |
'key node string' and 'value key node string' of (aps,kvs,kss)
dbald | uc_dbald |
aps | node keys, must be terminated with 255 |
kvs | value keys |
kss | size of value keys |
rstr | data out |
int yang_db_runtime_getkeyvkstr | ( | uc_dbald * | dbald, |
void * | key, | ||
uint32_t | ksize, | ||
char ** | rstr | ||
) |
'key node string' and 'value key node string' of key
int yang_db_runtime_proc_nodestring | ( | yang_db_runtime_dataq_t * | ydrd, |
bool | reset, | ||
char * | kstr, | ||
char * | vstr | ||
) |
ydrd | yang_db_runtime_dataq_t |
reset | reset ydrd->api to start over |
kstr | key stting |
vstr | value string, if this is NULL, kstr should be node |
int yang_db_runtime_state_keyvkstr | ( | yang_db_runtime_dataq_t * | ydrd, |
char ** | rstr | ||
) |
call yang_db_runtime_getkeyvkstr with the internal ydrd state
const char* convxml2conf_getconf | ( | yang_db_runtime_dataq_t * | ydrd, |
const char * | ifname, | ||
const char * | ofname | ||
) |
convert xml format config file to Excelfore format config file
ydrd | yang_db_runtime_dataq_t |
ifname | input xml format filename |
ofname | output Excelfore format filename. if NULL, use a default temp file |