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
Michael Black
OpenXG-RAN
Commits
5cbd83c4
Commit
5cbd83c4
authored
May 05, 2023
by
laurent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add macro for UINT32
parent
7fae9eb2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
openair3/UTILS/conversions.h
openair3/UTILS/conversions.h
+15
-0
No files found.
openair3/UTILS/conversions.h
View file @
5cbd83c4
...
@@ -116,6 +116,15 @@ do { \
...
@@ -116,6 +116,15 @@ do { \
((buf)[3]); \
((buf)[3]); \
} while(0)
} while(0)
/* Convert an array of char containing vALUE to x */
#define BUFFER_TO_UINT32(buf, x) \
do { \
x = (((uint32_t)(buf)[0] << 24) | \
(uint32_t)((buf)[1] << 16) | \
(uint32_t)((buf)[2] << 8) | \
(uint32_t)((buf)[3]); \
} while (0)
/* Convert an integer on 32 bits to an octet string from aSN1c tool */
/* Convert an integer on 32 bits to an octet string from aSN1c tool */
#define INT32_TO_OCTET_STRING(x, aSN) \
#define INT32_TO_OCTET_STRING(x, aSN) \
do { \
do { \
...
@@ -260,6 +269,12 @@ do { \
...
@@ -260,6 +269,12 @@ do { \
BUFFER_TO_INT32((aSN)->buf, x); \
BUFFER_TO_INT32((aSN)->buf, x); \
} while(0)
} while(0)
#define OCTET_STRING_TO_UINT32(aSN, x) \
do { \
DevCheck((aSN)->size == 4, (aSN)->size, 0, 0); \
BUFFER_TO_UINT32((aSN)->buf, x); \
} while (0)
#define BIT_STRING_TO_INT32(aSN, x) \
#define BIT_STRING_TO_INT32(aSN, x) \
do { \
do { \
DevCheck((aSN)->bits_unused == 0, (aSN)->bits_unused, 0, 0); \
DevCheck((aSN)->bits_unused == 0, (aSN)->bits_unused, 0, 0); \
...
...
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