Commit 5a2b791a authored by Vaibhav Shrivastava's avatar Vaibhav Shrivastava

Uplift 1.1-98 SIDL

parent bb4bdc2b
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 ="analysis";
mac_log_verbosity ="low";
rlc_log_level ="warn";
rlc_log_verbosity ="low";
pdcp_log_level ="analysis";
pdcp_log_verbosity ="low";
rrc_log_level ="analysis";
rrc_log_verbosity ="full";
};
...@@ -115,4 +115,7 @@ int acpCtxGetMsgKindFromId(int id); ...@@ -115,4 +115,7 @@ int acpCtxGetMsgKindFromId(int id);
/** Gets sidl name from local id. */ /** Gets sidl name from local id. */
const char* acpCtxGetItfNameFrom_localId(int id); const char* acpCtxGetItfNameFrom_localId(int id);
/** Gets message kind from name */
int acpCtxGetMsgKindFromName(const char* name);
SIDL_END_C_INTERFACE SIDL_END_C_INTERFACE
...@@ -40,6 +40,7 @@ enum acpMsgLocalId { ...@@ -40,6 +40,7 @@ enum acpMsgLocalId {
ACP_LID_DrbProcessToSS = 0x90040601, ACP_LID_DrbProcessToSS = 0x90040601,
ACP_LID_HandshakeHandleFromSS = 0x90040700, ACP_LID_HandshakeHandleFromSS = 0x90040700,
ACP_LID_HandshakeHandleToSS = 0x90040701, ACP_LID_HandshakeHandleToSS = 0x90040701,
ACP_LID_SysIndProcessToSS = 0x90040800
}; };
SIDL_END_C_INTERFACE SIDL_END_C_INTERFACE
/*
* Copyright 2022 Sequans Communications.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include "SIDL_EUTRA_SYSIND_PORT.h"
#include "acp.h"
SIDL_BEGIN_C_INTERFACE
int acpSysIndProcessToSSEncSrv(acpCtx_t _ctx, unsigned char* _buffer, size_t* _size, const struct SYSTEM_IND* ToSS);
int acpSysIndProcessToSSDecClt(acpCtx_t _ctx, const unsigned char* _buffer, size_t _size, struct SYSTEM_IND** ToSS);
void acpSysIndProcessToSSFreeClt(struct SYSTEM_IND* ToSS);
SIDL_END_C_INTERFACE
...@@ -15,5 +15,5 @@ ...@@ -15,5 +15,5 @@
*/ */
#pragma once #pragma once
#define ACP_VERSION "1.1.9" #define ACP_VERSION "1.1.35"
#define ACP_VERSION_CKSM "5a5ef81ec6e64dfdcd51f7b8afe4bc87" #define ACP_VERSION_CKSM "a9a0f226034ae05f898989c8caa88eb3"
...@@ -29,10 +29,10 @@ ...@@ -29,10 +29,10 @@
#include "acpInternal.h" #include "acpInternal.h"
#include "adbg.h" #include "adbg.h"
#include "adbgMsg.h" #include "adbgMsg.h"
#include "acpVer.h" #include "acpVer.h"
#include "acpHandshake.h" #include "acpHandshake.h"
// #define ACP_LOG_DEBUG(...) printf(__VA_ARGS__); // #define ACP_LOG_DEBUG(...) printf(__VA_ARGS__);
#define ACP_LOG_DEBUG(...) #define ACP_LOG_DEBUG(...)
...@@ -81,6 +81,16 @@ static bool acpPeerHandshaked(struct acpCtx* ctx, int peer) ...@@ -81,6 +81,16 @@ static bool acpPeerHandshaked(struct acpCtx* ctx, int peer)
return false; return false;
} }
static bool acpAnyPeerHandshaked(struct acpCtx* ctx)
{
for (int i = 0; i < ACP_MAX_PEER_QTY; i++) {
if (ctx->peersHandshaked[i] > 0) {
return true;
}
}
return false;
}
static void acpPeerSetHandshaked(struct acpCtx* ctx, int peer, int flag) static void acpPeerSetHandshaked(struct acpCtx* ctx, int peer, int flag)
{ {
for (int i = 0; i < ACP_MAX_PEER_QTY; i++) { for (int i = 0; i < ACP_MAX_PEER_QTY; i++) {
...@@ -91,6 +101,7 @@ static void acpPeerSetHandshaked(struct acpCtx* ctx, int peer, int flag) ...@@ -91,6 +101,7 @@ static void acpPeerSetHandshaked(struct acpCtx* ctx, int peer, int flag)
} }
} }
// ___________________________ / Interface // ___________________________ // ___________________________ / Interface // ___________________________
void* acpMalloc(size_t size) void* acpMalloc(size_t size)
...@@ -265,6 +276,8 @@ int acpGetMsgLocalId(size_t size, const unsigned char* buffer, enum acpMsgLocalI ...@@ -265,6 +276,8 @@ int acpGetMsgLocalId(size_t size, const unsigned char* buffer, enum acpMsgLocalI
return 0; return 0;
} }
#ifdef ACP_USE_HANDSHAKE
static int acpRecvMsgInternal(int sock, size_t size, unsigned char* buffer) static int acpRecvMsgInternal(int sock, size_t size, unsigned char* buffer)
{ {
int length = 0; int length = 0;
...@@ -482,6 +495,7 @@ static int acpConnectToSrv(struct acpCtx* ctx, int sock) ...@@ -482,6 +495,7 @@ static int acpConnectToSrv(struct acpCtx* ctx, int sock)
return ret; return ret;
} }
#endif
int acpRecvMsg(acpCtx_t ctx, size_t* size, unsigned char* buffer) int acpRecvMsg(acpCtx_t ctx, size_t* size, unsigned char* buffer)
{ {
...@@ -617,6 +631,7 @@ int acpRecvMsg(acpCtx_t ctx, size_t* size, unsigned char* buffer) ...@@ -617,6 +631,7 @@ int acpRecvMsg(acpCtx_t ctx, size_t* size, unsigned char* buffer)
int type = (int)((buffer[4] << 24) | (buffer[5] << 16) | (buffer[6] << 8) | (buffer[7])); int type = (int)((buffer[4] << 24) | (buffer[5] << 16) | (buffer[6] << 8) | (buffer[7]));
ACP_DEBUG_PREFIX_CLOG(ctx, "Receiving message '%s' (userId: %d, type: 0x%x)\r\n", acpGetMsgName(*size, buffer), userId, type); ACP_DEBUG_PREFIX_CLOG(ctx, "Receiving message '%s' (userId: %d, type: 0x%x)\r\n", acpGetMsgName(*size, buffer), userId, type);
#ifdef ACP_USE_HANDSHAKE
if (ACP_CTX_CAST(ctx)->isServer) { if (ACP_CTX_CAST(ctx)->isServer) {
bool handshaked = acpPeerHandshaked(ctx, sock); bool handshaked = acpPeerHandshaked(ctx, sock);
if(!handshaked && type != (int)ACP_LID_HandshakeHandleFromSS) { if(!handshaked && type != (int)ACP_LID_HandshakeHandleFromSS) {
...@@ -629,7 +644,7 @@ int acpRecvMsg(acpCtx_t ctx, size_t* size, unsigned char* buffer) ...@@ -629,7 +644,7 @@ int acpRecvMsg(acpCtx_t ctx, size_t* size, unsigned char* buffer)
struct AcpHandshake_Type *hs; struct AcpHandshake_Type *hs;
if(acpHandshakeHandleFromSSDecSrv(ctx, buffer, length + ACP_HEADER_SIZE, &hs) == 0) { if(acpHandshakeHandleFromSSDecSrv(ctx, buffer, length + ACP_HEADER_SIZE, &hs) == 0) {
ACP_DEBUG_CLOG(ctx, "ACP version: cli_version=[%s, cksm: %s] srv_version=[%s, chksm: %s].", hs->acpVersion, hs->acpVerCksm, ACP_VERSION, ACP_VERSION_CKSM); ACP_DEBUG_CLOG(ctx, "ACP version: cli_version=[%s, cksm: %s] srv_version=[%s, chksm: %s].", hs->acpVersion, hs->acpVerCksm, ACP_VERSION, ACP_VERSION_CKSM);
userId = acpHandleHandshakeFromClient(ctx, sock, hs); userId = acpHandleHandshakeFromClient(ctx, sock, hs);
acpHandshakeHandleFromSSFreeSrv(hs); acpHandshakeHandleFromSSFreeSrv(hs);
} else { } else {
...@@ -638,6 +653,7 @@ int acpRecvMsg(acpCtx_t ctx, size_t* size, unsigned char* buffer) ...@@ -638,6 +653,7 @@ int acpRecvMsg(acpCtx_t ctx, size_t* size, unsigned char* buffer)
} }
} }
} }
#endif
if (userId >= 0) { if (userId >= 0) {
#ifdef ACP_DEBUG #ifdef ACP_DEBUG
...@@ -652,7 +668,7 @@ int acpSendMsg(acpCtx_t ctx, size_t size, const unsigned char* buffer) ...@@ -652,7 +668,7 @@ int acpSendMsg(acpCtx_t ctx, size_t size, const unsigned char* buffer)
{ {
SIDL_ASSERT(buffer); SIDL_ASSERT(buffer);
ACP_DEBUG_ENTER_TRACE_CLOG(ctx); // ACP_DEBUG_ENTER_TRACE_CLOG(ctx);
if (!acpCtxIsValid(ctx)) { if (!acpCtxIsValid(ctx)) {
return -ACP_ERR_INVALID_CTX; return -ACP_ERR_INVALID_CTX;
...@@ -660,6 +676,11 @@ int acpSendMsg(acpCtx_t ctx, size_t size, const unsigned char* buffer) ...@@ -660,6 +676,11 @@ int acpSendMsg(acpCtx_t ctx, size_t size, const unsigned char* buffer)
int sock = ACP_CTX_CAST(ctx)->sock; int sock = ACP_CTX_CAST(ctx)->sock;
if (ACP_CTX_CAST(ctx)->isServer) { if (ACP_CTX_CAST(ctx)->isServer) {
if ( ACP_CTX_CAST(ctx)->lastPeer == -1) {
ACP_CTX_CAST(ctx)->lastPeer = acpSocketAccept(sock);
}
sock = ACP_CTX_CAST(ctx)->lastPeer; sock = ACP_CTX_CAST(ctx)->lastPeer;
if (sock == -1) { if (sock == -1) {
ACP_DEBUG_EXIT_TRACE_CLOG(ctx, "ACP_ERR_INVALID_CTX"); ACP_DEBUG_EXIT_TRACE_CLOG(ctx, "ACP_ERR_INVALID_CTX");
...@@ -683,7 +704,7 @@ int acpSendMsg(acpCtx_t ctx, size_t size, const unsigned char* buffer) ...@@ -683,7 +704,7 @@ int acpSendMsg(acpCtx_t ctx, size_t size, const unsigned char* buffer)
} }
*/ */
ACP_DEBUG_EXIT_TRACE_CLOG(ctx, NULL); // ACP_DEBUG_EXIT_TRACE_CLOG(ctx, NULL);
return 0; return 0;
} }
...@@ -701,6 +722,8 @@ int acpClientInit(acpCtx_t ctx, IpAddress_t ipaddr, int port, size_t aSize) ...@@ -701,6 +722,8 @@ int acpClientInit(acpCtx_t ctx, IpAddress_t ipaddr, int port, size_t aSize)
return -ACP_ERR_SOCKCONN_ABORTED; return -ACP_ERR_SOCKCONN_ABORTED;
} }
#ifdef ACP_USE_HANDSHAKE
int ret = acpConnectToSrv(ACP_CTX_CAST(ctx), sock); int ret = acpConnectToSrv(ACP_CTX_CAST(ctx), sock);
if (ret < 0) { if (ret < 0) {
acpSocketClose(sock); acpSocketClose(sock);
...@@ -715,6 +738,7 @@ int acpClientInit(acpCtx_t ctx, IpAddress_t ipaddr, int port, size_t aSize) ...@@ -715,6 +738,7 @@ int acpClientInit(acpCtx_t ctx, IpAddress_t ipaddr, int port, size_t aSize)
acpSocketClose(sock); acpSocketClose(sock);
return -ACP_ERR_NOT_CONNECTED; return -ACP_ERR_NOT_CONNECTED;
} }
#endif
#endif #endif
ACP_CTX_CAST(ctx)->sock = sock; ACP_CTX_CAST(ctx)->sock = sock;
...@@ -802,7 +826,9 @@ int acpServerInitWithCtx(IpAddress_t ipaddr, int port, const struct acpMsgTable* ...@@ -802,7 +826,9 @@ int acpServerInitWithCtx(IpAddress_t ipaddr, int port, const struct acpMsgTable*
ACP_DEBUG_EXIT_LOG("ACP_ERR_INVALID_CTX"); ACP_DEBUG_EXIT_LOG("ACP_ERR_INVALID_CTX");
return -ACP_ERR_INVALID_CTX; return -ACP_ERR_INVALID_CTX;
} }
#ifdef ACP_USE_HANDSHAKE
bool isOnlyNotify = true;
#endif
if (msgTable) { if (msgTable) {
while (msgTable->name) { while (msgTable->name) {
int err = acpSetMsgId(_ctx, msgTable->name, msgTable->userId); int err = acpSetMsgId(_ctx, msgTable->name, msgTable->userId);
...@@ -811,6 +837,18 @@ int acpServerInitWithCtx(IpAddress_t ipaddr, int port, const struct acpMsgTable* ...@@ -811,6 +837,18 @@ int acpServerInitWithCtx(IpAddress_t ipaddr, int port, const struct acpMsgTable*
ACP_DEBUG_EXIT_LOG("acpSetMsgId failed"); ACP_DEBUG_EXIT_LOG("acpSetMsgId failed");
return err; return err;
} }
#ifdef ACP_USE_HANDSHAKE
err = acpCtxGetMsgKindFromName(msgTable->name);
if (err < 0) {
acpDeleteCtx(_ctx);
ACP_DEBUG_EXIT_LOG("acpSetMsgId failed");
return err;
}
if (err > 0) {
isOnlyNotify = false;
}
#endif
msgTable++; msgTable++;
} }
} }
...@@ -824,6 +862,18 @@ int acpServerInitWithCtx(IpAddress_t ipaddr, int port, const struct acpMsgTable* ...@@ -824,6 +862,18 @@ int acpServerInitWithCtx(IpAddress_t ipaddr, int port, const struct acpMsgTable*
*ctx = _ctx; *ctx = _ctx;
#ifdef ACP_USE_HANDSHAKE
if (isOnlyNotify) {
int ret = -1;
ACP_DEBUG_CLOG(*ctx, "Wait for handshake\r\n");
while(!acpAnyPeerHandshaked(ACP_CTX_CAST(*ctx)) || ret > 0) {
uint8_t buffer[256] = {};
size_t sz = sizeof(buffer);
ret = acpRecvMsg(*ctx, &sz, buffer);
}
}
#endif
ACP_DEBUG_EXIT_LOG(NULL); ACP_DEBUG_EXIT_LOG(NULL);
return 0; return 0;
} }
......
...@@ -304,3 +304,11 @@ int acpCtxGetMsgKindFromId(int id) ...@@ -304,3 +304,11 @@ int acpCtxGetMsgKindFromId(int id)
if (index < 0 || index >= (int)acpIdMapSize) return -ACP_ERR_SIDL_FAILURE; if (index < 0 || index >= (int)acpIdMapSize) return -ACP_ERR_SIDL_FAILURE;
return acpIdMap[index].kind; return acpIdMap[index].kind;
} }
int acpCtxGetMsgKindFromName(const char* name)
{
int id = acpGetIndexFrom_name(name);
if (id < 0) return id;
return acpIdMap[id].kind;
}
...@@ -25,6 +25,7 @@ const struct acpIdMapItf acpItfMap[] = { ...@@ -25,6 +25,7 @@ const struct acpIdMapItf acpItfMap[] = {
{ "Vng", 5, 12, 1 }, { "Vng", 5, 12, 1 },
{ "Drb", 6, 13, 2 }, { "Drb", 6, 13, 2 },
{ "Handshake", 7, 15, 2 }, { "Handshake", 7, 15, 2 },
{ "SysInd", 8, 17, 1 },
}; };
const unsigned int acpItfMapSize = sizeof(acpItfMap) / sizeof(acpItfMap[0]); const unsigned int acpItfMapSize = sizeof(acpItfMap) / sizeof(acpItfMap[0]);
...@@ -63,7 +64,9 @@ struct acpIdMapService acpIdMap[] = { ...@@ -63,7 +64,9 @@ struct acpIdMapService acpIdMap[] = {
// Handshake (internale) part // Handshake (internale) part
{ "HandshakeHandleFromSS", 0x90040700, (unsigned int)-1, 1 }, { "HandshakeHandleFromSS", 0x90040700, (unsigned int)-1, 1 },
{ "HandshakeHandleToSS", 0x90040701, (unsigned int)-1, 0 } { "HandshakeHandleToSS", 0x90040701, (unsigned int)-1, 0 },
{ "SysIndProcessToSS", 0x90040800, (unsigned int)-1, 0},
}; };
const unsigned int acpIdMapSize = sizeof(acpIdMap) / sizeof(acpIdMap[0]); const unsigned int acpIdMapSize = sizeof(acpIdMap) / sizeof(acpIdMap[0]);
...@@ -37,7 +37,7 @@ int acpSocketConnect(IpAddress_t ipaddr, int port) ...@@ -37,7 +37,7 @@ int acpSocketConnect(IpAddress_t ipaddr, int port)
sin.sin_family = AF_INET; sin.sin_family = AF_INET;
sin.sin_port = htons(port); sin.sin_port = htons(port);
sin.sin_addr.s_addr = ntohl(ipaddr.v.ipv4); sin.sin_addr.s_addr = ntohl(ipaddr.v.ipv4);
int client_fd = -1;
int sock = socket(AF_INET, SOCK_STREAM, 0); int sock = socket(AF_INET, SOCK_STREAM, 0);
if (sock < 0) { if (sock < 0) {
ACP_DEBUG_EXIT_LOG(strerror(errno)); ACP_DEBUG_EXIT_LOG(strerror(errno));
...@@ -49,34 +49,29 @@ int acpSocketConnect(IpAddress_t ipaddr, int port) ...@@ -49,34 +49,29 @@ int acpSocketConnect(IpAddress_t ipaddr, int port)
const int keepalive_time = 30; const int keepalive_time = 30;
const int keepalive_intvl = 2; const int keepalive_intvl = 2;
const int keepalive_probes = 5; const int keepalive_probes = 5;
const int syn_retries = 2; // Send a total of 3 SYN packets => Timeout ~7s
if (setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, &keepalive, (socklen_t)sizeof(keepalive)) == -1) { if (setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, &keepalive, (socklen_t)sizeof(keepalive)) == -1) {
close(sock); goto _error;
ACP_DEBUG_EXIT_LOG(strerror(errno));
return -1;
} }
if (setsockopt(sock, IPPROTO_TCP, TCP_KEEPIDLE, &keepalive_time, (socklen_t)sizeof(keepalive_time)) == -1) { if (setsockopt(sock, IPPROTO_TCP, TCP_KEEPIDLE, &keepalive_time, (socklen_t)sizeof(keepalive_time)) == -1) {
close(sock); goto _error;
ACP_DEBUG_EXIT_LOG(strerror(errno));
return -1;
} }
if (setsockopt(sock, IPPROTO_TCP, TCP_KEEPINTVL, &keepalive_intvl, (socklen_t)sizeof(keepalive_intvl)) == -1) { if (setsockopt(sock, IPPROTO_TCP, TCP_KEEPINTVL, &keepalive_intvl, (socklen_t)sizeof(keepalive_intvl)) == -1) {
close(sock); goto _error;
ACP_DEBUG_EXIT_LOG(strerror(errno));
return -1;
} }
if (setsockopt(sock, IPPROTO_TCP, TCP_KEEPCNT, &keepalive_probes, (socklen_t)sizeof(keepalive_probes)) == -1) { if (setsockopt(sock, IPPROTO_TCP, TCP_KEEPCNT, &keepalive_probes, (socklen_t)sizeof(keepalive_probes)) == -1) {
close(sock); goto _error;
ACP_DEBUG_EXIT_LOG(strerror(errno));
return -1;
} }
int arg = fcntl(sock, F_GETFL, NULL); if (setsockopt(sock, IPPROTO_TCP, TCP_SYNCNT, &syn_retries, (socklen_t)sizeof(syn_retries)) == -1) {
arg |= O_NONBLOCK; goto _error;
fcntl(sock, F_SETFL, arg); }
if (connect(sock, (struct sockaddr*)&sin, sizeof(sin)) == -1) { client_fd = connect(sock, (struct sockaddr*)&sin, sizeof(sin));
if (client_fd == -1) {
int myerrno = errno; int myerrno = errno;
if (myerrno == EINPROGRESS) { if (myerrno == EINPROGRESS || myerrno == EAGAIN) {
fd_set fdset; fd_set fdset;
FD_ZERO(&fdset); FD_ZERO(&fdset);
FD_SET(sock, &fdset); FD_SET(sock, &fdset);
...@@ -95,14 +90,24 @@ int acpSocketConnect(IpAddress_t ipaddr, int port) ...@@ -95,14 +90,24 @@ int acpSocketConnect(IpAddress_t ipaddr, int port)
} }
} }
} }
close(sock);
ACP_DEBUG_EXIT_LOG(strerror(errno)); if (myerrno) {
return -1; goto _error;
}
} }
int arg = fcntl(sock, F_GETFL, NULL);
arg |= O_NONBLOCK;
fcntl(sock, F_SETFL, arg);
ACP_DEBUG_LOG("Connected to server: %s:%d", inet_ntoa(sin.sin_addr), port); ACP_DEBUG_LOG("Connected to server: %s:%d", inet_ntoa(sin.sin_addr), port);
ACP_DEBUG_EXIT_LOG(NULL); ACP_DEBUG_EXIT_LOG(NULL);
return sock; return sock;
_error:
close(sock);
ACP_DEBUG_EXIT_LOG(strerror(errno));
return -1;
} }
int acpSocketListen(IpAddress_t ipaddr, int port) int acpSocketListen(IpAddress_t ipaddr, int port)
......
/*
* Copyright 2022 Sequans Communications.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "acpSysInd.h"
#include "acpCtx.h"
#include "acpProto.h"
#include "acpMsgIds.h"
#include "serSysInd.h"
int acpSysIndProcessToSSEncSrv(acpCtx_t _ctx, unsigned char* _buffer, size_t* _size, const struct SYSTEM_IND* ToSS)
{
if (!acpCtxIsValid(_ctx)) {
return -ACP_ERR_INVALID_CTX;
}
size_t _lidx = ACP_HEADER_SIZE;
int _ret = serSysIndProcessToSSEncSrv(_buffer, *_size, &_lidx, ToSS);
if (_ret == SIDL_STATUS_OK) {
acpBuildHeader(_ctx, ACP_LID_SysIndProcessToSS, _lidx, _buffer);
}
*_size = _lidx;
return _ret;
}
int acpSysIndProcessToSSDecClt(acpCtx_t _ctx, const unsigned char* _buffer, size_t _size, struct SYSTEM_IND** ToSS)
{
if (!acpCtxIsValid(_ctx)) {
return -ACP_ERR_INVALID_CTX;
}
return serSysIndProcessToSSDecClt(_buffer + ACP_HEADER_SIZE, _size - ACP_HEADER_SIZE, ACP_CTX_CAST(_ctx)->arena, ACP_CTX_CAST(_ctx)->aSize, ToSS);
}
void acpSysIndProcessToSSFreeClt(struct SYSTEM_IND* ToSS)
{
serSysIndProcessToSSFreeClt(ToSS);
}
/*
* Copyright 2022 Sequans Communications.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include "SIDL_EUTRA_SYSIND_PORT.h"
#include "adbg.h"
SIDL_BEGIN_C_INTERFACE
void adbgSysIndProcessToSSLogOut(acpCtx_t _ctx, const struct SYSTEM_IND* ToSS);
SIDL_END_C_INTERFACE
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include "serTest.h" #include "serTest.h"
#include "serSys.h" #include "serSys.h"
#include "serSysInd.h"
#include "serSysSrb.h" #include "serSysSrb.h"
#include "serVng.h" #include "serVng.h"
#include "serDrb.h" #include "serDrb.h"
...@@ -25,6 +26,7 @@ ...@@ -25,6 +26,7 @@
#include "adbgTest.h" #include "adbgTest.h"
#include "adbgSys.h" #include "adbgSys.h"
#include "adbgSysInd.h"
#include "adbgSysSrb.h" #include "adbgSysSrb.h"
#include "adbgVng.h" #include "adbgVng.h"
#include "adbgDrb.h" #include "adbgDrb.h"
...@@ -175,9 +177,22 @@ void adbgMsgLogOutArgs(acpCtx_t ctx, enum acpMsgLocalId id, size_t size, const u ...@@ -175,9 +177,22 @@ void adbgMsgLogOutArgs(acpCtx_t ctx, enum acpMsgLocalId id, size_t size, const u
} }
return; return;
} }
/* Handshake */ /* Handshake */
if (id == 0x90040701 /* HandshakeHandleToSS */) { if (id == 0x90040701 /* HandshakeHandleToSS */) {
return; return;
} }
if (id == 0x90040800 /* SysIndProccessToSS */) {
struct SYSTEM_IND* ToSS = NULL;
if (serSysIndProcessToSSDecClt(buffer, size, NULL, 0, &ToSS) == 0) {
adbgSysIndProcessToSSLogOut(ctx, ToSS);
serSysIndProcessToSSFreeClt(ToSS);
} else {
adbgPrintLog(ctx, "cannot decode buffer");
adbgPrintLog(ctx, NULL);
}
return;
}
SIDL_ASSERT(0); SIDL_ASSERT(0);
} }
This diff is collapsed.
/*
* Copyright 2022 Sequans Communications.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include "SIDL_EUTRA_SYSIND_PORT.h"
#include "SidlCompiler.h"
SIDL_BEGIN_C_INTERFACE
int serSysIndProcessToSSEncSrv(unsigned char* _buffer, size_t _size, size_t* _lidx, const struct SYSTEM_IND* ToSS);
int serSysIndProcessToSSDecClt(const unsigned char* _buffer, size_t _size, unsigned char* _arena, size_t _aSize, struct SYSTEM_IND** ToSS);
void serSysIndProcessToSSFreeClt(struct SYSTEM_IND* ToSS);
SIDL_END_C_INTERFACE
This diff is collapsed.
...@@ -144,60 +144,8 @@ struct HarqProcessAssignment_Type { ...@@ -144,60 +144,8 @@ struct HarqProcessAssignment_Type {
union HarqProcessAssignment_Type_Value v; union HarqProcessAssignment_Type_Value v;
}; };
struct MAC_CTRL_PowerHeadRoom_Type {
B2_Type Reserved;
B6_Type Value;
};
struct ScellBitMap_Type {
B7_Type Value;
B1_Type Reserved;
};
typedef struct ScellBitMap_Type MAC_CTRL_ScellActDeact_Type; typedef struct ScellBitMap_Type MAC_CTRL_ScellActDeact_Type;
struct B2_Type_Reserved_Optional {
bool d;
B2_Type v;
};
struct B6_Type_PCMaxc_Optional {
bool d;
B6_Type v;
};
struct PH_Record_Type {
B1_Type P_Bit;
B1_Type V_Bit;
B6_Type Valve;
struct B2_Type_Reserved_Optional Reserved;
struct B6_Type_PCMaxc_Optional PCMaxc;
};
struct PH_Record_Type_PH_RecordList_Type_Dynamic {
size_t d;
struct PH_Record_Type* v;
};
typedef struct PH_Record_Type_PH_RecordList_Type_Dynamic PH_RecordList_Type;
struct PH_Record_Type_DC_PH_RecordList_Type_Dynamic {
size_t d;
struct PH_Record_Type* v;
};
typedef struct PH_Record_Type_DC_PH_RecordList_Type_Dynamic DC_PH_RecordList_Type;
struct MAC_CTRL_ExtPowerHeadRoom_Type {
struct ScellBitMap_Type EPH_Octet1;
PH_RecordList_Type PH_RecordList;
};
struct MAC_CTRL_DC_PowerHeadRoom_Type {
struct ScellBitMap_Type DC_PH_Octet1;
DC_PH_RecordList_Type DC_PH_RecordList;
};
struct MAC_CTRL_ShortBSR_Type_ShortBSR_Optional { struct MAC_CTRL_ShortBSR_Type_ShortBSR_Optional {
bool d; bool d;
struct MAC_CTRL_ShortBSR_Type v; struct MAC_CTRL_ShortBSR_Type v;
......
/*
* Copyright 2022 Sequans Communications.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include "SidlCompiler.h"
#include "SidlASN1.h"
#include "SidlASN1Base.h"
#include "SidlBase.h"
#include "SidlCommon.h"
#include "SidlCommonBase.h"
#include "SidlParts.h"
#include "SidlVals.h"
#include "TtcnCommon.h"
#include "SidlCommon_BcchConfig.h"
#include "SidlCommon_Bcch_BRConfig.h"
#include "SidlCommon_CcchDcchDtchConfig.h"
#include "SidlCommon_InitialCellPower.h"
#include "SidlCommon_PhysicalLayerConfigDL.h"
#include "SidlCommon_PhysicalLayerConfigUL.h"
#include "SidlCommon_RachProcedureConfig.h"
#include "SidlCommon_SciSchedulingConfig.h"
#include "SidlCommon_ServingCellConfig.h"
#include "SidlCommon_StaticCellInfo.h"
#include "SidlCommon_CellConfigRequest.h"
SIDL_BEGIN_C_INTERFACE
typedef uint8_t PrachPreambleIndex_Type;
typedef Dummy_Type PRTPower_Type;
typedef int LogicalChannelGroup_Type;
typedef uint8_t PHR_Type;
struct int_RepetitionsPerPreambleAttempt_Optional {
bool d;
int v;
};
struct RachPreamble_Type {
PrachPreambleIndex_Type RAPID;
PRTPower_Type PRTPower;
struct int_RepetitionsPerPreambleAttempt_Optional RepetitionsPerPreambleAttempt;
};
struct SL_BSR_Value_Type {
B4_Type DestinationIndex;
B2_Type LCG_ID;
B6_Type BufferSize;
};
struct SL_BSR_Value_Type_SL_BSR_ValueList_Type_Dynamic {
size_t d;
struct SL_BSR_Value_Type* v;
};
typedef struct SL_BSR_Value_Type_SL_BSR_ValueList_Type_Dynamic SL_BSR_ValueList_Type;
struct SL_BSR_MACHeader_Type {
B5_Type HeaderFieldLCID;
B1_Type HeaderFieldE;
B1_Type HeaderFieldF;
SL_BSR_ValueList_Type SL_BSR_Value;
};
typedef int BSR_Value_Type;
struct Short_BSR_Type {
LogicalChannelGroup_Type LCG;
BSR_Value_Type Value;
};
struct Long_BSR_Type {
BSR_Value_Type Value_LCG1;
BSR_Value_Type Value_LCG2;
BSR_Value_Type Value_LCG3;
BSR_Value_Type Value_LCG4;
};
enum BSR_Type_Sel {
BSR_Type_UNBOUND_VALUE = 0,
BSR_Type_Short = 1,
BSR_Type_Truncated = 2,
BSR_Type_Long = 3,
BSR_Type_Sidelink = 4,
};
union BSR_Type_Value {
struct Short_BSR_Type Short;
struct Short_BSR_Type Truncated;
struct Long_BSR_Type Long;
struct SL_BSR_MACHeader_Type Sidelink;
};
struct BSR_Type {
enum BSR_Type_Sel d;
union BSR_Type_Value v;
};
enum HARQ_Type {
HARQ_Type_ack = 0,
HARQ_Type_nack = 1,
};
typedef enum HARQ_Type HARQ_Type;
struct HarqProcessInfo_Type {
HarqProcessId_Type Id;
int CURRENT_TX_NB;
};
enum HarqError_Type_Sel {
HarqError_Type_UNBOUND_VALUE = 0,
HarqError_Type_UL = 1,
HarqError_Type_DL = 2,
};
union HarqError_Type_Value {
struct HarqProcessInfo_Type UL;
struct HarqProcessInfo_Type DL;
};
struct HarqError_Type {
enum HarqError_Type_Sel d;
union HarqError_Type_Value v;
};
struct RlcDiscardInd_Type {
int SequenceNumber;
};
typedef uint8_t RI_Type;
enum SRSInd_Type {
SRSInd_Type_SRS_Start = 0,
SRSInd_Type_SRS_Stop = 1,
};
typedef enum SRSInd_Type SRSInd_Type;
enum SystemIndication_Type_Sel {
SystemIndication_Type_UNBOUND_VALUE = 0,
SystemIndication_Type_Error = 1,
SystemIndication_Type_RachPreamble = 2,
SystemIndication_Type_SchedReq = 3,
SystemIndication_Type_BSR = 4,
SystemIndication_Type_UL_HARQ = 5,
SystemIndication_Type_C_RNTI = 6,
SystemIndication_Type_PHR = 7,
SystemIndication_Type_HarqError = 8,
SystemIndication_Type_RlcDiscardInd = 9,
SystemIndication_Type_PeriodicRI = 10,
SystemIndication_Type_EPHR = 11,
SystemIndication_Type_CqiInd = 12,
SystemIndication_Type_SrsInd = 13,
SystemIndication_Type_DC_PHR = 14,
};
union SystemIndication_Type_Value {
CHAR_STRING Error;
struct RachPreamble_Type RachPreamble;
Null_Type SchedReq;
struct BSR_Type BSR;
HARQ_Type UL_HARQ;
C_RNTI C_RNTI;
PHR_Type PHR;
struct HarqError_Type HarqError;
struct RlcDiscardInd_Type RlcDiscardInd;
RI_Type PeriodicRI;
struct MAC_CTRL_ExtPowerHeadRoom_Type EPHR;
Null_Type CqiInd;
SRSInd_Type SrsInd;
struct MAC_CTRL_DC_PowerHeadRoom_Type DC_PHR;
};
struct SystemIndication_Type {
enum SystemIndication_Type_Sel d;
union SystemIndication_Type_Value v;
};
struct SYSTEM_IND {
struct IndAspCommonPart_Type Common;
struct SystemIndication_Type Indication;
};
SIDL_END_C_INTERFACE
...@@ -24,6 +24,8 @@ typedef uint8_t OCTET_STRING_ELEMENT; ...@@ -24,6 +24,8 @@ typedef uint8_t OCTET_STRING_ELEMENT;
typedef uint8_t BIT_STRING_ELEMENT; typedef uint8_t BIT_STRING_ELEMENT;
typedef char CHAR_STRING_ELEMENT;
struct OCTET_STRING_ELEMENT_OCTET_STRING_Dynamic { struct OCTET_STRING_ELEMENT_OCTET_STRING_Dynamic {
size_t d; size_t d;
OCTET_STRING_ELEMENT* v; OCTET_STRING_ELEMENT* v;
...@@ -38,6 +40,13 @@ struct BIT_STRING_ELEMENT_BIT_STRING_Dynamic { ...@@ -38,6 +40,13 @@ struct BIT_STRING_ELEMENT_BIT_STRING_Dynamic {
typedef struct BIT_STRING_ELEMENT_BIT_STRING_Dynamic BIT_STRING; typedef struct BIT_STRING_ELEMENT_BIT_STRING_Dynamic BIT_STRING;
struct CHAR_STRING_ELEMENT_CHAR_STRING_Dynamic {
size_t d;
CHAR_STRING_ELEMENT* v;
};
typedef struct CHAR_STRING_ELEMENT_CHAR_STRING_Dynamic CHAR_STRING;
struct int32_t_PREGEN_RECORD_OF_INTEGER_Dynamic { struct int32_t_PREGEN_RECORD_OF_INTEGER_Dynamic {
size_t d; size_t d;
int32_t* v; int32_t* v;
......
...@@ -763,4 +763,56 @@ typedef UE_EUTRA_Capability_v1450_IEs_ue_CategoryDL_v1450 UE_CategoryDL_v1450_Ty ...@@ -763,4 +763,56 @@ typedef UE_EUTRA_Capability_v1450_IEs_ue_CategoryDL_v1450 UE_CategoryDL_v1450_Ty
typedef UE_EUTRA_Capability_v1460_IEs_ue_CategoryDL_v1460 UE_CategoryDL_v1460_Type; typedef UE_EUTRA_Capability_v1460_IEs_ue_CategoryDL_v1460 UE_CategoryDL_v1460_Type;
struct ScellBitMap_Type {
B7_Type Value;
B1_Type Reserved;
};
struct MAC_CTRL_PowerHeadRoom_Type {
B2_Type Reserved;
B6_Type Value;
};
struct B2_Type_Reserved_Optional {
bool d;
B2_Type v;
};
struct B6_Type_PCMaxc_Optional {
bool d;
B6_Type v;
};
struct PH_Record_Type {
B1_Type P_Bit;
B1_Type V_Bit;
B6_Type Valve;
struct B2_Type_Reserved_Optional Reserved;
struct B6_Type_PCMaxc_Optional PCMaxc;
};
struct PH_Record_Type_PH_RecordList_Type_Dynamic {
size_t d;
struct PH_Record_Type* v;
};
typedef struct PH_Record_Type_PH_RecordList_Type_Dynamic PH_RecordList_Type;
struct PH_Record_Type_DC_PH_RecordList_Type_Dynamic {
size_t d;
struct PH_Record_Type* v;
};
typedef struct PH_Record_Type_DC_PH_RecordList_Type_Dynamic DC_PH_RecordList_Type;
struct MAC_CTRL_ExtPowerHeadRoom_Type {
struct ScellBitMap_Type EPH_Octet1;
PH_RecordList_Type PH_RecordList;
};
struct MAC_CTRL_DC_PowerHeadRoom_Type {
struct ScellBitMap_Type DC_PH_Octet1;
DC_PH_RecordList_Type DC_PH_RecordList;
};
SIDL_END_C_INTERFACE SIDL_END_C_INTERFACE
...@@ -21,8 +21,10 @@ ...@@ -21,8 +21,10 @@
typedef uint8_t OCTET_STRING_ELEMENT; typedef uint8_t OCTET_STRING_ELEMENT;
typedef uint8_t BIT_STRING_ELEMENT; // the whole octet contains a bit flag 0 or 1 typedef uint8_t BIT_STRING_ELEMENT; // the whole octet contains a bit flag 0 or 1
typedef char CHAR_STRING_ELEMENT;
typedef SIDL_DYNAMIC(OCTET_STRING_ELEMENT, OCTET_STRING); typedef SIDL_DYNAMIC(OCTET_STRING_ELEMENT, OCTET_STRING);
typedef SIDL_DYNAMIC(BIT_STRING_ELEMENT, BIT_STRING); typedef SIDL_DYNAMIC(BIT_STRING_ELEMENT, BIT_STRING);
typedef SIDL_DYNAMIC(CHAR_STRING_ELEMENT, CHAR_STRING);
typedef SIDL_DYNAMIC(int32_t, PREGEN_RECORD_OF_INTEGER); typedef SIDL_DYNAMIC(int32_t, PREGEN_RECORD_OF_INTEGER);
...@@ -566,3 +566,36 @@ typedef ASN_NAME(UE_EUTRA_Capability_v1330_IEs, ue_CategoryDL_v1330) UE_Category ...@@ -566,3 +566,36 @@ typedef ASN_NAME(UE_EUTRA_Capability_v1330_IEs, ue_CategoryDL_v1330) UE_Category
typedef ASN_ENUM(ASN_NAME(UE_EUTRA_Capability_v1350_IEs, ue_CategoryDL_v1350)) UE_CategoryDL_v1350_Type; typedef ASN_ENUM(ASN_NAME(UE_EUTRA_Capability_v1350_IEs, ue_CategoryDL_v1350)) UE_CategoryDL_v1350_Type;
typedef ASN_NAME(UE_EUTRA_Capability_v1450_IEs, ue_CategoryDL_v1450) UE_CategoryDL_v1450_Type; typedef ASN_NAME(UE_EUTRA_Capability_v1450_IEs, ue_CategoryDL_v1450) UE_CategoryDL_v1450_Type;
typedef ASN_NAME(UE_EUTRA_Capability_v1460_IEs, ue_CategoryDL_v1460) UE_CategoryDL_v1460_Type; typedef ASN_NAME(UE_EUTRA_Capability_v1460_IEs, ue_CategoryDL_v1460) UE_CategoryDL_v1460_Type;
struct ScellBitMap_Type {
B7_Type Value;
B1_Type Reserved;
};
struct MAC_CTRL_PowerHeadRoom_Type {
B2_Type Reserved;
B6_Type Value;
};
struct PH_Record_Type {
B1_Type P_Bit;
B1_Type V_Bit;
B6_Type Valve;
SIDL_OPTIONAL(B2_Type, Reserved);
SIDL_OPTIONAL(B6_Type, PCMaxc);
};
typedef SIDL_DYNAMIC_OF_STRUCT(PH_Record_Type, PH_RecordList_Type); /* 1..9 */
typedef SIDL_DYNAMIC_OF_STRUCT(PH_Record_Type, DC_PH_RecordList_Type); /* 1..10 */
struct MAC_CTRL_ExtPowerHeadRoom_Type {
struct ScellBitMap_Type EPH_Octet1;
PH_RecordList_Type PH_RecordList;
};
struct MAC_CTRL_DC_PowerHeadRoom_Type {
struct ScellBitMap_Type DC_PH_Octet1;
DC_PH_RecordList_Type DC_PH_RecordList;
};
...@@ -77,39 +77,8 @@ SIDL_UNION_BEGIN(HarqProcessAssignment_Type) { ...@@ -77,39 +77,8 @@ SIDL_UNION_BEGIN(HarqProcessAssignment_Type) {
Null_Type Automatic; Null_Type Automatic;
} SIDL_UNION_END; } SIDL_UNION_END;
struct MAC_CTRL_PowerHeadRoom_Type {
B2_Type Reserved;
B6_Type Value;
};
struct ScellBitMap_Type {
B7_Type Value;
B1_Type Reserved;
};
typedef struct ScellBitMap_Type MAC_CTRL_ScellActDeact_Type; typedef struct ScellBitMap_Type MAC_CTRL_ScellActDeact_Type;
struct PH_Record_Type {
B1_Type P_Bit;
B1_Type V_Bit;
B6_Type Valve;
SIDL_OPTIONAL(B2_Type, Reserved);
SIDL_OPTIONAL(B6_Type, PCMaxc);
};
typedef SIDL_DYNAMIC_OF_STRUCT(PH_Record_Type, PH_RecordList_Type); /* 1..9 */
typedef SIDL_DYNAMIC_OF_STRUCT(PH_Record_Type, DC_PH_RecordList_Type); /* 1..10 */
struct MAC_CTRL_ExtPowerHeadRoom_Type {
struct ScellBitMap_Type EPH_Octet1;
PH_RecordList_Type PH_RecordList;
};
struct MAC_CTRL_DC_PowerHeadRoom_Type {
struct ScellBitMap_Type DC_PH_Octet1;
DC_PH_RecordList_Type DC_PH_RecordList;
};
struct MAC_CTRL_ElementList_Type { struct MAC_CTRL_ElementList_Type {
SIDL_OPTIONAL_OF_STRUCT(MAC_CTRL_ShortBSR_Type, ShortBSR); SIDL_OPTIONAL_OF_STRUCT(MAC_CTRL_ShortBSR_Type, ShortBSR);
SIDL_OPTIONAL_OF_STRUCT(MAC_CTRL_LongBSR_Type, LongBSR); SIDL_OPTIONAL_OF_STRUCT(MAC_CTRL_LongBSR_Type, LongBSR);
......
/*
* Copyright 2022 Sequans Communications.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "msg.sidl"
#include "SidlCommonBase.sidl"
// SIDL common TTCN types and definitions.
#include "TtcnCommon.sidl"
METADATA_VAR(itf_name, "SysInd");
// TTCN namespaces
METADATA_VAR(namespaces, "EUTRA_ASP_TypeDefs");
typedef uint8_t PrachPreambleIndex_Type;
typedef Dummy_Type PRTPower_Type;
typedef int LogicalChannelGroup_Type;
typedef uint8_t PHR_Type;
struct RachPreamble_Type {
PrachPreambleIndex_Type RAPID;
PRTPower_Type PRTPower;
SIDL_OPTIONAL(int, RepetitionsPerPreambleAttempt);
};
struct SL_BSR_Value_Type {
B4_Type DestinationIndex;
B2_Type LCG_ID;
B6_Type BufferSize;
};
typedef SIDL_DYNAMIC_OF_STRUCT(SL_BSR_Value_Type, SL_BSR_ValueList_Type);
struct SL_BSR_MACHeader_Type {
B5_Type HeaderFieldLCID;
B1_Type HeaderFieldE;
B1_Type HeaderFieldF;
SL_BSR_ValueList_Type SL_BSR_Value;
};
typedef int BSR_Value_Type;
struct Short_BSR_Type {
LogicalChannelGroup_Type LCG;
BSR_Value_Type Value;
};
struct Long_BSR_Type {
BSR_Value_Type Value_LCG1;
BSR_Value_Type Value_LCG2;
BSR_Value_Type Value_LCG3;
BSR_Value_Type Value_LCG4;
};
SIDL_UNION_ENUM(BSR_Type) {
BSR_Type_UNBOUND_VALUE,
BSR_Type_Short,
BSR_Type_Truncated,
BSR_Type_Long,
BSR_Type_Sidelink,
};
SIDL_UNION_BEGIN(BSR_Type) {
SIDL_UNION_CASE(BSR_Type)
struct Short_BSR_Type Short;
SIDL_UNION_CASE(BSR_Type)
struct Short_BSR_Type Truncated;
SIDL_UNION_CASE(BSR_Type)
struct Long_BSR_Type Long;
SIDL_UNION_CASE(BSR_Type)
struct SL_BSR_MACHeader_Type Sidelink;
} SIDL_UNION_END;
typedef enum {
HARQ_Type_ack,
HARQ_Type_nack
} HARQ_Type;
struct HarqProcessInfo_Type {
HarqProcessId_Type Id;
int CURRENT_TX_NB;
};
SIDL_UNION_ENUM(HarqError_Type) {
HarqError_Type_UNBOUND_VALUE,
HarqError_Type_UL,
HarqError_Type_DL
};
SIDL_UNION_BEGIN(HarqError_Type) {
SIDL_UNION_CASE(HarqError_Type)
struct HarqProcessInfo_Type UL;
SIDL_UNION_CASE(HarqError_Type)
struct HarqProcessInfo_Type DL;
} SIDL_UNION_END;
struct RlcDiscardInd_Type {
int SequenceNumber;
};
typedef uint8_t RI_Type;
typedef enum {
SRSInd_Type_SRS_Start,
SRSInd_Type_SRS_Stop
} SRSInd_Type;
SIDL_UNION_ENUM(SystemIndication_Type) {
SystemIndication_Type_UNBOUND_VALUE,
SystemIndication_Type_Error,
SystemIndication_Type_RachPreamble,
SystemIndication_Type_SchedReq,
SystemIndication_Type_BSR,
SystemIndication_Type_UL_HARQ,
SystemIndication_Type_C_RNTI,
SystemIndication_Type_PHR,
SystemIndication_Type_HarqError,
SystemIndication_Type_RlcDiscardInd,
SystemIndication_Type_PeriodicRI,
SystemIndication_Type_EPHR,
SystemIndication_Type_CqiInd,
SystemIndication_Type_SrsInd,
SystemIndication_Type_DC_PHR,
};
SIDL_UNION_BEGIN(SystemIndication_Type) {
SIDL_UNION_CASE(SystemIndication_Type_Error)
CHAR_STRING Error;
SIDL_UNION_CASE(SystemIndication_Type_RachPreamble)
struct RachPreamble_Type RachPreamble;
SIDL_UNION_CASE(SystemIndication_Type_SchedReq)
Null_Type SchedReq;
SIDL_UNION_CASE(SystemIndication_Type_BSR)
struct BSR_Type BSR;
SIDL_UNION_CASE(SystemIndication_Type_UL_HARQ)
HARQ_Type UL_HARQ;
SIDL_UNION_CASE(SystemIndication_Type_C_RNTI)
C_RNTI C_RNTI;
SIDL_UNION_CASE(SystemIndication_Type_PHR)
PHR_Type PHR;
SIDL_UNION_CASE(SystemIndication_Type_HarqError)
struct HarqError_Type HarqError;
SIDL_UNION_CASE(SystemIndication_Type_RlcDiscardInd)
struct RlcDiscardInd_Type RlcDiscardInd;
SIDL_UNION_CASE(SystemIndication_Type_PeriodicRI)
RI_Type PeriodicRI;
SIDL_UNION_CASE(SystemIndication_Type_EPHR)
struct MAC_CTRL_ExtPowerHeadRoom_Type EPHR;
SIDL_UNION_CASE(SystemIndication_Type_CqiInd)
Null_Type CqiInd;
SIDL_UNION_CASE(SystemIndication_Type_SrsInd)
SRSInd_Type SrsInd;
SIDL_UNION_CASE(SystemIndication_Type_DC_PHR)
struct MAC_CTRL_DC_PowerHeadRoom_Type DC_PHR;
} SIDL_UNION_END;
struct SYSTEM_IND {
struct IndAspCommonPart_Type Common;
struct SystemIndication_Type Indication;
};
NOTIFY ProcessToSS(struct SYSTEM_IND* ToSS);
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