Commit 8c74bd92 authored by jperaldi's avatar jperaldi

1) Following Anton's request with new SIDL interface: ACP_PEER_DISCONNECTED &...

1) Following Anton's request with new SIDL interface: ACP_PEER_DISCONNECTED & ACP_PEER_CONNECTED shall not be considered as ERROR. Port manager source ode updated
2) I shall embedd Yangxiong work on lttng. These devs cause NR to not compile, because lttng ust lib is not embedded: SOLVED
3) for the first time 8.1.1.2 (DRB) is fully PASSED: need to go deeper
parent ad6fd431
......@@ -203,7 +203,13 @@ ss_eNB_read_from_drb_socket(acpCtx_t ctx){
SidlStatus sidlStatus = -1;
acpGetMsgSidlStatus(msgSize, buffer, &sidlStatus);
}
else
else if (userId == -ACP_PEER_DISCONNECTED){
LOG_A(GNB_APP, "[SS_SRB] Peer ordered shutdown\n");
}
else if (userId == -ACP_PEER_CONNECTED){
LOG_A(GNB_APP, "[SS_SRB] Peer connection established\n");
}
else
{
LOG_A(ENB_APP, "[SS_DRB] Invalid userId: %d \n", userId);
break;
......
......@@ -348,6 +348,12 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
SidlStatus sidlStatus = -1;
acpGetMsgSidlStatus(msgSize, buffer, &sidlStatus);
}
else if (userId == -ACP_PEER_DISCONNECTED){
LOG_A(GNB_APP, "[SS_SRB] Peer ordered shutdown\n");
}
else if (userId == -ACP_PEER_CONNECTED){
LOG_A(GNB_APP, "[SS_SRB] Peer connection established\n");
}
else
{
return;
......
......@@ -296,6 +296,7 @@ static void ss_task_handle_rrc_pdu_req(struct EUTRA_RRC_PDU_REQ *req)
* newState: No impack on the State
*
*/
static bool isConnected = false;
static inline void
ss_eNB_read_from_srb_socket(acpCtx_t ctx)
{
......@@ -321,6 +322,14 @@ ss_eNB_read_from_srb_socket(acpCtx_t ctx)
SidlStatus sidlStatus = -1;
acpGetMsgSidlStatus(msgSize, buffer, &sidlStatus);
}
else if (userId == -ACP_PEER_DISCONNECTED){
LOG_A(GNB_APP, "[SS_SRB] Peer ordered shutdown\n");
isConnected = false;
}
else if (userId == -ACP_PEER_CONNECTED){
LOG_A(GNB_APP, "[SS_SRB] Peer connection established\n");
isConnected = true;
}
else
{
LOG_A(ENB_SS, "[SS_SRB] Invalid userId: %d \n", userId);
......@@ -331,7 +340,9 @@ ss_eNB_read_from_srb_socket(acpCtx_t ctx)
if (userId == 0)
{
// No message (timeout on socket)
break;
if (isConnected == true){
break;
}
}
else if (MSG_SysSrbProcessFromSS_userId == userId)
{
......
......@@ -172,6 +172,12 @@ ss_eNB_read_from_vng_socket(acpCtx_t ctx)
SidlStatus sidlStatus = -1;
acpGetMsgSidlStatus(msgSize, buffer, &sidlStatus);
}
else if (userId == -ACP_PEER_DISCONNECTED){
LOG_A(GNB_APP, "[SS_SRB] Peer ordered shutdown\n");
}
else if (userId == -ACP_PEER_CONNECTED){
LOG_A(GNB_APP, "[SS_SRB] Peer connection established\n");
}
else
{
LOG_A(ENB_SS, "[SS-VNG] Invalid userId: %d \n", userId);
......
......@@ -292,6 +292,12 @@ static inline void ss_eNB_read_from_vtp_socket(acpCtx_t ctx)
SidlStatus sidlStatus = -1;
acpGetMsgSidlStatus(msgSize, buffer, &sidlStatus);
}
else if (userId == -ACP_PEER_DISCONNECTED){
LOG_A(GNB_APP, "[SS_SRB] Peer ordered shutdown\n");
}
else if (userId == -ACP_PEER_CONNECTED){
LOG_A(GNB_APP, "[SS_SRB] Peer connection established\n");
}
// else
// {
// LOG_A(ENB_APP, "[SS-VTP] Invalid userId: %d \n", userId);
......
......@@ -63,9 +63,7 @@ uint16_t ss_rnti_g = 0;
typedef enum {
// user defined IDs should be an int number >= 1
MSG_TestHelloFromSS_userId = 1,
/* MSG_SysProcess_userId, */
MSG_NrSysSrbProcessFromSS_userId,
MSG_NrSysSrbProcessFromSS_userId = 1,
MSG_NrSysSrbProcessToSS_userId,
} MSG_userId;
......@@ -232,6 +230,8 @@ static void ss_task_handle_rrc_pdu_req(struct NR_RRC_PDU_REQ *req)
//------------------------------------------------------------------------------
static bool isConnected = false;
static inline void
ss_gNB_read_from_srb_socket(acpCtx_t ctx)
{
......@@ -256,18 +256,27 @@ ss_gNB_read_from_srb_socket(acpCtx_t ctx)
// this error should not appear on server side for the messages received from clients
SidlStatus sidlStatus = -1;
acpGetMsgSidlStatus(msgSize, buffer, &sidlStatus);
}
} else if (userId == -ACP_PEER_DISCONNECTED){
LOG_A(GNB_APP, "[SS_SRB] Peer ordered shutdown\n");
isConnected = false;
}
else if (userId == -ACP_PEER_CONNECTED){
LOG_A(GNB_APP, "[SS_SRB] Peer connection established\n");
isConnected = true;
}
else
{
LOG_A(GNB_APP, "[SS_SRB] Invalid userId: %d \n", userId);
break;
}
}
if (userId == 0)
{
LOG_A(GNB_APP, "[SS_SRB] No message (timeout on socket\n)");
// No message (timeout on socket)
break;
if (isConnected == true){
break;
}
}
else if (MSG_NrSysSrbProcessFromSS_userId == userId)
{
......@@ -296,11 +305,6 @@ ss_gNB_read_from_srb_socket(acpCtx_t ctx)
LOG_A(GNB_APP, "[SS_SRB][NR_RRC_PDU_IND] NR_RRC_PDU_IND Received; ignoring \n");
break;
}
else if (userId == MSG_TestHelloFromSS_userId)
{
LOG_A(GNB_APP, "[SS_SRB] Hello From Client Received \n");
break;
}
}
}
......@@ -323,7 +327,6 @@ void ss_gNB_srb_init(void)
const struct acpMsgTable msgTable[] = {
{ "NrSysSrbProcessFromSS", MSG_NrSysSrbProcessFromSS_userId },
{ "NrSysSrbProcessToSS", MSG_NrSysSrbProcessToSS_userId },
{ "TestHelloFromSS", MSG_TestHelloFromSS_userId },
/* { "SysProcess", MSG_SysProcess_userId }, */
// The last element should be NULL
{ NULL, 0 }
......@@ -410,25 +413,9 @@ void *ss_gNB_srb_process_itti_msg(void *notUsed)
return NULL;
}
static void ss_gNB_wait_hello(void)
{
while (1)
{
size_t msg_sz = size;
int ret = acpRecvMsg(ctx_srb_g, &msg_sz, buffer);
if (ret == MSG_TestHelloFromSS_userId)
{
LOG_A(GNB_APP, "[SS_SRB] Hello From Client Received (on-start) \n");
break;
}
}
}
void *ss_gNB_srb_task(void *arg)
{
ss_gNB_srb_init();
ss_gNB_wait_hello();
while (1)
{
......
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