Commit bb4bdc2b authored by Vaibhav Shrivastava's avatar Vaibhav Shrivastava

Remove unused prints and ENB_SS Changes

parent 291e3198
Active_eNBs = ( "eNB-Eurecom-LTEBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
eNBs =
(
{
# real_time choice in {hard, rt-preempt, no}
real_time = "no";
////////// Identification parameters:
eNB_ID = 0x1;
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB-Eurecom-LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ( { mcc = 208; mnc = 93; mnc_length = 2; } );
tr_s_preference = "local_mac"
////////// Physical parameters:
component_carriers = (
{
node_function = "3GPP_eNODEB";
node_timing = "synch_to_ext_device";
node_synch_ref = 0;
frame_type = "FDD";
tdd_config = 0;
tdd_config_s = 0;
prefix_type = "NORMAL";
eutra_band = 1;
downlink_frequency = 2160000000L;
uplink_frequency_offset = -200000000L;
Nid_cell = 0;
N_RB_DL = 50;
Nid_cell_mbsfn = 0;
nb_antenna_ports = 1;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 90;
rx_gain = 125;
pbch_repetition = "FALSE";
prach_root = 22;
prach_config_index = 3;
prach_high_speed = "DISABLE";
prach_zero_correlation = 5;
prach_freq_offset = 4;
pucch_delta_shift = 1;
pucch_nRB_CQI = 0;
pucch_nCS_AN = 0;
pucch_n1_AN = 0;
pdsch_referenceSignalPower = -27;
pdsch_p_b = 0;
pusch_n_SB = 1;
pusch_enable64QAM = "DISABLE";
pusch_hoppingMode = "interSubFrame";
pusch_hoppingOffset = 0;
pusch_groupHoppingEnabled = "ENABLE";
pusch_groupAssignment = 0;
pusch_sequenceHoppingEnabled = "DISABLE";
pusch_nDMRS1 = 1;
phich_duration = "NORMAL";
phich_resource = "ONESIXTH";
srs_enable = "DISABLE";
/* srs_BandwidthConfig =;
srs_SubframeConfig =;
srs_ackNackST =;
srs_MaxUpPts =;*/
pusch_p0_Nominal = -96;
pusch_alpha = "AL1";
pucch_p0_Nominal = -104;
msg3_delta_Preamble = 6;
pucch_deltaF_Format1 = "deltaF2";
pucch_deltaF_Format1b = "deltaF3";
pucch_deltaF_Format2 = "deltaF0";
pucch_deltaF_Format2a = "deltaF0";
pucch_deltaF_Format2b = "deltaF0";
rach_numberOfRA_Preambles = 64;
rach_preamblesGroupAConfig = "DISABLE";
/*
rach_sizeOfRA_PreamblesGroupA = ;
rach_messageSizeGroupA = ;
rach_messagePowerOffsetGroupB = ;
*/
rach_powerRampingStep = 4;
rach_preambleInitialReceivedTargetPower = -108;
rach_preambleTransMax = 10;
rach_raResponseWindowSize = 10;
rach_macContentionResolutionTimer = 48;
rach_maxHARQ_Msg3Tx = 4;
pcch_default_PagingCycle = 128;
pcch_nB = "oneT";
bcch_modificationPeriodCoeff = 2;
ue_TimersAndConstants_t300 = 1000;
ue_TimersAndConstants_t301 = 1000;
ue_TimersAndConstants_t310 = 1000;
ue_TimersAndConstants_t311 = 10000;
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 1;
}
);
srb1_parameters :
{
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
timer_poll_retransmit = 80;
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
timer_reordering = 35;
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
timer_status_prohibit = 0;
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
poll_pdu = 4;
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
poll_byte = 99999;
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
max_retx_threshold = 4;
}
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.61.4";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
enable_measurement_reports = "no";
///X2
enable_x2 = "no";
t_reloc_prep = 1000; /* unit: millisecond */
tx2_reloc_overall = 2000; /* unit: millisecond */
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "l2sim-net";
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
ENB_INTERFACE_NAME_FOR_S1U = "l2sim-net";
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDRESS";
ENB_PORT_FOR_X2C = 36422; # Spec 36422
};
}
);
# IP Address, port numbers and SSMode for System Simulator
SSConfig = (
{
hostIp = "127.0.0.1"; #Host IP for System Simulator
Sys_port = 7777; #Port Number for System Simulator Sys Port
Srb_port = 7778; #Port Number for System Simulator Srb Port
Vng_port = 7779; #Port Number for System Simulator VNG Port
Vtp_port = 7780; #Port Number for System Simulator VTP Port
SSMode = 1; #SSMode: 0 - eNB , 1- SYS_PORT test , 2- Only SRB_PORT test
}
);
MACRLCs = (
{
num_cc = 1;
local_s_if_name = "lo";
remote_s_address = "127.0.0.1";
local_s_address = "127.0.0.1";
local_s_portc = 50001;
remote_s_portc = 50000;
local_s_portd = 50011;
remote_s_portd = 50010;
tr_s_preference = "nfapi";
tr_n_preference = "local_RRC";
scheduler_mode = "fairRR";
}
);
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_RU_L1_SPLIT";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE";
}
);
log_config =
{
global_log_level ="warn";
global_log_verbosity ="low";
hw_log_level ="error";
hw_log_verbosity ="low";
phy_log_level ="error";
phy_log_verbosity ="low";
mac_log_level ="debug";
mac_log_verbosity ="low";
rlc_log_level ="warn";
rlc_log_verbosity ="low";
pdcp_log_level ="debug";
pdcp_log_verbosity ="low";
rrc_log_level ="debug";
rrc_log_verbosity ="full";
};
......@@ -203,18 +203,6 @@ eNBs =
}
);
# IP Address, port numbers and SSMode for System Simulator
SSConfig = (
{
hostIp = "127.0.0.1"; #Host IP for System Simulator
Sys_port = 7777; #Port Number for System Simulator Sys Port
Srb_port = 7778; #Port Number for System Simulator Srb Port
Vng_port = 7779; #Port Number for System Simulator VNG Port
Vtp_port = 7780; #Port Number for System Simulator VTP Port
SSMode = 2; #SSMode: 0 - eNB , 1- SYS_PORT test , 2- Only SRB_PORT test
}
);
MACRLCs = (
{
num_cc = 1;
......
......@@ -465,6 +465,7 @@ int logInit (void)
register_log_component("eRAL","",RAL_ENB);
register_log_component("mRAL","",RAL_UE);
register_log_component("ENB_APP","log",ENB_APP);
register_log_component("ENB_SS","log",ENB_SS);
register_log_component("MCE_APP","log",MCE_APP);
register_log_component("MME_APP","log",MME_APP);
register_log_component("FLEXRAN_AGENT","log",FLEXRAN_AGENT);
......
......@@ -159,7 +159,7 @@ extern "C" {
#define DEBUG_RLC (1<<13)
#define DEBUG_DLSCH_DECOD (1<<14)
#define UE_TIMING (1<<20)
#define DEBUG_ENB_SS (1<<21)
#define LOG_MASKMAP_INIT {\
{"PRACH", DEBUG_PRACH},\
......@@ -178,6 +178,7 @@ extern "C" {
{"RLC", DEBUG_RLC},\
{"DLSCH_DECOD", DEBUG_DLSCH_DECOD},\
{"UE_TIMING", UE_TIMING},\
{"ENB_SS", DEBUG_ENB_SS},\
{NULL,-1}\
}
......@@ -225,6 +226,7 @@ typedef enum {
RAL_ENB,
RAL_UE,
ENB_APP,
ENB_SS,
MCE_APP,
MME_APP,
FLEXRAN_AGENT,
......
......@@ -609,6 +609,27 @@ ID = LEGACY_ENB_APP_TRACE
GROUP = ALL:LEGACY_ENB_APP:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
ID = LEGACY_ENB_SS_INFO
DESC = ENB_SS legacy logs - info level
GROUP = ALL:LEGACY_ENB_SS:LEGACY_GROUP_INFO:LEGACY
FORMAT = string,log
ID = LEGACY_ENB_SS_ERROR
DESC = ENB_SS legacy logs - error level
GROUP = ALL:LEGACY_ENB_SS:LEGACY_GROUP_ERROR:LEGACY
FORMAT = string,log
ID = LEGACY_ENB_SS_WARNING
DESC = ENB_SS legacy logs - warning level
GROUP = ALL:LEGACY_ENB_SS:LEGACY_GROUP_WARNING:LEGACY
FORMAT = string,log
ID = LEGACY_ENB_SS_DEBUG
DESC = ENB_SS legacy logs - debug level
GROUP = ALL:LEGACY_ENB_SS:LEGACY_GROUP_DEBUG:LEGACY
FORMAT = string,log
ID = LEGACY_ENB_SS_TRACE
DESC = ENB_SS legacy logs - trace level
GROUP = ALL:LEGACY_ENB_SS:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
ID = LEGACY_GNB_APP_INFO
DESC = GNB_APP legacy logs - info level
GROUP = ALL:LEGACY_GNB_APP:LEGACY_GROUP_INFO:LEGACY
......
......@@ -43,7 +43,6 @@
#include "common/utils/LOG/log.h"
#include "rrc_eNB_UE_context.h"
#include "pdcp.h"
#include "msc.h"
#include "common/ran_context.h"
#include "intertask_interface.h"
......
......@@ -34,7 +34,6 @@
#include "common/utils/LOG/log.h"
#include "rrc_eNB_UE_context.h"
#include "pdcp.h"
#include "msc.h"
#include "common/ran_context.h"
#include "intertask_interface.h"
......
......@@ -44,7 +44,6 @@
#include "common/utils/LOG/log.h"
#include "rrc_eNB_UE_context.h"
#include "pdcp.h"
#include "msc.h"
#include "intertask_interface.h"
......
......@@ -58,7 +58,6 @@
#include "rlc.h"
#include "rrc_eNB_UE_context.h"
#include "platform_types.h"
#include "msc.h"
#include "LTE_SL-CommConfig-r12.h"
#include "LTE_PeriodicBSR-Timer-r12.h"
#include "LTE_RetxBSR-Timer-r12.h"
......
......@@ -32,7 +32,6 @@
# include "RRC/LTE/MESSAGES/asn1_msg.h"
# include "rrc_eNB_GTPV1U.h"
# include "rrc_eNB_UE_context.h"
# include "msc.h"
#include "asn1_conversions.h"
#include "intertask_interface.h"
......
......@@ -32,7 +32,6 @@
# include "RRC/LTE/MESSAGES/asn1_msg.h"
# include "rrc_eNB_M2AP.h"
//# include "rrc_eNB_UE_context.h"
# include "msc.h"
# include "asn1_conversions.h"
# include "intertask_interface.h"
# include "common/ran_context.h"
......
......@@ -47,7 +47,6 @@
#include "pdcp_primitives.h"
#include "UTIL/OSA/osa_defs.h"
#include "msc.h"
#include "LTE_UERadioAccessCapabilityInformation.h"
......
......@@ -35,7 +35,6 @@
#include "common/utils/LOG/log.h"
#include "rrc_eNB_UE_context.h"
#include "msc.h"
//------------------------------------------------------------------------------
void
......
......@@ -70,7 +70,6 @@
#include "rlc.h"
#include "rrc_eNB_UE_context.h"
#include "platform_types.h"
#include "msc.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "T.h"
......
......@@ -61,18 +61,38 @@ enum MsgUserId
MSG_SysProcess_userId = 1,
};
extern SSConfigContext_t SS_context;
/*
* Function : ss_dumpReqMsg
* Description: Function for print the received message
* In :
* req -
* Out:
* newState: No impact on state machine.
*
*/
static void ss_dumpReqMsg(struct SYSTEM_CTRL_REQ *msg)
{
LOG_A(RRC, "SysProcess: received from the TTCN\n");
LOG_A(RRC, "\tCommon:\n");
LOG_A(RRC, "\t\tCellId=%d\n", msg->Common.CellId);
LOG_A(RRC, "\t\tRoutingInfo=%d\n", msg->Common.RoutingInfo.d);
LOG_A(RRC, "\t\tTimingInfo=%d\n", msg->Common.TimingInfo.d);
LOG_A(RRC, "\t\tCnfFlag=%d\n", msg->Common.ControlInfo.CnfFlag);
LOG_A(RRC, "\t\tFollowOnFlag=%d\n", msg->Common.ControlInfo.FollowOnFlag);
LOG_A(RRC, "\tRequest=%d\n", msg->Request.d);
LOG_A(ENB_SS, "SysProcess: received from the TTCN\n");
LOG_A(ENB_SS, "\tCommon:\n");
LOG_A(ENB_SS, "\t\tCellId=%d\n", msg->Common.CellId);
LOG_A(ENB_SS, "\t\tRoutingInfo=%d\n", msg->Common.RoutingInfo.d);
LOG_A(ENB_SS, "\t\tTimingInfo=%d\n", msg->Common.TimingInfo.d);
LOG_A(ENB_SS, "\t\tCnfFlag=%d\n", msg->Common.ControlInfo.CnfFlag);
LOG_A(ENB_SS, "\t\tFollowOnFlag=%d\n", msg->Common.ControlInfo.FollowOnFlag);
LOG_A(ENB_SS, "\tRequest=%d\n", msg->Request.d);
}
/*
* Function : ss_port_man_send_cnf
* Description: Function for sending the confirmation to the TTCN on the basis of
* particular messages
* In :
* req -
* Out:
* newState: No impact on state machine.
*
*/
void ss_port_man_send_cnf(struct SYSTEM_CTRL_CNF recvCnf)
{
struct SYSTEM_CTRL_CNF cnf;
......@@ -91,7 +111,7 @@ void ss_port_man_send_cnf(struct SYSTEM_CTRL_CNF recvCnf)
cnf.Common.Result.d = recvCnf.Common.Result.d;
cnf.Common.Result.v.Success = recvCnf.Common.Result.v.Success;
cnf.Confirm.d = recvCnf.Confirm.d;
LOG_A(RRC, "[SS-PORTMAN] Attn CNF received cellId %d result %d type %d \n",
LOG_A(ENB_SS, "[SS-PORTMAN] Attn CNF received cellId %d result %d type %d \n",
cnf.Common.CellId,cnf.Common.Result.d, recvCnf.Confirm.d);
switch (recvCnf.Confirm.d)
{
......@@ -136,7 +156,7 @@ void ss_port_man_send_cnf(struct SYSTEM_CTRL_CNF recvCnf)
case SystemConfirm_Type_OCNG_Config:
case SystemConfirm_Type_DirectIndicationInfo:
default:
LOG_A(RRC, "[SYS] Error not handled CNF TYPE to [SS-PORTMAN] %d \n", recvCnf.Confirm.d);
LOG_A(ENB_SS, "[SYS] Error not handled CNF TYPE to [SS-PORTMAN] %d \n", recvCnf.Confirm.d);
}
/* Encode message
......@@ -151,21 +171,28 @@ void ss_port_man_send_cnf(struct SYSTEM_CTRL_CNF recvCnf)
status = acpSendMsg(ctx_g, msgSize, buffer);
if (status != 0)
{
LOG_A(RRC, "[SS-PORTMAN] acpSendMsg failed. Error : %d on fd: %d\n",
LOG_A(ENB_SS, "[SS-PORTMAN] acpSendMsg failed. Error : %d on fd: %d\n",
status, acpGetSocketFd(ctx_g));
acpFree(buffer);
return;
}
else
{
LOG_A(RRC, "[SS-PORTMAN] acpSendMsg Success \n");
LOG_A(ENB_SS, "[SS-PORTMAN] acpSendMsg Success \n");
}
// Free allocated buffer
acpFree(buffer);
}
//------------------------------------------------------------------------------
// Function to send response to the SIDL client
/*
* Function : ss_port_man_send_cnf
* Description: Function to send response to the TTCN/SIDL CLient
* In :
* req -
* Out:
* newState: No impact on state machine.
*
*/
void ss_port_man_send_data(
instance_t instance,
task_id_t task_id,
......@@ -224,24 +251,32 @@ void ss_port_man_send_data(
status = acpSendMsg(ctx_g, msgSize, buffer);
if (status != 0)
{
LOG_A(RRC, "[SS-PORTMAN] acpSendMsg failed. Error : %d on fd: %d\n",
LOG_A(ENB_SS, "[SS-PORTMAN] acpSendMsg failed. Error : %d on fd: %d\n",
status, acpGetSocketFd(ctx_g));
acpFree(buffer);
return;
}
else
{
LOG_A(RRC, "[SS-PORTMAN] acpSendMsg Success \n");
LOG_A(ENB_SS, "[SS-PORTMAN] acpSendMsg Success \n");
}
// Free allocated buffer
acpFree(buffer);
}
//------------------------------------------------------------------------------
/*
* Function : ss_eNB_port_man_init
* Description: Function to initilize the portman task
* In :
* req -
* Out:
* newState: No impact on state machine.
*
*/
void ss_eNB_port_man_init(void)
{
IpAddress_t ipaddr;
LOG_A(RRC, "[SS-PORTMAN] Starting System Simulator Manager\n");
LOG_A(ENB_SS, "[SS-PORTMAN] Starting System Simulator Manager\n");
const char *hostIp;
hostIp = RC.ss.hostIp;
......@@ -266,18 +301,26 @@ void ss_eNB_port_man_init(void)
int ret = acpServerInitWithCtx(ipaddr, port, msgTable, aSize, &ctx_g);
if (ret < 0)
{
LOG_A(RRC, "[SS-PORTMAN] Connection failure err=%d\n", ret);
LOG_A(ENB_SS, "[SS-PORTMAN] Connection failure err=%d\n", ret);
return;
}
int fd1 = acpGetSocketFd(ctx_g);
LOG_A(RRC, "[SS-PORTMAN] Connection performed : %d\n", fd1);
LOG_A(ENB_SS, "[SS-PORTMAN] Connection performed : %d\n", fd1);
//itti_subscribe_event_fd(TASK_SS_PORTMAN, fd1);
itti_mark_task_ready(TASK_SS_PORTMAN);
}
//------------------------------------------------------------------------------
/*
* Function : ss_eNB_read_from_socket
* Description: Function to read from the Socket
* In :
* req -
* Out:
* newState: No impact on state machine.
*
*/
static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
{
struct SYSTEM_CTRL_REQ *req = NULL;
......@@ -316,7 +359,7 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
//Send Dummy Wake up ITTI message to SRB task.
if (RC.ss.mode >= SS_SOFTMODEM && RC.ss.State >= SS_STATE_CELL_ACTIVE)
{
LOG_A(RRC,"[SS-PORTMAN] Sending Wake up signal to SRB task \n");
LOG_A(ENB_SS,"[SS-PORTMAN] Sending Wake up signal to SRB task \n");
MessageDef *message_p = itti_alloc_new_message(TASK_SS_PORTMAN, INSTANCE_DEFAULT, SS_RRC_PDU_IND);
if (message_p)
{
......@@ -330,14 +373,14 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
int send_res = itti_send_msg_to_task(TASK_SS_SRB, INSTANCE_DEFAULT, message_p);
if (send_res < 0)
{
LOG_A(RRC, "Error in itti_send_msg_to_task");
LOG_A(ENB_SS, "Error in itti_send_msg_to_task");
}
}
}
}
else
{
LOG_A(RRC, "[SS-PORTMAN] received msg %d from the client.\n", userId);
LOG_A(ENB_SS, "[SS-PORTMAN] received msg %d from the client.\n", userId);
if (acpSysProcessDecSrv(ctx, buffer, msgSize, &req) != 0)
return;
......@@ -358,7 +401,15 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
return;
}
//------------------------------------------------------------------------------
/*
* Function : ss_port_man_process_itti_msg
* Description: Function to process ITTI messages received from the TTCN
* In :
* req - request recived from the TTCN
* Out:
* newState: No impact on state machine.
*
*/
void *ss_port_man_process_itti_msg(void *notUsed)
{
MessageDef *received_msg = NULL;
......@@ -370,13 +421,13 @@ void *ss_port_man_process_itti_msg(void *notUsed)
if (received_msg != NULL)
{
LOG_A(RRC, "[SS-PORTMAN] Received a message id : %d \n",
LOG_A(ENB_SS, "[SS-PORTMAN] Received a message id : %d \n",
ITTI_MSG_ID(received_msg));
switch (ITTI_MSG_ID(received_msg))
{
case SS_SET_TIM_INFO:
{
LOG_A(RRC, "Received timing info \n");
LOG_A(ENB_SS, "Received timing info \n");
ss_port_man_send_data(0, 0, &received_msg->ittiMsg.ss_set_timinfo);
result = itti_free(ITTI_MSG_ORIGIN_ID(received_msg), received_msg);
}
......@@ -384,7 +435,7 @@ void *ss_port_man_process_itti_msg(void *notUsed)
case SS_SYS_PORT_MSG_CNF:
{
LOG_A(RRC, "Received SS_SYS_PORT_MSG_CNF \n");
LOG_A(ENB_SS, "Received SS_SYS_PORT_MSG_CNF \n");
ss_port_man_send_cnf(*(SS_SYS_PORT_MSG_CNF(received_msg).cnf));
result = itti_free(ITTI_MSG_ORIGIN_ID(received_msg), received_msg);
}
......@@ -395,7 +446,7 @@ void *ss_port_man_process_itti_msg(void *notUsed)
break;
default:
LOG_A(RRC, "Received unhandled message %d:%s\n",
LOG_A(ENB_SS, "Received unhandled message %d:%s\n",
ITTI_MSG_ID(received_msg), ITTI_MSG_NAME(received_msg));
break;
}
......@@ -410,7 +461,16 @@ void *ss_port_man_process_itti_msg(void *notUsed)
return NULL;
}
//------------------------------------------------------------------------------
/*
* Function : ss_eNB_port_man_task
* Description: The TASK_SS_PORTMAN main function handler. Initilizes
* the TASK_SS_PORTMAN state machine Init_State. Invoke the itti message
* In :
* req - request recived from the TTCN
* Out:
* newState: No impact on state machine.
*
*/
void *ss_eNB_port_man_task(void *arg)
{
ss_eNB_port_man_init();
......
This diff is collapsed.
This diff is collapsed.
......@@ -39,6 +39,15 @@ enum MsgUserId {
MSG_VngProcess_userId = 1,
};
/*
* Function : ss_vng_send_cnf
* Description: Funtion to send the response to the TTCN/SIDL Client
* In :
* req - ITTI message received from the TTCN via PORTMAN
* Out:
* newState: No impact on state machine.
*
*/
void ss_vng_send_cnf(uint8_t status, EUTRA_CellId_Type CellId)
{
struct EUTRA_VNG_CTRL_CNF cnf;
......@@ -62,7 +71,7 @@ void ss_vng_send_cnf(uint8_t status, EUTRA_CellId_Type CellId)
cnf.Common.Result.v.Error = 1; /** TODO: A dummy value */
cnf.Confirm = false;
}
LOG_A(RRC, "[VNG] VNG CNF received cellId %d result %d \n",
LOG_A(ENB_SS, "[VNG] VNG CNF received cellId %d result %d \n",
cnf.Common.CellId,cnf.Common.Result.d);
/* Encode message
......@@ -77,19 +86,28 @@ void ss_vng_send_cnf(uint8_t status, EUTRA_CellId_Type CellId)
status = acpSendMsg(ctx_vng_g, msgSize, buffer);
if (status != 0)
{
LOG_A(RRC, "[VNG] acpSendMsg failed. Error : %d on fd: %d\n",
LOG_A(ENB_SS, "[VNG] acpSendMsg failed. Error : %d on fd: %d\n",
status, acpGetSocketFd(ctx_vng_g));
acpFree(buffer);
return;
}
else
{
LOG_A(RRC, "[VNG] acpSendMsg Success \n");
LOG_A(ENB_SS, "[VNG] acpSendMsg Success \n");
}
// Free allocated buffer
acpFree(buffer);
}
/*
* Function : vng_ss_configure_cell
* Description: Funtion to configured cell and send SS_VNG_PROXY_REQ message to SYS Task
* In :
* req :
* Out:
* newState: No impact on state machine.
*
*/
static inline void
vng_ss_configure_cell (EUTRA_CellId_Type CellId, Dl_Bandwidth_Type Bandwidth,
int32_t NocLevel, VngProxyCmd_e cmd)
......@@ -105,15 +123,24 @@ vng_ss_configure_cell (EUTRA_CellId_Type CellId, Dl_Bandwidth_Type Bandwidth,
int res = itti_send_msg_to_task(TASK_SYS, INSTANCE_DEFAULT, message_p);
if (res < 0)
{
LOG_A(RRC, "[SS-VNG] Error in itti_send_msg_to_task\n");
LOG_A(ENB_SS, "[SS-VNG] Error in itti_send_msg_to_task\n");
}
else
{
LOG_A(RRC, "[SS-VNG] Send ITTI message to %s\n", ITTI_MSG_DESTINATION_NAME(message_p));
LOG_A(ENB_SS, "[SS-VNG] Send ITTI message to %s\n", ITTI_MSG_DESTINATION_NAME(message_p));
}
}
//------------------------------------------------------------------------------
/*
* Function : ss_eNB_read_from_vng_socket
* Description: Funtion to read from VNG Socket and call the handler function related
* to particular message
* In :
* req : Request received from VNG task
* Out:
* newState: No impact on state machine.
*
*/
static inline void
ss_eNB_read_from_vng_socket(acpCtx_t ctx)
{
......@@ -128,7 +155,7 @@ ss_eNB_read_from_vng_socket(acpCtx_t ctx)
while (1)
{
int userId = acpRecvMsg(ctx, &msgSize, buffer);
LOG_A(RRC, "[SS-VNG] Received msgSize=%d, userId=%d\n", (int)msgSize, userId);
LOG_A(ENB_SS, "[SS-VNG] Received msgSize=%d, userId=%d\n", (int)msgSize, userId);
// Error handling
if (userId < 0)
......@@ -147,7 +174,7 @@ ss_eNB_read_from_vng_socket(acpCtx_t ctx)
}
else
{
LOG_A(RRC, "[SS-VNG] Invalid userId: %d \n", userId);
LOG_A(ENB_SS, "[SS-VNG] Invalid userId: %d \n", userId);
break;
}
}
......@@ -159,39 +186,39 @@ ss_eNB_read_from_vng_socket(acpCtx_t ctx)
}
else if (userId == MSG_VngProcess_userId)
{
LOG_A(RRC, "[SS-VNG] Received VNG Control Request\n");
LOG_A(ENB_SS, "[SS-VNG] Received VNG Control Request\n");
if (acpVngProcessDecSrv(ctx, buffer, msgSize, &req) != 0)
{
LOG_A(RRC, "[SS-VNG] acpVngProcessDecSrv failed\n");
LOG_A(ENB_SS, "[SS-VNG] acpVngProcessDecSrv failed\n");
break;
}
if (RC.ss.State < SS_STATE_CELL_ACTIVE) {
LOG_A(RRC, "[SS-VNG] Request received in an invalid state: %d \n", RC.ss.State);
LOG_A(ENB_SS, "[SS-VNG] Request received in an invalid state: %d \n", RC.ss.State);
break;
}
/** TODO: Dump message here */
switch (req->Request.d)
{
case EUTRA_VngConfigRequest_Type_Configure:
LOG_A(RRC, "[SS-VNG] Received Configure request\n");
LOG_A(ENB_SS, "[SS-VNG] Received Configure request\n");
vng_ss_configure_cell(req->Common.CellId, req->Request.v.Configure.Bandwidth,
req->Request.v.Configure.NocLevel, (VngProxyCmd_e)EUTRA_VngConfigRequest_Type_Configure);
break;
case EUTRA_VngConfigRequest_Type_Activate:
LOG_A(RRC, "[SS-VNG] Received Activate request\n");
LOG_A(ENB_SS, "[SS-VNG] Received Activate request\n");
vng_ss_configure_cell(req->Common.CellId, (0xFF),
(0xFFFF), (VngProxyCmd_e)EUTRA_VngConfigRequest_Type_Activate);
break;
case EUTRA_VngConfigRequest_Type_Deactivate:
LOG_A(RRC, "[SS-VNG] Received Deactivate request\n");
LOG_A(ENB_SS, "[SS-VNG] Received Deactivate request\n");
vng_ss_configure_cell(req->Common.CellId, (0xFF),
(0xFFFF), (VngProxyCmd_e)EUTRA_VngConfigRequest_Type_Deactivate);
break;
case EUTRA_VngConfigRequest_Type_UNBOUND_VALUE:
default:
LOG_A(RRC, "[SS-VNG] Received unhandled message in VNG Port\n");
LOG_A(ENB_SS, "[SS-VNG] Received unhandled message in VNG Port\n");
}
if (req->Request.d == EUTRA_VngConfigRequest_Type_UNBOUND_VALUE || req->Request.d > EUTRA_VngConfigRequest_Type_Deactivate)
......@@ -202,7 +229,15 @@ ss_eNB_read_from_vng_socket(acpCtx_t ctx)
//acpVngProcessFreeSrv(req);
}
/*
* Function : ss_eNB_vng_process_itti_msg
* Description: Funtion Handles the ITTI message received from the TTCN on SYS Port
* In :
* req : ITTI message received from the TTCN via PORTMAN
* Out:
* newState: No impact on state machine.
*
*/
void *ss_eNB_vng_process_itti_msg(void *notUsed)
{
MessageDef *received_msg = NULL;
......@@ -216,7 +251,7 @@ void *ss_eNB_vng_process_itti_msg(void *notUsed)
{
case SS_VNG_PROXY_RESP:
{
LOG_A(RRC, "[SS-VNG] Response receieved from %s CellId: %d Status: %d\n",
LOG_A(ENB_SS, "[SS-VNG] Response receieved from %s CellId: %d Status: %d\n",
ITTI_MSG_ORIGIN_NAME(received_msg), SS_VNG_PROXY_RESP(received_msg).cell_id,
SS_VNG_PROXY_RESP(received_msg).status);
......@@ -231,7 +266,7 @@ void *ss_eNB_vng_process_itti_msg(void *notUsed)
break;
}
default:
LOG_A(RRC, "[VNG] Received unhandled message %d:%s\n",
LOG_A(ENB_SS, "[VNG] Received unhandled message %d:%s\n",
ITTI_MSG_ID(received_msg), ITTI_MSG_NAME(received_msg));
}
}
......@@ -241,7 +276,15 @@ void *ss_eNB_vng_process_itti_msg(void *notUsed)
return NULL;
}
//------------------------------------------------------------------------------
/*
* Function : ss_eNB_vng_init
* Description: Funtion Handles the initilization of VNG task
* In :
* req :
* Out:
* newState: No impact on state machine.
*
*/
void ss_eNB_vng_init(void)
{
IpAddress_t ipaddr;
......@@ -253,7 +296,7 @@ void ss_eNB_vng_init(void)
// Port number
int port = RC.ss.Vngport;
LOG_A(RRC, "[SS-VNG] Initializing VNG Port %s:%d\n", hostIp, port);
LOG_A(ENB_SS, "[SS-VNG] Initializing VNG Port %s:%d\n", hostIp, port);
//acpInit(malloc, free, 1000);
......@@ -272,21 +315,29 @@ void ss_eNB_vng_init(void)
int ret = acpServerInitWithCtx(ipaddr, port, msgTable, aSize, &ctx_vng_g);
if (ret < 0)
{
LOG_A(RRC, "[SS-VNG] Connection failure err=%d\n", ret);
LOG_A(ENB_SS, "[SS-VNG] Connection failure err=%d\n", ret);
return;
}
#ifdef ACP_DEBUG_DUMP_MSGS /** TODO: Need to verify */
adbgSetPrintLogFormat(ctx, true);
#endif
int fd1 = acpGetSocketFd(ctx_vng_g);
LOG_A(RRC, "[SS-VNG] Connected: %d\n", fd1);
LOG_A(ENB_SS, "[SS-VNG] Connected: %d\n", fd1);
//itti_subscribe_event_fd(TASK_VNG, fd1);
itti_mark_task_ready(TASK_VNG);
}
//------------------------------------------------------------------------------
/*
* Function : ss_eNB_vng_task
* Description: Funtion Handles the VNG Task
* In :
* req :
* Out:
* newState: No impact on state machine.
*
*/
void *ss_eNB_vng_task(void *arg)
{
ss_eNB_vng_init();
......
......@@ -37,7 +37,6 @@
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#include "assertions.h"
#include "msc.h"
#include "PHY/types.h"
......
......@@ -23,7 +23,6 @@
#include "../../ARCH/COMMON/common_lib.h"
//#undef MALLOC
#include "assertions.h"
#include "msc.h"
#include "PHY/types.h"
#include "PHY/defs_eNB.h"
#include "PHY/defs_UE.h"
......
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