Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
spbro
OpenXG-RAN
Commits
70dd524e
Commit
70dd524e
authored
Sep 04, 2024
by
Guido Casati
Committed by
Bartosz Podrygajlo
Sep 05, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Define softmodem bits in a separate header for either C and C++
parent
d8bba312
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
20 deletions
+63
-20
executables/softmodem-bits.h
executables/softmodem-bits.h
+61
-0
executables/softmodem-common.h
executables/softmodem-common.h
+1
-16
openair1/PHY/TOOLS/imscope/imscope.cpp
openair1/PHY/TOOLS/imscope/imscope.cpp
+1
-4
No files found.
executables/softmodem-bits.h
0 → 100644
View file @
70dd524e
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* 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
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* 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.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef SOFTMODEM_BITS_H
#define SOFTMODEM_BITS_H
// clang-format off
#define BIT_0 (1 << 0)
#define BIT_1 (1 << 1)
#define BIT_2 (1 << 2)
#define BIT_10 (1 << 10)
#define BIT_12 (1 << 12)
#define BIT_13 (1 << 13)
#define BIT_15 (1 << 15)
#define BIT_16 (1 << 16)
#define BIT_17 (1 << 17)
#define BIT_18 (1 << 18)
#define BIT_20 (1 << 20)
#define BIT_21 (1 << 21)
#define BIT_22 (1 << 22)
#define BIT_23 (1 << 23)
#define BIT_24 (1 << 24)
#define BIT_25 (1 << 25)
#define SOFTMODEM_NOS1_BIT BIT_0
#define SOFTMODEM_NOKRNMOD_BIT BIT_1
#define SOFTMODEM_NONBIOT_BIT BIT_2
#define SOFTMODEM_RFSIM_BIT BIT_10
#define SOFTMODEM_SIML1_BIT BIT_12
#define SOFTMODEM_DLSIM_BIT BIT_13
#define SOFTMODEM_DOSCOPE_BIT BIT_15
#define SOFTMODEM_RECPLAY_BIT BIT_16
#define SOFTMODEM_TELNETCLT_BIT BIT_17
#define SOFTMODEM_RECRECORD_BIT BIT_18
#define SOFTMODEM_ENB_BIT BIT_20
#define SOFTMODEM_GNB_BIT BIT_21
#define SOFTMODEM_4GUE_BIT BIT_22
#define SOFTMODEM_5GUE_BIT BIT_23
#define SOFTMODEM_NOSTATS_BIT BIT_24
#define SOFTMODEM_IMSCOPE_BIT BIT_25
// clang-format on
#endif // SOFTMODEM_BITS_H
executables/softmodem-common.h
View file @
70dd524e
...
...
@@ -32,6 +32,7 @@
#ifndef SOFTMODEM_COMMON_H
#define SOFTMODEM_COMMON_H
#include "openair1/PHY/defs_common.h"
#include "softmodem-bits.h"
#ifdef __cplusplus
extern
"C"
{
...
...
@@ -277,22 +278,6 @@ extern int usrp_tx_thread;
/***************************************************************************************************************************************/
#define SOFTMODEM_NOS1_BIT (1<<0)
#define SOFTMODEM_NONBIOT_BIT (1<<2)
#define SOFTMODEM_RFSIM_BIT (1<<10)
#define SOFTMODEM_SIML1_BIT (1<<12)
#define SOFTMODEM_DLSIM_BIT (1<<13)
#define SOFTMODEM_DOSCOPE_BIT (1<<15)
#define SOFTMODEM_RECPLAY_BIT (1<<16)
#define SOFTMODEM_TELNETCLT_BIT (1<<17)
#define SOFTMODEM_RECRECORD_BIT (1<<18)
#define SOFTMODEM_ENB_BIT (1<<20)
#define SOFTMODEM_GNB_BIT (1<<21)
#define SOFTMODEM_4GUE_BIT (1<<22)
#define SOFTMODEM_5GUE_BIT (1<<23)
#define SOFTMODEM_NOSTATS_BIT (1<<24)
#define SOFTMODEM_IMSCOPE_BIT (1<<25)
#define SOFTMODEM_FUNC_BITS (SOFTMODEM_ENB_BIT | SOFTMODEM_GNB_BIT | SOFTMODEM_5GUE_BIT | SOFTMODEM_4GUE_BIT)
#define MAPPING_SOFTMODEM_FUNCTIONS {{"enb",SOFTMODEM_ENB_BIT},{"gnb",SOFTMODEM_GNB_BIT},{"4Gue",SOFTMODEM_4GUE_BIT},{"5Gue",SOFTMODEM_5GUE_BIT}}
...
...
openair1/PHY/TOOLS/imscope/imscope.cpp
View file @
70dd524e
...
...
@@ -42,6 +42,7 @@ uint64_t get_softmodem_optmask(void);
#include <sstream>
#include <mutex>
#include <thread>
#include "executables/softmodem-bits.h"
#define MAX_OFFSETS 14
#define NR_MAX_RB 273
...
...
@@ -617,7 +618,6 @@ void *imscope_thread(void *data_void_ptr)
static
double
last_frame_time
=
glfwGetTime
();
static
int
target_fps
=
24
;
const
int
SOFTMODEM_5GUE_BIT
=
1
<<
23
;
bool
is_ue
=
(
get_softmodem_optmask
()
&
SOFTMODEM_5GUE_BIT
)
>
0
;
while
(
!
glfwWindowShouldClose
(
window
))
{
// Poll and handle events (inputs, window resize, etc.)
...
...
@@ -704,9 +704,6 @@ void *imscope_thread(void *data_void_ptr)
extern
"C"
void
imscope_autoinit
(
void
*
dataptr
)
{
// Copied here due to issues with headers
const
int
SOFTMODEM_GNB_BIT
=
1
<<
21
;
const
int
SOFTMODEM_5GUE_BIT
=
1
<<
23
;
AssertFatal
((
get_softmodem_optmask
()
&
SOFTMODEM_5GUE_BIT
)
||
(
get_softmodem_optmask
()
&
SOFTMODEM_GNB_BIT
),
"Scope cannot find NRUE or GNB context"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment