Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
UERANSIM
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
Libraries
UERANSIM
Commits
a6572861
Commit
a6572861
authored
Apr 17, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OctetView refactor
parent
31337c43
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
13 deletions
+8
-13
src/utils/octet.hpp
src/utils/octet.hpp
+8
-8
src/utils/octet_view.hpp
src/utils/octet_view.hpp
+0
-5
No files found.
src/utils/octet.hpp
View file @
a6572861
...
@@ -42,7 +42,7 @@ struct octet
...
@@ -42,7 +42,7 @@ struct octet
return
static_cast
<
int32_t
>
(
value
);
return
static_cast
<
int32_t
>
(
value
);
}
}
inline
bool
bit
(
int
index
)
const
[[
nodiscard
]]
inline
bool
bit
(
int
index
)
const
{
{
assert
(
index
>=
0
&&
index
<=
7
);
assert
(
index
>=
0
&&
index
<=
7
);
std
::
bitset
<
8
>
bitset
=
value
;
std
::
bitset
<
8
>
bitset
=
value
;
...
@@ -93,11 +93,6 @@ struct octet2
...
@@ -93,11 +93,6 @@ struct octet2
{
{
return
value
;
return
value
;
}
}
explicit
constexpr
operator
int16_t
()
const
{
return
static_cast
<
uint16_t
>
(
value
);
}
};
};
struct
octet3
struct
octet3
...
@@ -171,15 +166,20 @@ struct octet4
...
@@ -171,15 +166,20 @@ struct octet4
return
(
value
>>
(
24
-
index
*
8
))
&
0xFF
;
return
(
value
>>
(
24
-
index
*
8
))
&
0xFF
;
}
}
explicit
constexpr
operator
int32_t
()
const
inline
explicit
constexpr
operator
int32_t
()
const
{
{
return
static_cast
<
int32_t
>
(
value
);
return
static_cast
<
int32_t
>
(
value
);
}
}
explicit
constexpr
operator
uint32_t
()
const
inline
explicit
constexpr
operator
uint32_t
()
const
{
{
return
value
;
return
value
;
}
}
inline
bool
operator
==
(
const
octet4
&
other
)
const
{
return
value
==
other
.
value
;
}
};
};
struct
octet8
struct
octet8
...
...
src/utils/octet_view.hpp
View file @
a6572861
...
@@ -63,11 +63,6 @@ class OctetView
...
@@ -63,11 +63,6 @@ class OctetView
return
octet2
{
read
(),
read
()};
return
octet2
{
read
(),
read
()};
}
}
inline
int16_t
read2S
()
const
{
return
(
int16_t
)
read2
();
}
inline
uint16_t
read2US
()
const
inline
uint16_t
read2US
()
const
{
{
return
(
uint16_t
)
read2
();
return
(
uint16_t
)
read2
();
...
...
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