Commit 956e819e authored by liuxu's avatar liuxu

add the quantity of ue in message sent to platform

parent d00ef8d8
......@@ -72,6 +72,7 @@ void *gnbSendToManager_task(void *args_p)
sem_wait(&gnbSendToManager_sem);
// printf("message_flag %d\n", message_flag);
// printf("sim_measurement_manager.ue_count = %d\n", sim_measurement_manager.ue_count);
if (message_flag == 1){
// printf("data_len %d rrc_signal_request_type %d rrc_signal_type %d \n", sim_rrc_signal_socket.data_len,
// sim_rrc_signal_socket.rrc_signal_request_type, sim_rrc_signal_socket.rrc_signal_type);
......@@ -82,7 +83,8 @@ void *gnbSendToManager_task(void *args_p)
send_len = write(sockfd, &sim_socket_manager, GNBSENDTOMANAGER_MAX_RE_SCHDULE_LEN);
}
else if (message_flag == 3){
send_len = write(sockfd, &sim_measurement_manager, sim_measurement_manager.data_len);
send_len = write(sockfd, &sim_measurement_manager, sim_measurement_manager.data_len);
memset(&sim_measurement_manager, 0, sim_measurement_manager.data_len);
}
// printf("send_len=%d\n", send_len);
......
......@@ -211,18 +211,16 @@ size_t dump_mac_stats(gNB_MAC_INST *gNB, char *output, size_t strlen, bool reset
}
}
if (cnt > 0){
pthread_mutex_lock(&sim_mutex_socket);
message_flag = 3;
sim_measurement_manager.data_len = cnt*sizeof(struct ue_measure_t)+3*sizeof(uint16_t);
sim_measurement_manager.message = 3;
sim_measurement_manager.ue_count = cnt;
#if 0
LOG_I(NR_MAC,"data_len %d\n", sim_measurement_manager.data_len);
#endif
pthread_mutex_unlock(&sim_mutex_socket);
sem_post(&gnbSendToManager_sem);
}
pthread_mutex_lock(&sim_mutex_socket);
message_flag = 3;
sim_measurement_manager.data_len = cnt*sizeof(struct ue_measure_t)+3*sizeof(uint16_t);
sim_measurement_manager.message = 3;
sim_measurement_manager.ue_count = cnt;
#if 0
LOG_I(NR_MAC,"data_len %d\n", sim_measurement_manager.data_len);
#endif
pthread_mutex_unlock(&sim_mutex_socket);
sem_post(&gnbSendToManager_sem);
NR_SCHED_UNLOCK(&gNB->UE_info.mutex);
return output - begin;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment