Merge remote-tracking branch 'origin/episys-throughput-updates-and-downlink-siso-cm' into integration_2022_wk14

This commit is contained in:
Robert Schmidt
2022-04-06 23:44:59 +02:00
83 changed files with 5286 additions and 1640 deletions
+21 -3
View File
@@ -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
{
+4 -1
View File
@@ -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;