Merge remote-tracking branch 'origin/develop' into tdd25period_for_MR
Conflicts: openair2/GNB_APP/gnb_config.c openair2/GNB_APP/gnb_paramdef.h openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c openair2/RRC/NR/MESSAGES/asn1_msg.c openair2/RRC/NR/rrc_gNB_reconfig.c
This commit is contained in:
@@ -1259,6 +1259,17 @@ void ue_init_standalone_socket(int tx_port, int rx_port)
|
||||
}
|
||||
}
|
||||
|
||||
static uint16_t get_message_id(const uint8_t *buffer, ssize_t len)
|
||||
{
|
||||
if (len < 4)
|
||||
return 0;
|
||||
|
||||
// Unpack 2 bytes message_id from buffer.
|
||||
uint16_t v;
|
||||
memcpy(&v, buffer + 2, sizeof(v));
|
||||
return ntohs(v);
|
||||
}
|
||||
|
||||
void *ue_standalone_pnf_task(void *context)
|
||||
{
|
||||
struct sockaddr_in server_address;
|
||||
@@ -1301,7 +1312,7 @@ void *ue_standalone_pnf_task(void *context)
|
||||
abort();
|
||||
}
|
||||
}
|
||||
else if (len == sizeof(phy_channel_params_t))
|
||||
else if (get_message_id((const uint8_t *)buffer, len) == 0x0FFF) // 0x0FFF : channel info identifier.
|
||||
{
|
||||
phy_channel_params_t ch_info;
|
||||
memcpy(&ch_info, buffer, sizeof(phy_channel_params_t));
|
||||
@@ -1314,8 +1325,15 @@ void *ue_standalone_pnf_task(void *context)
|
||||
uint16_t sf = ch_info.sfn_sf & 15;
|
||||
assert(sf < 10);
|
||||
|
||||
sf_rnti_mcs[sf].sinr = ch_info.sinr;
|
||||
LOG_D(MAC, "Received_SINR = %f\n",ch_info.sinr);
|
||||
if (ch_info.nb_of_sinrs > 1)
|
||||
LOG_W(MAC, "Expecting at most one SINR.\n");
|
||||
|
||||
// TODO: Update sinr field of slot_rnti_mcs to be array.
|
||||
for (int i = 0; i < ch_info.nb_of_sinrs; ++i)
|
||||
{
|
||||
sf_rnti_mcs[sf].sinr = ch_info.sinr[i];
|
||||
LOG_D(MAC, "Received_SINR[%d] = %f\n", i, ch_info.sinr[i]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#define NUM_MCS 28
|
||||
#define NUM_SINR 100
|
||||
#define NUM_BLER_COL 13
|
||||
#define LTE_NUM_LAYER 1
|
||||
|
||||
// this mutex is used to set multiple UE's UL value in L2 FAPI simulator.
|
||||
extern FILL_UL_INFO_MUTEX_t fill_ul_mutex;
|
||||
@@ -126,7 +127,9 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
|
||||
typedef struct phy_channel_params_t
|
||||
{
|
||||
uint16_t sfn_sf;
|
||||
float sinr;
|
||||
uint16_t message_id;
|
||||
uint16_t nb_of_sinrs;
|
||||
float sinr[LTE_NUM_LAYER];
|
||||
// Incomplete, need all channel parameters
|
||||
} phy_channel_params_t;
|
||||
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
}
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __OPENAIR2_PHY_INTERFACE_QUEUE_T__H__
|
||||
#define __OPENAIR2_PHY_INTERFACE_QUEUE_T__H__
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
@@ -62,3 +63,5 @@ typedef bool queue_matcher_t(void *wanted, void *candidate);
|
||||
Look only at the last `max_depth` items on the queue, at most.
|
||||
Returns the candidate item, or NULL if none matches */
|
||||
void *unqueue_matching(queue_t *q, size_t max_depth, queue_matcher_t *matcher, void *wanted);
|
||||
|
||||
#endif /* __OPENAIR2_PHY_INTERFACE_QUEUE_T__H__ */
|
||||
|
||||
Reference in New Issue
Block a user