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
lizhongxiao
OpenXG-RAN
Commits
acfe98a6
Commit
acfe98a6
authored
Feb 20, 2024
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hack: don't invert DCI payload, does not seem to work
parent
a8140027
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
nfapi/open-nFAPI/nfapi/src/nfapi.c
nfapi/open-nFAPI/nfapi/src/nfapi.c
+10
-4
No files found.
nfapi/open-nFAPI/nfapi/src/nfapi.c
View file @
acfe98a6
...
...
@@ -548,9 +548,10 @@ uint8_t unpackarray(uint8_t **ppReadPackedMsg, void *array, uint16_t array_eleme
uint32_t
pack_dci_payload
(
uint8_t
payload
[],
uint16_t
payloadSizeBits
,
uint8_t
**
out
,
uint8_t
*
end
)
{
// Helper vars for DCI Payload
uint8_t
dci_bytes_inverted
[
DCI_PAYLOAD_BYTE_LEN
];
uint8_t
dci_bytes_inverted
[
DCI_PAYLOAD_BYTE_LEN
]
=
{
0
}
;
uint8_t
dci_byte_len
=
(
payloadSizeBits
+
7
)
/
8
;
// Align the dci payload bits to the left on the payload buffer
/*
uint64_t *dci_pdu = (uint64_t *)payload;
if (payloadSizeBits % 8 != 0) {
uint8_t rotation_bits = 8 - (payloadSizeBits % 8);
...
...
@@ -560,17 +561,21 @@ uint32_t pack_dci_payload(uint8_t payload[], uint16_t payloadSizeBits, uint8_t *
for (int j = 0; j < dci_byte_len; j++) {
dci_bytes_inverted[j] = payload[(dci_byte_len - 1) - j];
}
return
pusharray8
(
dci_bytes_inverted
,
DCI_PAYLOAD_BYTE_LEN
,
dci_byte_len
,
out
,
end
);
print_dci_bytes_inverted(dci_bytes_inverted, dci_byte_len);
*/
return
pusharray8
(
payload
,
DCI_PAYLOAD_BYTE_LEN
,
dci_byte_len
,
out
,
end
);
}
uint32_t
unpack_dci_payload
(
uint8_t
payload
[],
uint16_t
payloadSizeBits
,
uint8_t
**
in
,
uint8_t
*
end
)
{
// Pull the inverted DCI and invert it back
// Helper vars for DCI Payload
uint8_t
dci_bytes_inverted
[
DCI_PAYLOAD_BYTE_LEN
];
uint8_t
dci_bytes_inverted
[
DCI_PAYLOAD_BYTE_LEN
]
=
{
0
}
;
uint8_t
dci_byte_len
=
(
payloadSizeBits
+
7
)
/
8
;
// Get DCI array inverted
uint32_t
pullresult
=
pullarray8
(
in
,
dci_bytes_inverted
,
DCI_PAYLOAD_BYTE_LEN
,
dci_byte_len
,
end
);
uint32_t
pullresult
=
pullarray8
(
in
,
payload
,
DCI_PAYLOAD_BYTE_LEN
,
dci_byte_len
,
end
);
/*
print_dci_bytes_inverted(dci_bytes_inverted, dci_byte_len);
uint64_t *dci_pdu = (uint64_t *)payload;
// Reversing the byte order of the inverted DCI payload
for (uint16_t j = 0; j < dci_byte_len; j++) {
...
...
@@ -580,6 +585,7 @@ uint32_t unpack_dci_payload(uint8_t payload[], uint16_t payloadSizeBits, uint8_t
uint8_t rotation_bits = 8 - (payloadSizeBits % 8);
*dci_pdu = (*dci_pdu >> rotation_bits);
}
*/
return
pullresult
;
}
...
...
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