Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
PRRT
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
37
Issues
37
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LARN
PRRT
Commits
dafefe33
Commit
dafefe33
authored
Sep 05, 2018
by
Kai Vogelgesang
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor PrrtPacket_type and _priority into macros
parent
223addb1
Pipeline
#2988
failed with stages
in 1 minute and 29 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
10 deletions
+3
-10
prrt/proto/types/packet.c
prrt/proto/types/packet.c
+0
-8
prrt/proto/types/packet.h
prrt/proto/types/packet.h
+3
-2
No files found.
prrt/proto/types/packet.c
View file @
dafefe33
...
...
@@ -22,14 +22,6 @@ static void *decode_redundancy_header(void *dstBuffer, const void *srcBuffer);
static
void
*
decode_feedback_header
(
void
*
dstBuffer
,
const
void
*
srcBuffer
);
prrtPacketType_t
PrrtPacket_type
(
PrrtPacket
*
packet_ptr
)
{
return
(
prrtPacketType_t
)
((
packet_ptr
->
type_priority
>>
4
)
&
0x0F
);
}
uint8_t
PrrtPacket_priority
(
PrrtPacket
*
packet_ptr
)
{
return
(
uint8_t
)
(
packet_ptr
->
type_priority
&
0x0F
);
}
prrtPacketLength_t
PrrtPacket_size
(
PrrtPacket
*
packet_ptr
)
{
return
(
prrtPacketLength_t
)
(
packet_ptr
->
payloadLength
+
PRRT_PACKET_ENCODED_GENERAL_HEADER_LENGTH
);
}
...
...
prrt/proto/types/packet.h
View file @
dafefe33
...
...
@@ -118,9 +118,10 @@ typedef struct prrtPacketFeedbackPayload {
sizeof(prrtSequenceNumber_t) + \
sizeof(prrtPacketType_t) )
prrtPacketType_t
PrrtPacket_type
(
PrrtPacket
*
packet_ptr
);
uint8_t
PrrtPacket_priority
(
PrrtPacket
*
packet_ptr
);
#define PrrtPacket_type(packet_ptr) ((prrtPacketType_t) (((packet_ptr)->type_priority >> 4) & 0x0F))
#define PrrtPacket_priority(packet_ptr) ((uint8_t) (packet_ptr->type_priority & 0x0F))
prrtPacketLength_t
PrrtPacket_size
(
PrrtPacket
*
packet_ptr
);
...
...
Kai Vogelgesang
@kv
mentioned in issue
#30 (closed)
·
Sep 05, 2018
mentioned in issue
#30 (closed)
mentioned in issue #30
Toggle commit list
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