Commit ab135d62 authored by laurent's avatar laurent

formating

parent 46231a5d
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. except in compliance with the License.
* You may obtain a copy of the License at You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698 http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and See the License for the specific language governing permissions and
* limitations under the License. limitations under the License.
*------------------------------------------------------------------------------- -------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance: For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org contact@openairinterface.org
*/ */
#ifndef ASN1_CONVERSIONS_H_ #ifndef ASN1_CONVERSIONS_H_
#define ASN1_CONVERSIONS_H_ #define ASN1_CONVERSIONS_H_
...@@ -28,25 +28,23 @@ ...@@ -28,25 +28,23 @@
//-----------------------begin func ------------------- //-----------------------begin func -------------------
/*! \fn uint8_t BIT_STRING_to_uint8(BIT_STRING_t *) /*! \fn uint8_t BIT_STRING_to_uint8(BIT_STRING_t *)
*\brief This function extract at most a 8 bits value from a BIT_STRING_t object, the exact bits number depend on the BIT_STRING_t contents. \brief This function extract at most a 8 bits value from a BIT_STRING_t object, the exact bits number depend on the BIT_STRING_t contents.
*\param[in] pointer to the BIT_STRING_t object. \param[in] pointer to the BIT_STRING_t object.
*\return the extracted value. \return the extracted value.
*/ */
static inline uint8_t BIT_STRING_to_uint8(BIT_STRING_t *asn) { static inline uint8_t BIT_STRING_to_uint8(BIT_STRING_t *asn) {
DevCheck ((asn->size == 1), asn->size, 0, 0); DevCheck ((asn->size == 1), asn->size, 0, 0);
return asn->buf[0] >> asn->bits_unused; return asn->buf[0] >> asn->bits_unused;
} }
/*! \fn uint16_t BIT_STRING_to_uint16(BIT_STRING_t *) /*! \fn uint16_t BIT_STRING_to_uint16(BIT_STRING_t *)
*\brief This function extract at most a 16 bits value from a BIT_STRING_t object, the exact bits number depend on the BIT_STRING_t contents. \brief This function extract at most a 16 bits value from a BIT_STRING_t object, the exact bits number depend on the BIT_STRING_t contents.
*\param[in] pointer to the BIT_STRING_t object. \param[in] pointer to the BIT_STRING_t object.
*\return the extracted value. \return the extracted value.
*/ */
static inline uint16_t BIT_STRING_to_uint16(BIT_STRING_t *asn) { static inline uint16_t BIT_STRING_to_uint16(BIT_STRING_t *asn) {
uint16_t result = 0; uint16_t result = 0;
int index = 0; int index = 0;
DevCheck ((asn->size > 0) && (asn->size <= 2), asn->size, 0, 0); DevCheck ((asn->size > 0) && (asn->size <= 2), asn->size, 0, 0);
switch (asn->size) { switch (asn->size) {
...@@ -65,48 +63,44 @@ static inline uint16_t BIT_STRING_to_uint16(BIT_STRING_t *asn) { ...@@ -65,48 +63,44 @@ static inline uint16_t BIT_STRING_to_uint16(BIT_STRING_t *asn) {
} }
/*! \fn uint32_t BIT_STRING_to_uint32(BIT_STRING_t *) /*! \fn uint32_t BIT_STRING_to_uint32(BIT_STRING_t *)
*\brief This function extract at most a 32 bits value from a BIT_STRING_t object, the exact bits number depend on the BIT_STRING_t contents. \brief This function extract at most a 32 bits value from a BIT_STRING_t object, the exact bits number depend on the BIT_STRING_t contents.
*\param[in] pointer to the BIT_STRING_t object. \param[in] pointer to the BIT_STRING_t object.
*\return the extracted value. \return the extracted value.
*/ */
static inline uint32_t BIT_STRING_to_uint32(BIT_STRING_t *asn) { static inline uint32_t BIT_STRING_to_uint32(BIT_STRING_t *asn) {
uint32_t result = 0; uint32_t result = 0;
int index; int index;
int shift; int shift;
DevCheck ((asn->size > 0) && (asn->size <= 4), asn->size, 0, 0); DevCheck ((asn->size > 0) && (asn->size <= 4), asn->size, 0, 0);
shift = ((asn->size - 1) * 8) - asn->bits_unused; shift = ((asn->size - 1) * 8) - asn->bits_unused;
for (index = 0; index < (asn->size - 1); index++) { for (index = 0; index < (asn->size - 1); index++) {
result |= asn->buf[index] << shift; result |= asn->buf[index] << shift;
shift -= 8; shift -= 8;
} }
result |= asn->buf[index] >> asn->bits_unused; result |= asn->buf[index] >> asn->bits_unused;
return result; return result;
} }
/*! \fn uint64_t BIT_STRING_to_uint64(BIT_STRING_t *) /*! \fn uint64_t BIT_STRING_to_uint64(BIT_STRING_t *)
*\brief This function extract at most a 64 bits value from a BIT_STRING_t object, the exact bits number depend on the BIT_STRING_t contents. \brief This function extract at most a 64 bits value from a BIT_STRING_t object, the exact bits number depend on the BIT_STRING_t contents.
*\param[in] pointer to the BIT_STRING_t object. \param[in] pointer to the BIT_STRING_t object.
*\return the extracted value. \return the extracted value.
*/ */
static inline uint64_t BIT_STRING_to_uint64(BIT_STRING_t *asn) { static inline uint64_t BIT_STRING_to_uint64(BIT_STRING_t *asn) {
uint64_t result = 0; uint64_t result = 0;
int index; int index;
int shift; int shift;
DevCheck ((asn->size > 0) && (asn->size <= 8), asn->size, 0, 0); DevCheck ((asn->size > 0) && (asn->size <= 8), asn->size, 0, 0);
shift = ((asn->size - 1) * 8) - asn->bits_unused; shift = ((asn->size - 1) * 8) - asn->bits_unused;
for (index = 0; index < (asn->size - 1); index++) { for (index = 0; index < (asn->size - 1); index++) {
result |= asn->buf[index] << shift; result |= asn->buf[index] << shift;
shift -= 8; shift -= 8;
} }
result |= asn->buf[index] >> asn->bits_unused; result |= asn->buf[index] >> asn->bits_unused;
return result; return result;
} }
......
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. except in compliance with the License.
* You may obtain a copy of the License at You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698 http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and See the License for the specific language governing permissions and
* limitations under the License. limitations under the License.
*------------------------------------------------------------------------------- -------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance: For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org contact@openairinterface.org
*/ */
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <inttypes.h> #include <inttypes.h>
#ifdef CMAKER #ifdef CMAKER
#include <platform_types.h> #include <platform_types.h>
#endif #endif
#if defined(ENB_MODE) #if defined(ENB_MODE)
# define display_backtrace() #define display_backtrace()
#else #else
# include "backtrace.h" #include "backtrace.h"
#endif #endif
#ifndef ASSERTIONS_H_ #ifndef ASSERTIONS_H_
...@@ -37,23 +37,23 @@ ...@@ -37,23 +37,23 @@
void output_log_mem(void); void output_log_mem(void);
#define _Assert_Exit_ \ #define _Assert_Exit_ \
{ \ { \
fprintf(stderr, "\nExiting execution\n"); \ fprintf(stderr, "\nExiting execution\n"); \
display_backtrace(); \ display_backtrace(); \
fflush(stdout); \ fflush(stdout); \
fflush(stderr); \ fflush(stderr); \
exit(EXIT_FAILURE); \ exit(EXIT_FAILURE); \
} }
#define _Assert_(cOND, aCTION, fORMAT, aRGS...) \ #define _Assert_(cOND, aCTION, fORMAT, aRGS...) \
do { \ do { \
if (!(cOND)) { \ if (!(cOND)) { \
fprintf(stderr, "\nAssertion ("#cOND") failed!\n" \ fprintf(stderr, "\nAssertion ("#cOND") failed!\n" \
"In %s() %s:%d\n" fORMAT, \ "In %s() %s:%d\n" fORMAT, \
__FUNCTION__, __FILE__, __LINE__, ##aRGS); \ __FUNCTION__, __FILE__, __LINE__, ##aRGS); \
aCTION; \ aCTION; \
} \ } \
} while(0) } while(0)
#define AssertFatal(cOND, fORMAT, aRGS...) _Assert_(cOND, _Assert_Exit_, fORMAT, ##aRGS) #define AssertFatal(cOND, fORMAT, aRGS...) _Assert_(cOND, _Assert_Exit_, fORMAT, ##aRGS)
...@@ -62,12 +62,12 @@ do { \ ...@@ -62,12 +62,12 @@ do { \
#define DevCheck(cOND, vALUE1, vALUE2, vALUE3) \ #define DevCheck(cOND, vALUE1, vALUE2, vALUE3) \
_Assert_(cOND, _Assert_Exit_, #vALUE1 ": %" PRIdMAX "\n" #vALUE2 ": %" PRIdMAX "\n" #vALUE3 ": %" PRIdMAX "\n\n", \ _Assert_(cOND, _Assert_Exit_, #vALUE1 ": %" PRIdMAX "\n" #vALUE2 ": %" PRIdMAX "\n" #vALUE3 ": %" PRIdMAX "\n\n", \
(intmax_t)vALUE1, (intmax_t)vALUE2, (intmax_t)vALUE3) (intmax_t)vALUE1, (intmax_t)vALUE2, (intmax_t)vALUE3)
#define DevCheck4(cOND, vALUE1, vALUE2, vALUE3, vALUE4) \ #define DevCheck4(cOND, vALUE1, vALUE2, vALUE3, vALUE4) \
_Assert_(cOND, _Assert_Exit_, #vALUE1": %" PRIdMAX "\n" #vALUE2 ": %" PRIdMAX "\n" #vALUE3 ": %" PRIdMAX "\n" #vALUE4 ": %" PRIdMAX "\n\n", \ _Assert_(cOND, _Assert_Exit_, #vALUE1": %" PRIdMAX "\n" #vALUE2 ": %" PRIdMAX "\n" #vALUE3 ": %" PRIdMAX "\n" #vALUE4 ": %" PRIdMAX "\n\n", \
(intmax_t)vALUE1, (intmax_t)vALUE2, (intmax_t)vALUE3, (intmax_t)vALUE4) (intmax_t)vALUE1, (intmax_t)vALUE2, (intmax_t)vALUE3, (intmax_t)vALUE4)
#define DevParam(vALUE1, vALUE2, vALUE3) DevCheck(0, vALUE1, vALUE2, vALUE3) #define DevParam(vALUE1, vALUE2, vALUE3) DevCheck(0, vALUE1, vALUE2, vALUE3)
...@@ -76,15 +76,15 @@ _Assert_(cOND, _Assert_Exit_, #vALUE1": %" PRIdMAX "\n" #vALUE2 ": %" PRIdMAX "\ ...@@ -76,15 +76,15 @@ _Assert_(cOND, _Assert_Exit_, #vALUE1": %" PRIdMAX "\n" #vALUE2 ": %" PRIdMAX "\
#define DevMessage(mESSAGE) _Assert_(0, _Assert_Exit_, #mESSAGE) #define DevMessage(mESSAGE) _Assert_(0, _Assert_Exit_, #mESSAGE)
#define CHECK_INIT_RETURN(fCT) \ #define CHECK_INIT_RETURN(fCT) \
do { \ do { \
int fct_ret; \ int fct_ret; \
if ((fct_ret = (fCT)) != 0) { \ if ((fct_ret = (fCT)) != 0) { \
fprintf(stderr, "Function "#fCT" has failed\n" \ fprintf(stderr, "Function "#fCT" has failed\n" \
"returning %d\n", fct_ret); \ "returning %d\n", fct_ret); \
fflush(stdout); \ fflush(stdout); \
fflush(stderr); \ fflush(stderr); \
exit(EXIT_FAILURE); \ exit(EXIT_FAILURE); \
} \ } \
} while(0) } while(0)
#endif /* ASSERTIONS_H_ */ #endif /* ASSERTIONS_H_ */
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. except in compliance with the License.
* You may obtain a copy of the License at You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698 http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and See the License for the specific language governing permissions and
* limitations under the License. limitations under the License.
*------------------------------------------------------------------------------- -------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance: For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org contact@openairinterface.org
*/ */
#include <pthread.h> #include <pthread.h>
#include <stdio.h> #include <stdio.h>
...@@ -31,17 +31,17 @@ ...@@ -31,17 +31,17 @@
#include "backtrace.h" #include "backtrace.h"
/* Obtain a backtrace and print it to stdout. */ /* Obtain a backtrace and print it to stdout. */
void display_backtrace(void) void display_backtrace(void) {
{
void *array[10]; void *array[10];
size_t size; size_t size;
char **strings; char **strings;
size_t i; size_t i;
char* test=getenv("NO_BACKTRACE"); char *test=getenv("NO_BACKTRACE");
if (test!=0) *((int*)0)=0;
if (test!=0) *((int *)0)=0;
size = backtrace(array, 10); size = backtrace(array, 10);
strings = backtrace_symbols(array, size); strings = backtrace_symbols(array, size);
printf("Obtained %zd stack frames.\n", size); printf("Obtained %zd stack frames.\n", size);
for (i = 0; i < size; i++) for (i = 0; i < size; i++)
...@@ -50,8 +50,7 @@ void display_backtrace(void) ...@@ -50,8 +50,7 @@ void display_backtrace(void)
free(strings); free(strings);
} }
void backtrace_handle_signal(siginfo_t *info) void backtrace_handle_signal(siginfo_t *info) {
{
display_backtrace(); display_backtrace();
//exit(EXIT_FAILURE); //exit(EXIT_FAILURE);
} }
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. except in compliance with the License.
* You may obtain a copy of the License at You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698 http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and See the License for the specific language governing permissions and
* limitations under the License. limitations under the License.
*------------------------------------------------------------------------------- -------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance: For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org contact@openairinterface.org
*/ */
#include <signal.h> #include <signal.h>
......
This diff is collapsed.
/* /*
Author: Laurent THOMAS, Open Cells Author: Laurent THOMAS, Open Cells
copyleft: OpenAirInterface Software Alliance and it's licence copyleft: OpenAirInterface Software Alliance and it's licence
*/ */
#include <vector> #include <vector>
#include <map> #include <map>
......
/* /*
Author: Laurent THOMAS, Open Cells Author: Laurent THOMAS, Open Cells
Copyleft: OpenAirInterface software alliance and it's licence Copyleft: OpenAirInterface software alliance and it's licence
*/ */
#ifndef INTERTASK_INTERFACE_H_ #ifndef INTERTASK_INTERFACE_H_
#define INTERTASK_INTERFACE_H_ #define INTERTASK_INTERFACE_H_
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. except in compliance with the License.
* You may obtain a copy of the License at You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698 http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and See the License for the specific language governing permissions and
* limitations under the License. limitations under the License.
*------------------------------------------------------------------------------- -------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance: For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org contact@openairinterface.org
*/ */
/*! \file PHY/defs.h /*! \file PHY/defs.h
\brief Top-level defines and structure definitions \brief Top-level defines and structure definitions
\author R. Knopp, F. Kaltenberger \author R. Knopp, F. Kaltenberger
\date 2011 \date 2011
\version 0.1 \version 0.1
\company Eurecom \company Eurecom
\email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr
\note \note
\warning \warning
*/ */
#ifndef __PHY_DEFS_COMMON_H__ #ifndef __PHY_DEFS_COMMON_H__
#define __PHY_DEFS_COMMON_H__ #define __PHY_DEFS_COMMON_H__
#ifndef _GNU_SOURCE #ifndef _GNU_SOURCE
#define _GNU_SOURCE #define _GNU_SOURCE
#endif #endif
#include <sched.h> #include <sched.h>
#include <stdio.h> #include <stdio.h>
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
#include "PHY/TOOLS/time_meas.h" #include "PHY/TOOLS/time_meas.h"
#include "platform_types.h" #include "platform_types.h"
#define MAX_NUM_RU_PER_eNB 64 #define MAX_NUM_RU_PER_eNB 64
#include <pthread.h> #include <pthread.h>
...@@ -165,7 +165,7 @@ typedef struct { ...@@ -165,7 +165,7 @@ typedef struct {
typedef struct { typedef struct {
/// Parameter: High-speed-flag, see TS 36.211 (5.7.2). \vr{[0..1]} 1 corresponds to Restricted set and 0 to Unrestricted set. /// Parameter: High-speed-flag, see TS 36.211 (5.7.2). \vr{[0..1]} 1 corresponds to Restricted set and 0 to Unrestricted set.
uint8_t highSpeedFlag; uint8_t highSpeedFlag;
/// Parameter: \f$N_\text{CS}\f$, see TS 36.211 (5.7.2). \vr{[0..15]}\n Refer to table 5.7.2-2 for preamble format 0..3 and to table 5.7.2-3 for preamble format 4. /// Parameter: \f$N_\text{CS}\f$, see TS 36.211 (5.7.2). \vr{[0..15]}\n Refer to table 5.7.2-2 for preamble format 0..3 and to table 5.7.2-3 for preamble format 4.
uint8_t zeroCorrelationZoneConfig; uint8_t zeroCorrelationZoneConfig;
/// Parameter: prach-FrequencyOffset, see TS 36.211 (5.7.1). \vr{[0..94]}\n For TDD the value range is dependent on the value of \ref prach_ConfigIndex. /// Parameter: prach-FrequencyOffset, see TS 36.211 (5.7.1). \vr{[0..94]}\n For TDD the value range is dependent on the value of \ref prach_ConfigIndex.
...@@ -177,7 +177,7 @@ typedef struct { ...@@ -177,7 +177,7 @@ typedef struct {
uint8_t prach_ConfigIndex[4]; uint8_t prach_ConfigIndex[4];
/// indicator for CE level activation /// indicator for CE level activation
uint8_t prach_CElevel_enable[4]; uint8_t prach_CElevel_enable[4];
/// prach frequency offset for each CE level /// prach frequency offset for each CE level
uint8_t prach_FreqOffset[4]; uint8_t prach_FreqOffset[4];
/// indicator for CE level hopping activation /// indicator for CE level hopping activation
uint8_t prach_hopping_enable[4]; uint8_t prach_hopping_enable[4];
...@@ -194,7 +194,7 @@ typedef struct { ...@@ -194,7 +194,7 @@ typedef struct {
/// PRACH Configuration Information /// PRACH Configuration Information
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
PRACH_eMTC_CONFIG_INFO prach_ConfigInfo; PRACH_eMTC_CONFIG_INFO prach_ConfigInfo;
#endif #endif
} PRACH_eMTC_CONFIG_COMMON; } PRACH_eMTC_CONFIG_COMMON;
#endif #endif
...@@ -728,8 +728,8 @@ typedef enum {format0, ...@@ -728,8 +728,8 @@ typedef enum {format0,
format2C, format2C,
format2D, format2D,
format3, format3,
format3A, format3A,
format4, format4,
format5, format5,
format6_0A, format6_0A,
format6_0B, format6_0B,
...@@ -772,7 +772,7 @@ typedef struct { ...@@ -772,7 +772,7 @@ typedef struct {
rnti_t rnti; rnti_t rnti;
/// Format /// Format
DCI_format_t format; DCI_format_t format;
/// epdcch resource assignment (0=localized,1=distributed) /// epdcch resource assignment (0=localized,1=distributed)
uint8_t epdcch_resource_assignment_flag; uint8_t epdcch_resource_assignment_flag;
/// epdcch index /// epdcch index
uint16_t epdcch_id; uint16_t epdcch_id;
...@@ -781,7 +781,7 @@ typedef struct { ...@@ -781,7 +781,7 @@ typedef struct {
/// epdcch number of PRBs in set /// epdcch number of PRBs in set
uint8_t epdcch_num_prb; uint8_t epdcch_num_prb;
/// vector of prb ids for set /// vector of prb ids for set
uint8_t epdcch_prb_index[MAX_EPDCCH_PRB]; uint8_t epdcch_prb_index[MAX_EPDCCH_PRB];
/// LBT parameter for frame configuration /// LBT parameter for frame configuration
uint8_t dwpts_symbols; uint8_t dwpts_symbols;
/// LBT parameter for frame configuration /// LBT parameter for frame configuration
...@@ -789,7 +789,7 @@ typedef struct { ...@@ -789,7 +789,7 @@ typedef struct {
/// DCI pdu /// DCI pdu
uint8_t dci_pdu[8]; uint8_t dci_pdu[8];
} eDCI_ALLOC_t; } eDCI_ALLOC_t;
typedef struct { typedef struct {
/// Length of DCI in bits /// Length of DCI in bits
uint8_t dci_length; uint8_t dci_length;
...@@ -811,7 +811,7 @@ typedef struct { ...@@ -811,7 +811,7 @@ typedef struct {
uint8_t number_of_prb_pairs; uint8_t number_of_prb_pairs;
/// mpdcch resource assignment (combinatorial index r) /// mpdcch resource assignment (combinatorial index r)
uint8_t resource_block_assignment; uint8_t resource_block_assignment;
/// transmission type (0=localized,1=distributed) /// transmission type (0=localized,1=distributed)
uint8_t transmission_type; uint8_t transmission_type;
/// mpdcch start symbol /// mpdcch start symbol
uint8_t start_symbol; uint8_t start_symbol;
...@@ -903,14 +903,15 @@ typedef enum { ...@@ -903,14 +903,15 @@ typedef enum {
ZEROS, ZEROS,
NONE NONE
} Extension_t; } Extension_t;
enum transmission_access_mode { enum transmission_access_mode {
NO_ACCESS=0, NO_ACCESS=0,
POSTPONED_ACCESS, POSTPONED_ACCESS,
CANCELED_ACCESS, CANCELED_ACCESS,
UNKNOWN_ACCESS, UNKNOWN_ACCESS,
SCHEDULED_ACCESS, SCHEDULED_ACCESS,
CBA_ACCESS}; CBA_ACCESS
};
typedef enum { typedef enum {
eNodeB_3GPP=0, // classical eNodeB function eNodeB_3GPP=0, // classical eNodeB function
...@@ -959,49 +960,47 @@ extern int sync_var; ...@@ -959,49 +960,47 @@ extern int sync_var;
typedef uint8_t(decoder_if_t)(int16_t *y, typedef uint8_t(decoder_if_t)(int16_t *y,
int16_t *y2, int16_t *y2,
uint8_t *decoded_bytes, uint8_t *decoded_bytes,
uint8_t *decoded_bytes2, uint8_t *decoded_bytes2,
uint16_t n, uint16_t n,
uint8_t max_iterations, uint8_t max_iterations,
uint8_t crc_type, uint8_t crc_type,
uint8_t F, uint8_t F,
time_stats_t *init_stats, time_stats_t *init_stats,
time_stats_t *alpha_stats, time_stats_t *alpha_stats,
time_stats_t *beta_stats, time_stats_t *beta_stats,
time_stats_t *gamma_stats, time_stats_t *gamma_stats,
time_stats_t *ext_stats, time_stats_t *ext_stats,
time_stats_t *intl1_stats, time_stats_t *intl1_stats,
time_stats_t *intl2_stats); time_stats_t *intl2_stats);
typedef uint8_t(encoder_if_t)(uint8_t *input, typedef uint8_t(encoder_if_t)(uint8_t *input,
uint16_t input_length_bytes, uint16_t input_length_bytes,
uint8_t *output, uint8_t *output,
uint8_t F); uint8_t F);
static inline void wait_sync(char *thread_name) { static inline void wait_sync(char *thread_name) {
printf( "waiting for sync (%s,%d/%p,%p,%p)\n",thread_name,sync_var,&sync_var,&sync_cond,&sync_mutex); printf( "waiting for sync (%s,%d/%p,%p,%p)\n",thread_name,sync_var,&sync_var,&sync_cond,&sync_mutex);
pthread_mutex_lock( &sync_mutex ); pthread_mutex_lock( &sync_mutex );
while (sync_var<0) while (sync_var<0)
pthread_cond_wait( &sync_cond, &sync_mutex ); pthread_cond_wait( &sync_cond, &sync_mutex );
pthread_mutex_unlock(&sync_mutex); pthread_mutex_unlock(&sync_mutex);
printf( "got sync (%s)\n", thread_name); printf( "got sync (%s)\n", thread_name);
} }
static inline int wakeup_thread(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) { static inline int wakeup_thread(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) {
if (pthread_mutex_lock(mutex) != 0) { if (pthread_mutex_lock(mutex) != 0) {
LOG_E( PHY, "error locking mutex for %s\n",name); LOG_E( PHY, "error locking mutex for %s\n",name);
exit_fun("nothing to add"); exit_fun("nothing to add");
return(-1); return(-1);
} }
*instance_cnt = *instance_cnt + 1; *instance_cnt = *instance_cnt + 1;
// the thread can now be woken up // the thread can now be woken up
if (pthread_cond_signal(cond) != 0) { if (pthread_cond_signal(cond) != 0) {
LOG_E( PHY, "ERROR pthread_cond_signal\n"); LOG_E( PHY, "ERROR pthread_cond_signal\n");
...@@ -1031,11 +1030,11 @@ static inline int wait_on_condition(pthread_mutex_t *mutex,pthread_cond_t *cond, ...@@ -1031,11 +1030,11 @@ static inline int wait_on_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,
exit_fun("nothing to add"); exit_fun("nothing to add");
return(-1); return(-1);
} }
return(0); return(0);
} }
static inline int wait_on_busy_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) { static inline int wait_on_busy_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) {
if (pthread_mutex_lock(mutex) != 0) { if (pthread_mutex_lock(mutex) != 0) {
LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s\n",name); LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s\n",name);
exit_fun("nothing to add"); exit_fun("nothing to add");
...@@ -1053,11 +1052,11 @@ static inline int wait_on_busy_condition(pthread_mutex_t *mutex,pthread_cond_t * ...@@ -1053,11 +1052,11 @@ static inline int wait_on_busy_condition(pthread_mutex_t *mutex,pthread_cond_t *
exit_fun("nothing to add"); exit_fun("nothing to add");
return(-1); return(-1);
} }
return(0); return(0);
} }
static inline int release_thread(pthread_mutex_t *mutex,int *instance_cnt,char *name) { static inline int release_thread(pthread_mutex_t *mutex,int *instance_cnt,char *name) {
if (pthread_mutex_lock(mutex) != 0) { if (pthread_mutex_lock(mutex) != 0) {
LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s\n",name); LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s\n",name);
exit_fun("nothing to add"); exit_fun("nothing to add");
...@@ -1071,6 +1070,7 @@ static inline int release_thread(pthread_mutex_t *mutex,int *instance_cnt,char * ...@@ -1071,6 +1070,7 @@ static inline int release_thread(pthread_mutex_t *mutex,int *instance_cnt,char *
exit_fun("nothing to add"); exit_fun("nothing to add");
return(-1); return(-1);
} }
return(0); return(0);
} }
......
This diff is collapsed.
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. except in compliance with the License.
* You may obtain a copy of the License at You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698 http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and See the License for the specific language governing permissions and
* limitations under the License. limitations under the License.
*------------------------------------------------------------------------------- -------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance: For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org contact@openairinterface.org
*/ */
openair0_device openair0; openair0_device openair0;
volatile int oai_exit=0; volatile int oai_exit=0;
void exit_function(const char* file, const char* function, const int line,const char *s) { void exit_function(const char *file, const char *function, const int line,const char *s) {
const char * msg= s==NULL ? "no comment": s; const char *msg= s==NULL ? "no comment": s;
printf("Exiting at: %s:%d %s(), %s\n", file, line, function, msg); printf("Exiting at: %s:%d %s(), %s\n", file, line, function, msg);
exit(-1); exit(-1);
} }
extern unsigned int dlsch_tbs25[27][25],TBStable[27][110]; extern unsigned int dlsch_tbs25[27][25],TBStable[27][110];
......
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. except in compliance with the License.
* You may obtain a copy of the License at You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698 http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and See the License for the specific language governing permissions and
* limitations under the License. limitations under the License.
*------------------------------------------------------------------------------- -------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance: For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org contact@openairinterface.org
*/ */
/* /*
platform_types.h platform_types.h
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
# define __PLATFORM_TYPES_H__ # define __PLATFORM_TYPES_H__
#if !defined(NAS_NETLINK) #if !defined(NAS_NETLINK)
#include <stdint.h> #include <stdint.h>
#endif #endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -39,22 +39,22 @@ ...@@ -39,22 +39,22 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
/* boolean_t is also defined in openair2/COMMON/commonDef.h, /* boolean_t is also defined in openair2/COMMON/commonDef.h,
* let's protect potential redefinition let's protect potential redefinition
*/ */
#ifndef _BOOLEAN_T_DEFINED_ #ifndef _BOOLEAN_T_DEFINED_
#define _BOOLEAN_T_DEFINED_ #define _BOOLEAN_T_DEFINED_
typedef signed char boolean_t; typedef signed char boolean_t;
#if !defined(TRUE) #if !defined(TRUE)
#define TRUE (boolean_t)0x01 #define TRUE (boolean_t)0x01
#endif #endif
#if !defined(FALSE) #if !defined(FALSE)
#define FALSE (boolean_t)0x00 #define FALSE (boolean_t)0x00
#endif #endif
#define BOOL_NOT(b) (b^TRUE) #define BOOL_NOT(b) (b^TRUE)
#endif /* _BOOLEAN_T_DEFINED_ */ #endif /* _BOOLEAN_T_DEFINED_ */
...@@ -102,12 +102,12 @@ typedef enum rb_type_e { ...@@ -102,12 +102,12 @@ typedef enum rb_type_e {
} rb_type_t; } rb_type_t;
typedef enum { typedef enum {
CR_ROUND = 0, CR_ROUND = 0,
CR_SRB12 = 1, CR_SRB12 = 1,
CR_HOL = 2, CR_HOL = 2,
CR_LC = 3, CR_LC = 3,
CR_CQI = 4, CR_CQI = 4,
CR_NUM = 5 CR_NUM = 5
} sorting_criterion_t; } sorting_criterion_t;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -182,19 +182,19 @@ typedef uint32_t m_tmsi_t; ...@@ -182,19 +182,19 @@ typedef uint32_t m_tmsi_t;
//Random UE identity length = 40 bits //Random UE identity length = 40 bits
#if ! defined(NOT_A_RANDOM_UE_IDENTITY) #if ! defined(NOT_A_RANDOM_UE_IDENTITY)
#define NOT_A_RANDOM_UE_IDENTITY (uint64_t)0xFFFFFFFF #define NOT_A_RANDOM_UE_IDENTITY (uint64_t)0xFFFFFFFF
#endif #endif
#if ! defined(NOT_A_RNTI) #if ! defined(NOT_A_RNTI)
#define NOT_A_RNTI (rnti_t)0 #define NOT_A_RNTI (rnti_t)0
#endif #endif
#if ! defined(M_RNTI) #if ! defined(M_RNTI)
#define M_RNTI (rnti_t)0xFFFD #define M_RNTI (rnti_t)0xFFFD
#endif #endif
#if ! defined(P_RNTI) #if ! defined(P_RNTI)
#define P_RNTI (rnti_t)0xFFFE #define P_RNTI (rnti_t)0xFFFE
#endif #endif
#if ! defined(SI_RNTI) #if ! defined(SI_RNTI)
#define SI_RNTI (rnti_t)0xFFFF #define SI_RNTI (rnti_t)0xFFFF
#endif #endif
typedef enum config_action_e { typedef enum config_action_e {
CONFIG_ACTION_NULL = 0, CONFIG_ACTION_NULL = 0,
...@@ -219,7 +219,7 @@ typedef uint8_t ebi_t; // eps bearer id ...@@ -219,7 +219,7 @@ typedef uint8_t ebi_t; // eps bearer id
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// may be ITTI not enabled, but type instance is useful also for OTG, // may be ITTI not enabled, but type instance is useful also for OTG,
#if !defined(instance_t) #if !defined(instance_t)
typedef uint16_t instance_t; typedef uint16_t instance_t;
#endif #endif
typedef struct protocol_ctxt_s { typedef struct protocol_ctxt_s {
module_id_t module_id; /*!< \brief Virtualized module identifier */ module_id_t module_id; /*!< \brief Virtualized module identifier */
...@@ -241,51 +241,51 @@ typedef struct protocol_ctxt_s { ...@@ -241,51 +241,51 @@ typedef struct protocol_ctxt_s {
#define MODULE_ID_TO_INSTANCE(mODULE_iD, iNSTANCE, eNB_fLAG) \ #define MODULE_ID_TO_INSTANCE(mODULE_iD, iNSTANCE, eNB_fLAG) \
if(eNB_fLAG == ENB_FLAG_YES) \ if(eNB_fLAG == ENB_FLAG_YES) \
iNSTANCE = ENB_MODULE_ID_TO_INSTANCE(mODULE_iD); \ iNSTANCE = ENB_MODULE_ID_TO_INSTANCE(mODULE_iD); \
else \ else \
iNSTANCE = UE_MODULE_ID_TO_INSTANCE(mODULE_iD) iNSTANCE = UE_MODULE_ID_TO_INSTANCE(mODULE_iD)
#define INSTANCE_TO_MODULE_ID(iNSTANCE, mODULE_iD, eNB_fLAG) \ #define INSTANCE_TO_MODULE_ID(iNSTANCE, mODULE_iD, eNB_fLAG) \
if(eNB_fLAG == ENB_FLAG_YES) \ if(eNB_fLAG == ENB_FLAG_YES) \
mODULE_iD = ENB_INSTANCE_TO_MODULE_ID(iNSTANCE); \ mODULE_iD = ENB_INSTANCE_TO_MODULE_ID(iNSTANCE); \
else \ else \
mODULE_iD = UE_INSTANCE_TO_MODULE_ID(iNSTANCE) mODULE_iD = UE_INSTANCE_TO_MODULE_ID(iNSTANCE)
#define PROTOCOL_CTXT_COMPUTE_MODULE_ID(CtXt_h) \ #define PROTOCOL_CTXT_COMPUTE_MODULE_ID(CtXt_h) \
INSTANCE_TO_MODULE_ID( (CtXt_h)->instance , (CtXt_h)->module_id , (CtXt_h)->enb_flag ) INSTANCE_TO_MODULE_ID( (CtXt_h)->instance , (CtXt_h)->module_id , (CtXt_h)->enb_flag )
#define PROTOCOL_CTXT_COMPUTE_INSTANCE(CtXt_h) \ #define PROTOCOL_CTXT_COMPUTE_INSTANCE(CtXt_h) \
MODULE_ID_TO_INSTANCE( (CtXt_h)->module_id , (CtXt_h)->instance , (CtXt_h)->enb_flag ) MODULE_ID_TO_INSTANCE( (CtXt_h)->module_id , (CtXt_h)->instance , (CtXt_h)->enb_flag )
#define PROTOCOL_CTXT_SET_BY_MODULE_ID(Ctxt_Pp, mODULE_iD, eNB_fLAG, rNTI, fRAME, sUBfRAME, eNB_iNDEX) \ #define PROTOCOL_CTXT_SET_BY_MODULE_ID(Ctxt_Pp, mODULE_iD, eNB_fLAG, rNTI, fRAME, sUBfRAME, eNB_iNDEX) \
(Ctxt_Pp)->module_id = mODULE_iD; \ (Ctxt_Pp)->module_id = mODULE_iD; \
(Ctxt_Pp)->enb_flag = eNB_fLAG; \ (Ctxt_Pp)->enb_flag = eNB_fLAG; \
(Ctxt_Pp)->rnti = rNTI; \ (Ctxt_Pp)->rnti = rNTI; \
(Ctxt_Pp)->frame = fRAME; \ (Ctxt_Pp)->frame = fRAME; \
(Ctxt_Pp)->subframe = sUBfRAME; \ (Ctxt_Pp)->subframe = sUBfRAME; \
(Ctxt_Pp)->eNB_index = eNB_iNDEX; \ (Ctxt_Pp)->eNB_index = eNB_iNDEX; \
PROTOCOL_CTXT_COMPUTE_INSTANCE(Ctxt_Pp) PROTOCOL_CTXT_COMPUTE_INSTANCE(Ctxt_Pp)
#define PROTOCOL_CTXT_SET_BY_INSTANCE(Ctxt_Pp, iNSTANCE, eNB_fLAG, rNTI, fRAME, sUBfRAME) \ #define PROTOCOL_CTXT_SET_BY_INSTANCE(Ctxt_Pp, iNSTANCE, eNB_fLAG, rNTI, fRAME, sUBfRAME) \
(Ctxt_Pp)->instance = iNSTANCE; \ (Ctxt_Pp)->instance = iNSTANCE; \
(Ctxt_Pp)->enb_flag = eNB_fLAG; \ (Ctxt_Pp)->enb_flag = eNB_fLAG; \
(Ctxt_Pp)->rnti = rNTI; \ (Ctxt_Pp)->rnti = rNTI; \
(Ctxt_Pp)->frame = fRAME; \ (Ctxt_Pp)->frame = fRAME; \
(Ctxt_Pp)->subframe = sUBfRAME; \ (Ctxt_Pp)->subframe = sUBfRAME; \
PROTOCOL_CTXT_COMPUTE_MODULE_ID(Ctxt_Pp) PROTOCOL_CTXT_COMPUTE_MODULE_ID(Ctxt_Pp)
#define PROTOCOL_CTXT_FMT "[FRAME %05u][%s][MOD %02u][RNTI %" PRIx16 "]" #define PROTOCOL_CTXT_FMT "[FRAME %05u][%s][MOD %02u][RNTI %" PRIx16 "]"
#define PROTOCOL_CTXT_ARGS(CTXT_Pp) \ #define PROTOCOL_CTXT_ARGS(CTXT_Pp) \
(CTXT_Pp)->frame, \ (CTXT_Pp)->frame, \
((CTXT_Pp)->enb_flag == ENB_FLAG_YES) ? "eNB":" UE", \ ((CTXT_Pp)->enb_flag == ENB_FLAG_YES) ? "eNB":" UE", \
(CTXT_Pp)->module_id, \ (CTXT_Pp)->module_id, \
(CTXT_Pp)->rnti (CTXT_Pp)->rnti
#define CHECK_CTXT_ARGS(CTXT_Pp) #define CHECK_CTXT_ARGS(CTXT_Pp)
#define exit_fun(msg) exit_function(__FILE__,__FUNCTION__,__LINE__,msg) #define exit_fun(msg) exit_function(__FILE__,__FUNCTION__,__LINE__,msg)
void exit_function(const char* file, const char* function, const int line, const char* s); void exit_function(const char *file, const char *function, const int line, const char *s);
#endif #endif
This diff is collapsed.
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. except in compliance with the License.
* You may obtain a copy of the License at You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698 http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and See the License for the specific language governing permissions and
* limitations under the License. limitations under the License.
*------------------------------------------------------------------------------- -------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance: For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org contact@openairinterface.org
*/ */
/* /*
enb_config.h enb_config.h
...@@ -41,27 +41,27 @@ ...@@ -41,27 +41,27 @@
#include "PHY/defs_eNB.h" #include "PHY/defs_eNB.h"
#include "s1ap_messages_types.h" #include "s1ap_messages_types.h"
#ifdef CMAKER #ifdef CMAKER
#include "SystemInformationBlockType2.h" #include "SystemInformationBlockType2.h"
#include "rrc_messages_types.h" #include "rrc_messages_types.h"
#else #else
#include "RRC/LTE/MESSAGES/SystemInformationBlockType2.h" #include "RRC/LTE/MESSAGES/SystemInformationBlockType2.h"
#endif #endif
#include "RRC/LTE/rrc_defs.h" #include "RRC/LTE/rrc_defs.h"
#include <intertask_interface.h> #include <intertask_interface.h>
#define IPV4_STR_ADDR_TO_INT_NWBO(AdDr_StR,NwBo,MeSsAgE ) do {\ #define IPV4_STR_ADDR_TO_INT_NWBO(AdDr_StR,NwBo,MeSsAgE ) do {\
struct in_addr inp;\ struct in_addr inp;\
if ( inet_aton(AdDr_StR, &inp ) < 0 ) {\ if ( inet_aton(AdDr_StR, &inp ) < 0 ) {\
AssertFatal (0, MeSsAgE);\ AssertFatal (0, MeSsAgE);\
} else {\ } else {\
NwBo = inp.s_addr;\ NwBo = inp.s_addr;\
}\ }\
} while (0); } while (0);
/** @defgroup _enb_app ENB APP /** @defgroup _enb_app ENB APP
* @ingroup _oai2 @ingroup _oai2
* @{ @{
*/ */
// Hard to find a defined value for max enb... // Hard to find a defined value for max enb...
#define MAX_ENB 16 #define MAX_ENB 16
......
This diff is collapsed.
This diff is collapsed.
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. except in compliance with the License.
* You may obtain a copy of the License at You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698 http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and See the License for the specific language governing permissions and
* limitations under the License. limitations under the License.
*------------------------------------------------------------------------------- -------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance: For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org contact@openairinterface.org
*/ */
/*************************************************************************** /***************************************************************************
mem_block.h - description mem_block.h - description
...@@ -51,15 +51,15 @@ typedef struct mem_block_t { ...@@ -51,15 +51,15 @@ typedef struct mem_block_t {
void *pool_buffer_init (void); void *pool_buffer_init (void);
void *pool_buffer_clean (void *arg); void *pool_buffer_clean (void *arg);
void free_mem_block (mem_block_t * leP, const char* caller); void free_mem_block (mem_block_t *leP, const char *caller);
mem_block_t* get_free_mem_block (uint32_t sizeP, const char* caller); mem_block_t *get_free_mem_block (uint32_t sizeP, const char *caller);
mem_block_t *get_free_copy_mem_block (void); mem_block_t *get_free_copy_mem_block (void);
mem_block_t *get_free_copy_mem_block_up (void); mem_block_t *get_free_copy_mem_block_up (void);
mem_block_t *copy_mem_block (mem_block_t * leP, mem_block_t * destP); mem_block_t *copy_mem_block (mem_block_t *leP, mem_block_t *destP);
void display_mem_load (void); void display_mem_load (void);
void check_mem_area (void); void check_mem_area (void);
void check_free_mem_block (mem_block_t * leP); void check_free_mem_block (mem_block_t *leP);
# define MEM_SCALE MAX_MOBILES_PER_ENB # define MEM_SCALE MAX_MOBILES_PER_ENB
// definition of the size of the allocated memory area // definition of the size of the allocated memory area
# define MEM_MNGT_MB0_BLOCK_SIZE 64 # define MEM_MNGT_MB0_BLOCK_SIZE 64
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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