Francisco Paisana
63142899d1
simplified some of the fsm sfinae conditions
2020-04-17 17:09:48 +01:00
Francisco Paisana
6322e447e9
fixed issue with subfsm revisits not starting in initial substate
2020-04-17 17:09:48 +01:00
Francisco Paisana
e1dc9cae15
added extra comments
2020-04-17 11:38:24 +01:00
Francisco Paisana
28467d568d
eliminated old way to schedule tasks using the heap
2020-04-17 11:38:24 +01:00
Francisco Paisana
d40dcd28f3
removed uneeded swap method
2020-04-17 11:38:24 +01:00
Francisco Paisana
b5abba41a3
use normal polymorphism to create vtable
2020-04-17 11:38:24 +01:00
Francisco Paisana
e2b10307ea
changed inplace_task name to move_callback
2020-04-17 11:38:24 +01:00
Francisco Paisana
ee50ed08c2
allow inplace task to be called in const contexts
2020-04-17 11:38:24 +01:00
Francisco Paisana
8d1beb42bd
fix leak in inplace task destructor
2020-04-17 11:38:24 +01:00
Francisco Paisana
1061f2144b
add consts
2020-04-17 11:38:24 +01:00
Francisco Paisana
cd9c722aa0
avoid branching in inplace_task
2020-04-17 11:38:24 +01:00
Francisco Paisana
ef834b3c60
changed inplace_task file name
2020-04-17 11:38:24 +01:00
Francisco Paisana
a6b7c5d1d2
inplace task now uses small buffer optimization for bigger captures
2020-04-17 11:38:24 +01:00
Francisco Paisana
4b2b76cf01
created inplace task to avoid mallocs in task enqueuing
2020-04-17 11:38:24 +01:00
Francisco Paisana
c09f76ed6c
unified stack task defer method
2020-04-10 22:30:59 +01:00
Francisco Paisana
977a1acc5e
eliminated unhandled_event special function. Use react instead.
2020-04-09 18:57:18 +01:00
Francisco Paisana
6e34dadce2
reverted back to tuples to store fsm state_list
2020-04-09 18:57:18 +01:00
Francisco Paisana
dbbeb1ec3b
fix log order
2020-04-09 18:57:18 +01:00
Francisco Paisana
4036a6887a
clean up enter/exit state methods
2020-04-09 18:57:18 +01:00
Francisco Paisana
8d3427e88a
removed namespacing from state printing
2020-04-09 18:57:18 +01:00
Francisco Paisana
b699e0e490
enter/exit moved outside of the states, into the fsm. Now i just use the type_name function to get a state name
2020-04-09 18:57:18 +01:00
Francisco Paisana
4a4827a603
created a method to detect unhandled events
2020-04-09 18:57:18 +01:00
Francisco Paisana
ec3ef4474e
created a simple procedure fsm
2020-04-09 18:57:18 +01:00
Francisco Paisana
1aae510e9d
enter/exit are now being called in order
2020-04-09 18:57:18 +01:00
Francisco Paisana
dd377becaa
small fixes in state transitions
2020-04-09 18:57:18 +01:00
Francisco Paisana
dc0427804f
clean up comments and add some util functions
2020-04-09 18:57:18 +01:00
Francisco Paisana
7dc1489ea7
reintroduced optional enter/exit methods for each state
2020-04-09 18:57:18 +01:00
Francisco Paisana
7c76a64238
fix move/copy correctness
2020-04-09 18:57:18 +01:00
Francisco Paisana
be5a33f9b7
deleted unused fsm methods
2020-04-09 18:57:18 +01:00
Francisco Paisana
6675e92806
implement fsm based on choice type
2020-04-09 18:57:18 +01:00
Francisco Paisana
018f9e7db2
implement visit pattern
2020-04-09 18:57:18 +01:00
Francisco Paisana
278a1686fb
creation of choice/variant type
2020-04-09 18:57:18 +01:00
Francisco Paisana
7932a6bed7
allow the use of move_tasks in procedures
2020-04-08 14:55:33 +01:00
Andre Puschmann
057844d7d6
signal_handler: increase alarm timeout to 5s and use raise instead of exit()
...
it seems that exit() causes problems when threads couldn't be stopped
properly, which is the reason why we have to call alarm() in the first place.
therefore, send a SIGKILL to our process and make sure we don't leave any
zombie threads running.
2020-04-03 22:22:04 +02:00
Francisco Paisana
c661025cda
fix log tti, and print a warning when the ul_harq tti does not match existing ones
2020-04-01 15:02:21 +01:00
Francisco Paisana
30ae2226c1
common interface for stack multiqueue tasks, background tasks and timers
2020-03-31 13:42:06 +01:00
Andre Puschmann
62e4bd9469
log_ptr: fix issue if accessing log_ptr that was reset already
...
during deinit of the UE/eNB it could happen that the log_ptr
was already set to null but the stack thread was still accessing
it through log_h->info()
i've moved the old macro into a new header and used as as much
as possible. there are still places in the code where similar
macros are used but we would need to change the variable name
to replace them
2020-03-31 12:32:52 +02:00
Francisco Paisana
344eaf49ec
use logmap in the whole enb and ue
2020-03-25 15:50:30 +00:00
Francisco Paisana
8e837e173d
printf has already a way to pad spaces. If we use it, we can avoid accidentally adding extra logs because we did srslte::logmap::get("MAC") instead of srslte::logmap::get("MAC ")
2020-03-24 22:36:27 +00:00
Ismael Gomez
fd3d4a7874
Refactor thread_pool: use std::mutex and fix some hidden potential bugs
2020-03-22 08:48:40 +01:00
Francisco Paisana
82cb6baef0
now the whole ue and enb mac uses the logmap
2020-03-20 11:32:03 +00:00
Francisco Paisana
fb967d17a2
now we can disable tprofs individually
2020-03-19 10:59:37 +00:00
Francisco Paisana
e73cbb09b0
created tprof statistic for sliding windows
2020-03-19 10:59:37 +00:00
Francisco Paisana
2601d106f5
fix license string
2020-03-19 10:59:37 +00:00
Francisco Paisana
deb76d5dbd
improved design to avoid data structures, and allow guarded start/stop even in lambdas
2020-03-19 10:59:37 +00:00
Francisco Paisana
8a54aef89d
created a better/more composable design for time measures
2020-03-19 10:59:37 +00:00
Francisco Paisana
854211496b
redesign of tprof for thread safety
2020-03-19 10:59:37 +00:00
Francisco Paisana
269c852767
created a class for time profiling. An object of such class, if disabled, has almost zero overhead. Added a compile-time flag to turn on/off time profiling
2020-03-19 10:59:37 +00:00
Andre Puschmann
ac17ec6452
add common signal_handler for srsUE/srsENB/srsEPC
...
the signal handler is the same for all three apps. The "running" flag
as well as the file_logger object are in the common header in order
to allow the signal handler to flush the file if the alarm goes off.
2020-03-17 09:58:01 +01:00
Andre Puschmann
4e3e537982
fix doxygen file description
2020-03-17 09:58:01 +01:00
Xavier Arteaga
e832769ae6
Updated copyright
2020-03-16 11:26:06 +01:00
Francisco Paisana
5330249625
created tti_point type and unit test. Added also the tti_point to the scheduler harqs, and rrc procedure
2020-03-13 19:20:40 +00:00
Ismael Gomez
e8b8c9922e
Add RF per-channel frequency band constraints ( #1026 )
2020-03-12 23:06:09 +01:00
Francisco Paisana
7548402632
change scell activation interface to use arrays. Added a method to the scheduler to get the current set of activated carriers
2020-03-11 21:56:33 +01:00
Xavier Arteaga
590847e794
TTI semaphore requires protection in wait_all
2020-03-11 21:17:13 +01:00
Xavier Arteaga
76408b195e
Rename TX_DELAY and FDD_HARQ_DELAY_MS
2020-03-11 21:16:36 +01:00
Pedro Alvarez
96c82b3fc6
Moved PDCP configs to pdcp_config.h. Added `as_security_cfg_t` structure to hold access stratum keys.
...
Refactored PDCP, RRC and USIM accordingly.
2020-03-11 09:00:38 +00:00
Francisco Paisana
e62972d38e
fix fdd delays in scheduler
2020-03-10 14:17:49 +01:00
Ismael Gomez
4e12405fff
Remove radio_multi class and organize channels, ports and carrier buffers ( #1019 )
2020-03-06 15:26:48 +01:00
Xavier Arteaga
96ffe1c3ad
Commented class tti_semaphore
2020-03-06 12:24:28 +01:00
Andre Puschmann
664170fec6
pcap: add CC index when writing PCAP
2020-03-05 20:46:14 +01:00
Francisco Paisana
fed06138b9
moved rach_detected to stack thread. Created a more friendly interface to enqueue tasks in stack
2020-03-03 21:03:21 +00:00
Andre Puschmann
a8bbe551ac
move thread class into srslte namespace to avoid ambiguity between std::thread
2020-03-03 16:22:04 +01:00
Francisco Paisana
79e5bd94cf
remove timers from priority queue for which run() or stop() was called.
2020-02-29 18:00:11 +00:00
Francisco Paisana
5b2da779b7
new method in timer_handler to dispatch calls without an associated unique_timer
2020-02-29 18:00:11 +00:00
Francisco Paisana
32c347fbb1
hide logmap implementation in source file. Export symbols so they can be used by srsASN1 project
2020-02-28 11:33:26 +00:00
Francisco Paisana
e859d622c7
added logref class to forbid logmap pointer invalidation. Created a test for the logref, and introduced it in the scheduler, rrc and nas
2020-02-28 11:33:26 +00:00
Andre Puschmann
b88e877b4c
ttcn3: make SS single threaded and use SCTP for test ports
...
- remove all threading from SS
- use epoll to handle test port connections, signals, and timers
- convert testport interface to SCTP
2020-02-25 21:28:15 +01:00
Pedro Alvarez
aecfb151ce
Apply clang-format to the lib in preperation for PR.
2020-02-20 20:53:27 +01:00
Francisco Paisana
42449b079a
now the scell_activation CE is only for 1 octet. The 4 octet one is not yet supported.
2020-02-14 21:49:01 +00:00
Francisco Paisana
d831522692
addition of SCell Activation CE Cmd to scheduler and MAC
2020-02-14 21:49:01 +00:00
Francisco Paisana
a0407dd6f7
created a lock guard for pthread rwlocks. This will avoid using gotos in many cases, and the RAII technique avoids many accidents.
2020-02-14 14:53:57 +00:00
Xavier Arteaga
40772eae19
SRSENB: UE PHY dedicated takes a flat configuration structure
2020-02-13 10:29:00 +01:00
Francisco Paisana
e86862611c
update the scheduler interfaces to accommodate the configuration of multiple carriers
2020-02-07 15:06:46 +00:00
Andre Puschmann
ed179fd311
timers: rename value() to time_elapsed()
...
this seems to be better readable than value() since
we've sometimes confused it with the timeout value
2020-02-06 14:40:47 +01:00
Andre Puschmann
4932fb8719
fix value() return in timers when timer is expired
...
this makes sure that value() never returns a value larger
than the timer duration
2020-02-06 14:40:47 +01:00
Xavier Arteaga
e0cc1fd697
Reduce time of timer_test; use unique_lock instead of guard
2020-02-04 16:33:46 +01:00
Xavier Arteaga
22da8dfbb1
srsLTE: protected priority queue in timers
2020-02-04 16:33:46 +01:00
Andre Puschmann
bbacc35e24
move configuration of default logger to main
...
this prevents the case where a layer requests a new log_filter
before the default logger has been configured
2020-02-03 12:51:46 +01:00
Ismael Gomez
52716f8716
Process HO complete in the background to avoid heap-after-use bug when PHY measurements are reported during a HO
...
rrc_meas refactor. Need to split commit
Fix typo
Temporal commit
Apply rx_gain_offset to neighbour cell measurements
srsLTE: modify TESTASSERT Macro to follow codeline
SRSUE: prevent RRC from having serving cell in neighbour list
SRSUE: DL HARQ does not need Time Aligment Timer. UL is disabled using PUCCH resources release
SRSUE: extend intra-frequency to CA SCell
SRSUE: fix confusing/ambiguous code in the RRC measurements and fix concurrency issue
SRSUE: remove RRC measurement report triggers when measurements are modified or HO succesful
SRSUE: fix compilation issues and Reest SIB indexes
Fixes sync using incorrect cell configuration when search cell does not find a correct cell
Small refactor to remove measurement report triggers always after removing measurement
SRSUE: Removed SIC PSS from UE
SRSUE: fix inter-frequency reestablishment and added more traces
SRSUE: Fix compilation issue
2020-02-03 12:51:46 +01:00
Francisco Paisana
c8cd12ac53
updated the test logging utils
2020-01-29 17:15:35 +00:00
Francisco Paisana
c537d38650
separated sched tests based on output into a separate file. Added scheduler random tester to unit tests
2020-01-29 17:15:35 +00:00
Francisco Paisana
f6ed99b71b
created a generic crtp class for handling singletons. I am using that class for the logmap now
2020-01-29 14:20:43 +00:00
Francisco Paisana
ea777d92e8
applied new logmap class to nas
2020-01-29 14:20:43 +00:00
Francisco Paisana
3e2de6dd3e
new logmap class to store globally accessible logs
2020-01-29 14:20:43 +00:00
Francisco Paisana
07a9e889a4
added a singleton map to facilitate access to each layer logger
2020-01-29 14:20:43 +00:00
Andre Puschmann
e5b1673b3b
move PCAP into own compilation unit
...
this removes inline keyword from PCAP functions and puts all functions
into own C file
before forced inlining caused an issue when compiling for ARM on Ubuntu 19.10 on the RPi4
using gcc version 9.2.1
2020-01-24 13:15:45 +01:00
Francisco Paisana
883c2900c8
fix issue with future clear
2020-01-24 10:10:27 +00:00
Francisco Paisana
91d83fc20d
different way to retrieve a proc future
2020-01-24 10:10:27 +00:00
Francisco Paisana
ee24b59924
converted s1ap to new s1ap asn1 lib. Cleaned up bitstring packing/unpacking and bitstring types
2020-01-21 00:58:19 +00:00
Andre Puschmann
b0bfc7956d
use const& in metrics interface
2020-01-14 20:52:09 +01:00
Xavier Arteaga
b1c4cd7189
srsLTE: removed timout in tti semaphore
2019-12-19 13:01:05 +01:00
Xavier Arteaga
6bef91a788
srsLTE: TTI sempahore wait for all resuses wait code.
2019-12-19 13:01:05 +01:00
Xavier Arteaga
a7e92c384e
srsLTE: applied minor comments in tti semaphore
2019-12-19 13:01:05 +01:00
Xavier Arteaga
447ede327c
srsLTE: removed unused argument
2019-12-19 13:01:05 +01:00
Xavier Arteaga
384c420c7c
SRSUE: fix phy workers concurrency issue
2019-12-19 13:01:05 +01:00
Andre Puschmann
476f970ee1
replace FIXME with TODO
2019-12-18 11:25:56 +01:00
Pedro Alvarez
c5979f59eb
Clang format UE, eNB and lib ( #850 )
...
* Clang-formated UE, eNB and lib.
* Fixed compiling errors from clang-format.
* Fix linking issues introduced by clang-format
* Fix poor formating in initializing arrays of arrays.
* Fix mistake in conflict resolution on rm_turbo.c
* Re-apply clang format to gtpc_ies.h
2019-12-16 16:04:22 +01:00
Andre Puschmann
42080e59f1
remove std::move when returning freshly created unique_ptr
2019-12-16 14:06:26 +01:00
Francisco Paisana
5b4c42ac77
pass argument by pointer to avoid gcc4.8 issue
2019-12-16 14:06:26 +01:00
Francisco Paisana
20ff016e40
fixed header guard of threads file
2019-12-16 12:49:07 +01:00
Xavier Arteaga
1fa5a19a55
SRSUE: SRSUE: fix timealigmenttimer
2019-12-12 12:05:51 +01:00
Pedro Alvarez
e1cdd51eba
Clang-formated before pull request
2019-12-04 18:21:14 +01:00
Pedro Alvarez
e68956bcf6
Adding discard timer timeout to PDCP config.
2019-12-04 18:21:14 +01:00
Pedro Alvarez
9870c73366
Starting to add discardTimers to PDCP NR.
2019-12-04 18:21:14 +01:00
Francisco Paisana
c29d8b418a
fix coverity va_list issues
2019-12-04 10:44:01 +00:00
Francisco Paisana
54992e72f1
fixed and simplified multiqueue task api to avoid dangling pointers.
2019-11-28 11:57:41 +00:00
Francisco Paisana
6746c5dfa5
pass task functor by copy to avoid dangling pointers
2019-11-28 11:57:41 +00:00
Francisco Paisana
b2d3c2a150
fix compilation issue
2019-11-28 11:57:41 +00:00
Francisco Paisana
ac4d3b9624
std::functions do not accept move-only captures. So I had to create a wrapper earlier. In this PR, I cleaned a bit the previous API for the code to be a bit more readable
2019-11-28 11:57:41 +00:00
Francisco Paisana
c9f092e8e9
created a nullsink and a TESTASSERT for C
2019-11-28 11:44:54 +00:00
Francisco Paisana
67ccaf1029
created a file with common test utils, including assertions, a logger specialized for tests that counts the number of errors and warnings during the test run and can print diagnostics on exit
2019-11-28 11:44:54 +00:00
Andre Puschmann
47019e26f6
fix signed/unsigned comparison warning
2019-11-24 14:59:54 +01:00
Andre Puschmann
6f72cbffab
fix snprintf of uint64 for ARM
2019-11-24 14:59:54 +01:00
Francisco Paisana
e8487211e4
changed the naming of mch to m1u in the gtpu class
2019-11-20 10:34:35 +00:00
Francisco Paisana
1400777639
removed 1st thread from GTPU
2019-11-20 10:34:35 +00:00
Francisco Paisana
a9a33256e9
fixed some of the net utils functions
2019-11-15 17:57:36 +00:00
Francisco Paisana
546ee98879
fixed small issue that was causing compilation errors
2019-11-15 17:57:36 +00:00
Francisco Paisana
2de0eee9c7
clean up some comments
2019-11-15 17:57:36 +00:00
Francisco Paisana
76673d2d40
cleaned up socket util methods, and made the S1AP non-blocking.
2019-11-15 17:57:36 +00:00
Francisco Paisana
2c3e4a3daf
creation of util class net_addr_t that provides methods for conversion of IP addr const char* to sockaddr_in
2019-11-15 17:57:36 +00:00
Francisco Paisana
31dffde6c3
simplified interface and made it more generic to different types of sockets
2019-11-15 17:57:36 +00:00
Francisco Paisana
e37a718f21
created a sctp socket class
2019-11-15 17:57:36 +00:00
Francisco Paisana
131b1a7e41
added a class to handle multiple sockets via a select
2019-11-15 17:57:36 +00:00
Andre Puschmann
98ac39e617
fix compilation when macro SRSLTE_BUFFER_POOL_LOG_ENABLED is enabled
2019-11-15 17:20:51 +01:00
Francisco Paisana
57cd40ca31
added an ho required message send from SeNB to MME
2019-11-10 22:06:31 +00:00
Francisco Paisana
690a9850e7
cleaned up some old patterns and run clang-format in RRC and scheduler
2019-11-08 13:59:38 +00:00
Pedro Alvarez
ac9ee9d863
Added comment.
2019-11-07 14:12:08 +01:00
Pedro Alvarez
9998b3e857
Small white space fix and clang-format on pdcp_nr_test.h
2019-11-07 14:12:08 +01:00
Pedro Alvarez
8511fca940
Clang-formated to prepare for PR
2019-11-07 14:12:08 +01:00
Pedro Alvarez
ceea761ca4
Added append_bytes method to byte_buffer_t class. Continue to reduce boilerplate.
2019-11-07 14:12:08 +01:00
Pedro Alvarez
b92c99ad2f
Removing PDCP config from rrc_interfaces_types. Starting to add t_reordering configuration.
2019-11-07 14:12:08 +01:00
Pedro Alvarez
45d298507b
Starting to move pdcp configs to rrc_interface_types. Starting to add test for reorder timeout.
2019-11-07 14:12:08 +01:00
Andre Puschmann
f4a0bebe1f
fix handling of invalid MAC LCIDs
2019-10-31 21:43:27 +01:00
Andre Puschmann
aa9733eb59
add packing for CCCH over UL-SCH for MAC NR
2019-10-31 21:43:27 +01:00
Francisco Paisana
8440126d35
removal of srslte::timers class
2019-10-23 19:33:25 +01:00
Francisco Paisana
9ae5563331
fixed timer issue with setting the duration. Setting the duration cannot reset the on-going timer run
2019-10-23 19:33:25 +01:00
Francisco Paisana
d2c56caf7e
applied new timer class to the whole code base
2019-10-23 19:33:25 +01:00
Francisco Paisana
5953d5ef96
fixed some potential bug related to timer getting stopped, but signaling that it expired
2019-10-23 19:25:48 +01:00
Francisco Paisana
551192705e
allow for pre-reservation of timers vector and priority queue
2019-10-23 19:25:48 +01:00
Francisco Paisana
50a1c9d557
addressed potential overflow, and extended timer test to check if ordering is working correctly
2019-10-23 19:25:48 +01:00
Francisco Paisana
349646a9da
created a new class for timers. It uses a priority queue to avoid incrementing all timers every tti (step_all() went from O(N) to O(1)), and that is not bounded in number of timers. Not being bounded will be useful for layers that require one or more timers per UE
2019-10-23 19:25:48 +01:00
Francisco Paisana
15bde8660a
getting a future of an already finished proc is dangerous
2019-10-23 18:19:25 +02:00
Francisco Paisana
248583ecdf
added extra logging and removed uneeded member from proc_t
2019-10-23 18:19:25 +02:00
Francisco Paisana
b254bdbb93
typedefed the proc_result_t<void> to become proc_state_t
2019-10-23 18:19:25 +02:00
Francisco Paisana
f2d88e5a5b
simplified NAS rrc connection request procedure
...
move non-type-specific methods of proc_t to its base class.
procedure state machine was simplified via a future-type. Now procedures dont get stuck until the user reads the procedure outcome.
made the NAS procedures more event trigger/reaction-based.
2019-10-23 18:19:25 +02:00
Francisco Paisana
8864787f59
added the continuation functionality to procedures via the "then()" method.
2019-10-23 18:19:25 +02:00
Francisco Paisana
c1be118d1d
new wrapper-based design for stack procedures. Removes extra base class, gets rid of spurious copies/moves during the pop(), and allows the use of a non-default ctor()
2019-10-23 18:19:25 +02:00
Ismael Gomez
3828e03f33
Refactor in eNodeB, add channel emulator and fixes in OFDM
...
* Added channel emulator to srsENB. Added support for fixed delay
* Bug in OFDM when using nonguru mode
* A few changes and refactor in eNodeB
2019-10-23 11:09:39 -05:00
Xavier Arteaga
10480f62b3
SRSENB: Split sf_worker and cc_worker
2019-10-21 16:17:37 +02:00