Commit 408fb95f authored by Andreas Fenkart's avatar Andreas Fenkart
Browse files

ds485: pimp debug of message routing

parent 132a267a
5 merge requests!36Draft: Mr rate limit,!29Merge branch 'master' into testing,!28broadcast confirm,!23pimp routing messages,!21Merge branch 'master' into testing
Pipeline #34668 passed with stages
in 2 minutes and 21 seconds
Showing with 13 additions and 6 deletions
+13 -6
......@@ -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
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment