Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
trx-ecpri
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
nexedi
trx-ecpri
Commits
7378b8be
Commit
7378b8be
authored
Dec 26, 2024
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip
parent
65f8d8de
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
4 deletions
+24
-4
trx_ecpri.c
trx_ecpri.c
+24
-4
No files found.
trx_ecpri.c
View file @
7378b8be
...
...
@@ -155,6 +155,10 @@ static volatile counter_stat_t tx_drop_counter; // frames sent to RRH
// Network
static
volatile
int
seq_id
;
static
volatile
uint8_t
frame_id
;
static
volatile
uint8_t
sub_frame_id
;
static
volatile
uint8_t
slot_id
;
static
volatile
uint8_t
symbol_id
;
static
int
send_sockfd
;
static
int
recv_sockfd
;
static
struct
sockaddr_ll
connect_sk_addr
;
...
...
@@ -430,6 +434,8 @@ static void *encode_thread(void *p) {
for
(
int64_t
i
=
0
;;
i
++
)
{
int64_t
to_write
,
to_read
;
uint16_t
*
16
_bit
;
int
j
;
to_write
=
rbuf_write_amount
(
&
tx_rbuf
);
to_read
=
rbuf_read_amount
(
&
trxw_rbuf
[
0
]);
...
...
@@ -441,11 +447,25 @@ static void *encode_thread(void *p) {
data
=
rbuf_write
(
&
tx_rbuf
);
memcpy
(
data
,
packet_header
,
PACKET_HEADER
);
j
=
ETHERNET_HEADER
+
ECPRI_COMMON_HEADER
;
// SEQ_ID
*
((
uint16_t
*
)
data
[
ETHERNET_HEADER
+
ECPRI_COMMON_HEADER
+
2
])
=
htons
(
seq_id
++
);
// Frame ID
data
[
ETHERNET_HEADER
+
ECPRI_IQ_HEADER
+
1
]
=
seq_id
;
*
((
uint16_t
*
)
data
[
j
+
2
])
=
htons
(
seq_id
++
);
j
=
ETHERNET_HEADER
+
ECPRI_IQ_HEADER
;
// ORAN counters
data
[
j
+
1
]
=
frame_id
;
16
_bit
=
(
uint16_t
*
)
data
[
j
+
2
];
*
16
_bit
=
sub_frame_id
<<
8
;
*
16
_bit
|=
slot_id
<<
4
;
*
16
_bit
|=
symbol_id
;
/* How to compute counters:
- How much IQ samples are sent ?
- How much IQ samples / second ?
*/
frame_id
=
(
frame_id
+
1
)
%
100
;
sub_frame_id
=
(
frame_id
+
1
)
%
100
;
// TODO
int
nc
;
...
...
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