work on out_idx_genirci struct
FossilOrigin-Name: 16c28e079794c931e21de2c62b63d45146a20cd7d1e7b35e936c8a1f67819dbf
This commit is contained in:
parent
7fee816c8e
commit
17e9f1636d
@ -10,14 +10,20 @@ int cw_out_idx_generic_struct(struct cw_ElemHandler * handler, struct cw_ElemHan
|
|||||||
|
|
||||||
int len,i,l;
|
int len,i,l;
|
||||||
int radios;
|
int radios;
|
||||||
int fint, sr;
|
int idx, sr;
|
||||||
|
int pos;
|
||||||
|
uint8_t * mdst;
|
||||||
|
|
||||||
len =0;
|
len =0;
|
||||||
|
|
||||||
i=0;
|
i=0;
|
||||||
|
|
||||||
|
pos = 0;
|
||||||
|
mdst = dst;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
|
||||||
|
|
||||||
sprintf(key,handler->key,i);
|
sprintf(key,handler->key,i);
|
||||||
search.key=key;
|
search.key=key;
|
||||||
/*elem = mavl_get(params->conn->local_cfg, &search);*/
|
/*elem = mavl_get(params->conn->local_cfg, &search);*/
|
||||||
@ -25,15 +31,37 @@ int cw_out_idx_generic_struct(struct cw_ElemHandler * handler, struct cw_ElemHan
|
|||||||
if(elem != NULL){
|
if(elem != NULL){
|
||||||
printf("Elem key: %s",elem->key);
|
printf("Elem key: %s",elem->key);
|
||||||
}
|
}
|
||||||
sr = sscanf(elem->key,handler->key,&fint);
|
sr = sscanf(elem->key,handler->key,&idx);
|
||||||
|
|
||||||
if (sr!=1)
|
if (sr!=1)
|
||||||
break;
|
break;
|
||||||
if (fint<=i)
|
if (idx<=i)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
printf("Here we are '%s'! --> %d\n",key,fint);
|
sprintf(key,handler->key,idx);
|
||||||
i=fint+1;
|
|
||||||
|
printf("Here we are '%s'! --> %d\n",key,idx);
|
||||||
|
|
||||||
|
|
||||||
|
pos = params->conn->header_len(handler);
|
||||||
|
|
||||||
|
pos += cw_put_byte(mdst+pos,idx);
|
||||||
|
pos += cw_ktv_write_struct(params->conn->local_cfg,handler->type,key,mdst+pos);
|
||||||
|
|
||||||
|
mdst += params->conn->write_header(handler,mdst,pos);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
i=idx+1;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}while(1);
|
}while(1);
|
||||||
|
|
||||||
|
@ -65,8 +65,8 @@ cisco/regulatory-domain/019/code0 :Byte: 0
|
|||||||
cisco/regulatory-domain/019/code1 :Byte: 1
|
cisco/regulatory-domain/019/code1 :Byte: 1
|
||||||
cisco/regulatory-domain/019/set :Bool: true
|
cisco/regulatory-domain/019/set :Bool: true
|
||||||
cisco/regulatory-domain/019/slot :Byte: 0
|
cisco/regulatory-domain/019/slot :Byte: 0
|
||||||
cisco/regulatory-domain/01/code0 :Byte: 0
|
cisco/regulatory-domain/001/code0 :Byte: 0
|
||||||
cisco/regulatory-domain/01/code1 :Byte: 1
|
cisco/regulatory-domain/001/code1 :Byte: 1
|
||||||
cisco/regulatory-domain/01/set :Bool: true
|
cisco/regulatory-domain/001/set :Bool: true
|
||||||
cisco/regulatory-domain/01/slot :Byte: 1
|
cisco/regulatory-domain/001/slot :Byte: 1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user