Allowing fill functions to set correct headers
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
log_config = {
|
||||
global_log_level ="debug";
|
||||
global_log_level ="info";
|
||||
global_log_verbosity ="medium";
|
||||
hw_log_level ="info";
|
||||
hw_log_verbosity ="medium";
|
||||
phy_log_level ="debug";
|
||||
phy_log_level ="info";
|
||||
phy_log_verbosity ="medium";
|
||||
mac_log_level ="debug";
|
||||
mac_log_level ="info";
|
||||
mac_log_verbosity ="medium";
|
||||
rlc_log_level ="info";
|
||||
rlc_log_verbosity ="medium";
|
||||
|
||||
@@ -425,6 +425,9 @@ int phy_rach_indication(struct nfapi_vnf_p7_config *config, nfapi_rach_indicatio
|
||||
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
|
||||
printf("[VNF] RACH_IND eNB:%p sfn_sf:%d number_of_preambles:%d\n", eNB, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->rach_indication_body.number_of_preambles);
|
||||
pthread_mutex_lock(&eNB->UL_INFO_mutex);
|
||||
|
||||
LOG_E(MAC, "%s entered\n", __func__);
|
||||
|
||||
if(NFAPI_MODE == NFAPI_MODE_VNF){
|
||||
int8_t index = -1;
|
||||
for(uint8_t i= 0;i< NUM_NFPAI_SUBFRAME;i++){
|
||||
@@ -525,6 +528,9 @@ int phy_harq_indication(struct nfapi_vnf_p7_config *config, nfapi_harq_indicatio
|
||||
int phy_crc_indication(struct nfapi_vnf_p7_config *config, nfapi_crc_indication_t *ind) {
|
||||
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
|
||||
pthread_mutex_lock(&eNB->UL_INFO_mutex);
|
||||
|
||||
LOG_E(MAC, "%s entered\n", __func__);
|
||||
|
||||
if(NFAPI_MODE == NFAPI_MODE_VNF){
|
||||
int8_t index = -1;
|
||||
for(uint8_t i= 0;i< NUM_NFPAI_SUBFRAME;i++){
|
||||
@@ -589,6 +595,7 @@ int phy_rx_indication(struct nfapi_vnf_p7_config *config, nfapi_rx_indication_t
|
||||
LOG_D(MAC, "%s() NFAPI SFN/SF:%d number_of_pdus:%u\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->rx_indication_body.number_of_pdus);
|
||||
}
|
||||
|
||||
LOG_E(MAC, "%s entered\n", __func__);
|
||||
pthread_mutex_lock(&eNB->UL_INFO_mutex);
|
||||
if(NFAPI_MODE == NFAPI_MODE_VNF){
|
||||
int8_t index = -1;
|
||||
|
||||
@@ -526,7 +526,7 @@ uint32_t pullarray8(uint8_t **in, uint8_t out[], uint32_t max_len, uint32_t len,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if((end - out) >= sizeof(uint8_t) * len)
|
||||
if((end - (*in)) >= sizeof(uint8_t) * len)
|
||||
{
|
||||
memcpy(out, (*in), len);
|
||||
(*in)+=len;
|
||||
|
||||
@@ -279,7 +279,7 @@ void fill_ulsch_cqi_indication_UE_MAC(int Mod_id,
|
||||
UL_INFO->cqi_ind.sfn_sf = frame << 4 | subframe;
|
||||
// because of nfapi_vnf.c:733, set message id to 0, not
|
||||
// NFAPI_RX_CQI_INDICATION;
|
||||
UL_INFO->cqi_ind.header.message_id = 0;
|
||||
UL_INFO->cqi_ind.header.message_id = NFAPI_RX_CQI_INDICATION;
|
||||
UL_INFO->cqi_ind.cqi_indication_body.tl.tag = NFAPI_CQI_INDICATION_BODY_TAG;
|
||||
|
||||
pdu->rx_ue_information.tl.tag = NFAPI_RX_UE_INFORMATION_TAG;
|
||||
@@ -1247,10 +1247,36 @@ void *ue_standalone_pnf_task(void *context)
|
||||
}
|
||||
}
|
||||
|
||||
const char *hexdump(uint8_t *data, size_t data_len, char *out, size_t out_len)
|
||||
{
|
||||
char *p = out;
|
||||
char *endp = out + out_len;
|
||||
uint8_t *q = (uint8_t *)(data);
|
||||
snprintf(p, endp - p, "[%zu]", data_len);
|
||||
p += strlen(p);
|
||||
for (size_t i = 0; i < data_len; ++i)
|
||||
{
|
||||
if (p >= endp)
|
||||
{
|
||||
static const char ellipses[] = "...";
|
||||
char *s = endp - sizeof(ellipses);
|
||||
if (s >= p)
|
||||
{
|
||||
strcpy(s, ellipses);
|
||||
}
|
||||
break;
|
||||
}
|
||||
snprintf(p, endp - p, " %02X", *q++);
|
||||
p += strlen(p);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
void send_standalone_msg(UL_IND_t * UL, nfapi_message_id_e msg_type)
|
||||
{
|
||||
int encoded_size = -1;
|
||||
char buffer[1024];
|
||||
char foo[1024];
|
||||
switch (msg_type)
|
||||
{
|
||||
case NFAPI_RACH_INDICATION:
|
||||
@@ -1262,6 +1288,7 @@ void *ue_standalone_pnf_task(void *context)
|
||||
break;
|
||||
case NFAPI_RX_ULSCH_INDICATION: // is this the right nfapi message_id? Ask Raymond
|
||||
encoded_size = nfapi_p7_message_pack(&UL->rx_ind, buffer, sizeof(buffer), NULL);
|
||||
LOG_E(MAC, "%s %s\n", __func__, hexdump(buffer, encoded_size, foo, sizeof(foo)));
|
||||
LOG_D(MAC, "RX_IND sent to Proxy\n");
|
||||
break;
|
||||
case NFAPI_RX_CQI_INDICATION: // is this the right nfapi message_id? Ask Raymond
|
||||
|
||||
Reference in New Issue
Block a user