Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
dS485 Stack
ds485d
Commits
408fb95f
Commit
408fb95f
authored
3 years ago
by
Andreas Fenkart
Browse files
Options
Download
Patches
Plain Diff
ds485: pimp debug of message routing
parent
132a267a
5 merge requests
!36
Draft: Mr rate limit
,
!29
Merge branch 'master' into testing
,
!28
broadcast confirm
,
!23
pimp routing messages
,
!21
Merge branch 'master' into testing
Pipeline
#34668
passed with stages
in 2 minutes and 21 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/ds485d.cpp
+13
-6
src/ds485d.cpp
with
13 additions
and
6 deletions
+13
-6
src/ds485d.cpp
+
13
−
6
View file @
408fb95f
...
...
@@ -472,19 +472,26 @@ static void *sysRxThread(void *arg) {
continue
;
}
else
if
(
container
.
destinationId
!=
dsuid
&&
container
.
destinationId
!=
DSUID_BROADCAST
)
{
// only ds485d is bus member -> either broadcast or to daemon directly
DS_NOTICE
(
"ds485: received
bus message not addressed to daemon"
,
container
);
// probably none
DS_NOTICE
(
"ds485: received
unsolicited message:"
,
container
);
}
if
(
container
.
containerType
==
DS485_CONTAINER_RESPONSE
)
{
// responses to a broadcast request from the dss, are unicast messages
dS485d_data
.
m_transactionIdPool
.
restoreRequestAddress
(
container
);
}
else
{
DS_NOTICE
(
"ds485: received non-response/non-event message"
,
container
);
// probably none
}
else
if
(
container
.
destinationId
!=
DSUID_BROADCAST
)
{
// broadcast is printed below
DS_NOTICE
(
"ds485: received non-response/non-event message"
,
container
);
}
if
(
is_request_for_ds485d
(
&
container
))
{
DS_NOTICE
(
"ds485: received message addressed to daemon"
,
container
);
// probably 0% of cases
send_response_from_ds485d
(
dS485d_data
.
busHandle
,
&
container
);
if
(
is_request_for_ds485d
(
&
container
)
||
container
.
destinationId
==
DSUID_BROADCAST
)
{
// daemon is true final recipient, no forwarding
if
(
container
.
destinationId
==
DSUID_BROADCAST
)
{
// reply to broadcast not implement, events are handled at the beginning
DS_NOTICE
(
"ds485: received broadcast message"
,
container
);
}
else
{
DS_NOTICE
(
"ds485: received message addressed to daemon"
,
container
);
// probably 0% of cases
send_response_from_ds485d
(
dS485d_data
.
busHandle
,
&
container
);
}
}
else
{
ds485_server_reply
(
dS485d_data
.
netlibHandle
,
&
container
);
// 99.9% case
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets