Clang-formated before pull request

master
Pedro Alvarez 5 years ago committed by Andre Puschmann
parent 61958af70b
commit e1cdd51eba

@ -42,11 +42,7 @@
namespace srsue {
typedef enum {
AUTH_OK,
AUTH_FAILED,
AUTH_SYNCH_FAILURE
} auth_result_t;
typedef enum { AUTH_OK, AUTH_FAILED, AUTH_SYNCH_FAILURE } auth_result_t;
// USIM interface for NAS
class usim_interface_nas
@ -418,7 +414,6 @@ public:
uint16_t sps_rnti;
uint64_t contention_id;
} ue_rnti_t;
};
/* Interface RRC -> MAC */

@ -36,7 +36,6 @@ namespace srslte {
#define RLC_AM_WINDOW_SIZE 512
#define RLC_MAX_SDU_SIZE ((1 << 11) - 1) // Length of LI field is 11bits
typedef enum {
RLC_FI_FIELD_START_AND_END_ALIGNED = 0,
RLC_FI_FIELD_NOT_END_ALIGNED,
@ -89,8 +88,7 @@ typedef enum {
RLC_DC_FIELD_DATA_PDU,
RLC_DC_FIELD_N_ITEMS,
} rlc_dc_field_t;
static const char rlc_dc_field_text[RLC_DC_FIELD_N_ITEMS][20] = {"Control PDU",
"Data PDU"};
static const char rlc_dc_field_text[RLC_DC_FIELD_N_ITEMS][20] = {"Control PDU", "Data PDU"};
// UMD PDU Header
typedef struct {
@ -120,7 +118,8 @@ struct rlc_amd_pdu_header_t{
uint32_t N_li; // Number of length indicators
uint16_t li[RLC_AM_WINDOW_SIZE]; // Array of length indicators
rlc_amd_pdu_header_t(){
rlc_amd_pdu_header_t()
{
dc = RLC_DC_FIELD_CONTROL_PDU;
rf = 0;
p = 0;
@ -132,10 +131,7 @@ struct rlc_amd_pdu_header_t{
for (int i = 0; i < RLC_AM_WINDOW_SIZE; i++)
li[i] = 0;
}
rlc_amd_pdu_header_t(const rlc_amd_pdu_header_t& h)
{
copy(h);
}
rlc_amd_pdu_header_t(const rlc_amd_pdu_header_t& h) { copy(h); }
rlc_amd_pdu_header_t& operator=(const rlc_amd_pdu_header_t& h)
{
copy(h);
@ -164,7 +160,13 @@ struct rlc_status_nack_t{
uint16_t so_start;
uint16_t so_end;
rlc_status_nack_t(){has_so=false; nack_sn=0; so_start=0; so_end=0;}
rlc_status_nack_t()
{
has_so = false;
nack_sn = 0;
so_start = 0;
so_end = 0;
}
};
// STATUS PDU
@ -173,7 +175,11 @@ struct rlc_status_pdu_t{
uint32_t N_nack;
rlc_status_nack_t nacks[RLC_AM_WINDOW_SIZE];
rlc_status_pdu_t(){N_nack=0; ack_sn=0;}
rlc_status_pdu_t()
{
N_nack = 0;
ack_sn = 0;
}
};
/** RLC AM NR structs */
@ -204,7 +210,6 @@ typedef struct {
class rlc_common
{
public:
// Size of the Uplink buffer in number of PDUs
const static int RLC_BUFFER_NOF_PDU = 128;
@ -291,5 +296,4 @@ private:
};
} // namespace srslte
#endif // SRSLTE_RLC_COMMON_H

@ -339,7 +339,6 @@ void pdcp_entity_nr::deliver_all_consecutive_counts()
}
}
/*
* Timers
*/

@ -28,7 +28,6 @@
#include "srslte/upper/pdcp_entity_nr.h"
#include <iostream>
/*
* Functions and macros for comparisions
*/
@ -117,8 +116,10 @@ pdcp_initial_state normal_init_state = {};
// Some tests regarding COUNT wraparound take really long.
// This puts the PCDC state closer to wraparound quickly.
pdcp_initial_state near_wraparound_init_state = {
.tx_next = 4294967295, .rx_next = 4294967295, .rx_deliv = 4294967295, .rx_reord = 0};
pdcp_initial_state near_wraparound_init_state = {.tx_next = 4294967295,
.rx_next = 4294967295,
.rx_deliv = 4294967295,
.rx_reord = 0};
/*
* Dummy classes

@ -21,7 +21,6 @@
#include "pdcp_nr_test.h"
#include <numeric>
/*
* Genric function to test transmission of in-sequence packets
*/

@ -19,10 +19,10 @@
*
*/
#include <map>
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/interfaces/enb_interfaces.h"
#include "srslte/interfaces/ue_interfaces.h"
#include "srslte/upper/rlc.h"
#include <map>
#ifndef SRSENB_RLC_H
#define SRSENB_RLC_H

@ -38,7 +38,7 @@ void rlc::init(pdcp_interface_rlc* pdcp_,
pool = srslte::byte_buffer_pool::get_instance();
pthread_rwlock_init(&rwlock, NULL);
pthread_rwlock_init(&rwlock, nullptr);
}
void rlc::stop()
@ -217,7 +217,8 @@ void rlc::discard_sdu(uint16_t rnti, uint32_t lcid, uint32_t discard_sn)
pthread_rwlock_unlock(&rwlock);
}
bool rlc::rb_is_um(uint16_t rnti, uint32_t lcid) {
bool rlc::rb_is_um(uint16_t rnti, uint32_t lcid)
{
bool ret = false;
pthread_rwlock_rdlock(&rwlock);
if (users.count(rnti)) {
@ -261,4 +262,4 @@ std::string rlc::user_interface::get_rb_name(uint32_t lcid)
return std::string(rb_id_text[lcid]);
}
}
} // namespace srsenb

Loading…
Cancel
Save