Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
OpenXG
OpenXG UE
Commits
1ba40512
Commit
1ba40512
authored
Sep 15, 2020
by
Andrew Burger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some logging
parent
5229787c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
+34
-0
openair2/PHY_INTERFACE/phy_stub_UE.c
openair2/PHY_INTERFACE/phy_stub_UE.c
+6
-0
No files found.
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
View file @
1ba40512
...
@@ -37,6 +37,31 @@
...
@@ -37,6 +37,31 @@
#include <nfapi.h>
#include <nfapi.h>
#include <debug.h>
#include <debug.h>
static
const
char
*
hexdump
(
const
void
*
data
,
size_t
data_len
,
char
*
out
,
size_t
out_len
)
{
char
*
p
=
out
;
char
*
endp
=
out
+
out_len
;
const
uint8_t
*
q
=
data
;
snprintf
(
p
,
endp
-
p
,
"[%zu]"
,
data_len
);
p
+=
strlen
(
p
);
for
(
size_t
i
=
0
;
i
<
data_len
;
++
i
)
{
if
(
p
>=
endp
)
{
static
const
char
ellipses
[]
=
"..."
;
char
*
s
=
endp
-
sizeof
(
ellipses
);
if
(
s
>=
p
)
{
strcpy
(
s
,
ellipses
);
}
break
;
}
snprintf
(
p
,
endp
-
p
,
" %02X"
,
*
q
++
);
p
+=
strlen
(
p
);
}
return
out
;
}
extern
int
nfapi_unpack_p7_vendor_extension
(
nfapi_p7_message_header_t
*
header
,
uint8_t
**
ppReadPackedMsg
,
void
*
user_data
);
extern
int
nfapi_unpack_p7_vendor_extension
(
nfapi_p7_message_header_t
*
header
,
uint8_t
**
ppReadPackedMsg
,
void
*
user_data
);
extern
int
nfapi_pack_p7_vendor_extension
(
nfapi_p7_message_header_t
*
header
,
uint8_t
**
ppWritePackedMsg
,
void
*
user_data
);
extern
int
nfapi_pack_p7_vendor_extension
(
nfapi_p7_message_header_t
*
header
,
uint8_t
**
ppWritePackedMsg
,
void
*
user_data
);
...
@@ -6109,6 +6134,8 @@ int nfapi_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUn
...
@@ -6109,6 +6134,8 @@ int nfapi_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUn
nfapi_p7_message_header_t
*
pMessageHeader
=
(
nfapi_p7_message_header_t
*
)
pUnpackedBuf
;
nfapi_p7_message_header_t
*
pMessageHeader
=
(
nfapi_p7_message_header_t
*
)
pUnpackedBuf
;
uint8_t
*
pReadPackedMessage
=
pMessageBuf
;
uint8_t
*
pReadPackedMessage
=
pMessageBuf
;
uint8_t
*
end
=
pMessageBuf
+
messageBufLen
;
uint8_t
*
end
=
pMessageBuf
+
messageBufLen
;
uint8_t
*
end_unpacked_buf
=
pUnpackedBuf
+
unpackedBufLen
;
uint8_t
*
start_unpacked_buf
=
pUnpackedBuf
;
if
(
pMessageBuf
==
NULL
||
pUnpackedBuf
==
NULL
)
if
(
pMessageBuf
==
NULL
||
pUnpackedBuf
==
NULL
)
{
{
...
@@ -6317,6 +6344,13 @@ int nfapi_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUn
...
@@ -6317,6 +6344,13 @@ int nfapi_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUn
break
;
break
;
}
}
if
(
pMessageHeader
->
message_id
==
NFAPI_RX_ULSCH_INDICATION
)
{
char
foobar
[
1024
];
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"Biden %s:%d: %s
\n
"
,
__FUNCTION__
,
__LINE__
,
hexdump
(
pUnpackedBuf
,
end_unpacked_buf
-
start_unpacked_buf
,
foobar
,
sizeof
(
foobar
)));
}
if
(
result
==
0
)
if
(
result
==
0
)
return
-
1
;
return
-
1
;
else
else
...
...
openair2/PHY_INTERFACE/phy_stub_UE.c
View file @
1ba40512
...
@@ -1330,6 +1330,12 @@ const char *hexdump(const void *data, size_t data_len, char *out, size_t out_len
...
@@ -1330,6 +1330,12 @@ const char *hexdump(const void *data, size_t data_len, char *out, size_t out_len
LOG_I
(
MAC
,
"RX_IND sent to Proxy, Size: %d Frame %d Subframe %d rx_ind.tl.length: %u num_pdus: %u
\n
"
,
LOG_I
(
MAC
,
"RX_IND sent to Proxy, Size: %d Frame %d Subframe %d rx_ind.tl.length: %u num_pdus: %u
\n
"
,
encoded_size
,
NFAPI_SFNSF2SFN
(
UL
->
rx_ind
.
sfn_sf
),
NFAPI_SFNSF2SF
(
UL
->
rx_ind
.
sfn_sf
),
encoded_size
,
NFAPI_SFNSF2SFN
(
UL
->
rx_ind
.
sfn_sf
),
NFAPI_SFNSF2SF
(
UL
->
rx_ind
.
sfn_sf
),
UL
->
rx_ind
.
rx_indication_body
.
tl
.
length
,
UL
->
rx_ind
.
rx_indication_body
.
number_of_pdus
);
UL
->
rx_ind
.
rx_indication_body
.
tl
.
length
,
UL
->
rx_ind
.
rx_indication_body
.
number_of_pdus
);
nfapi_rx_indication_t
test_ind
;
if
(
nfapi_p7_message_unpack
(
buffer
,
encoded_size
,
&
test_ind
,
sizeof
(
test_ind
),
NULL
)
<
0
)
{
LOG_E
(
MAC
,
"could not unpack rx_ind right after packing encoded_size: %d
\n
"
encoded_size
);
abort
();
}
break
;
break
;
case
NFAPI_RX_CQI_INDICATION
:
case
NFAPI_RX_CQI_INDICATION
:
encoded_size
=
nfapi_p7_message_pack
(
&
UL
->
cqi_ind
,
buffer
,
sizeof
(
buffer
),
NULL
);
// Check pdu->ul_cqi_information.channel = 1
encoded_size
=
nfapi_p7_message_pack
(
&
UL
->
cqi_ind
,
buffer
,
sizeof
(
buffer
),
NULL
);
// Check pdu->ul_cqi_information.channel = 1
...
...
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