2018-03-27 07:07:14 +02:00
|
|
|
|
|
|
|
#include "cw.h"
|
|
|
|
#include "dbg.h"
|
|
|
|
|
2018-05-07 23:29:35 +02:00
|
|
|
int cw_ktv_idx_get_next(mavl_t ktv, const char *key, int n);
|
|
|
|
|
2018-03-27 07:07:14 +02:00
|
|
|
int cw_out_radio_generic(struct cw_ElemHandler * handler, struct cw_ElemHandlerParams * params
|
|
|
|
, uint8_t * dst)
|
|
|
|
{
|
|
|
|
int len,i,l;
|
|
|
|
int radios;
|
|
|
|
len =0;
|
|
|
|
|
2018-05-07 23:29:35 +02:00
|
|
|
/* int idx=0;*/
|
|
|
|
|
|
|
|
/* while(1){
|
|
|
|
char key[CW_KTV_MAX_KEY_LEN];
|
|
|
|
sprintf(key,"radio.%d",idx);
|
|
|
|
idx = cw_ktv_idx_get_next(params->conn->local_cfg,key,idx);
|
|
|
|
idx++;
|
|
|
|
}
|
|
|
|
*/
|
2022-07-28 01:36:16 +02:00
|
|
|
radios = cw_ktv_get_byte(params->local_cfg,"wtp-descriptor/max-radios",0);
|
2018-03-27 07:07:14 +02:00
|
|
|
|
2018-04-17 07:46:09 +02:00
|
|
|
for(i=0;i<radios;i++){
|
2018-03-28 10:11:47 +02:00
|
|
|
l = cw_write_radio_element(handler,params,i,dst+len);
|
2022-07-28 01:36:16 +02:00
|
|
|
cw_dbg_elem(DBG_ELEM_OUT,NULL,params->msgdata->type,handler,dst,l);
|
2018-03-27 07:07:14 +02:00
|
|
|
len+=l;
|
|
|
|
}
|
|
|
|
return len;
|
|
|
|
}
|
2018-03-28 10:11:47 +02:00
|
|
|
|