Add ChannelIsForwardedFromNode to aos/configuration.h
Change-Id: I52a42fbc1b2137da8bc2585a5d6ee803f793bdd4
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/configuration.cc b/aos/configuration.cc
index aa69d99..d100321 100644
--- a/aos/configuration.cc
+++ b/aos/configuration.cc
@@ -1353,6 +1353,15 @@
return false;
}
+bool ChannelIsForwardedFromNode(const Channel *channel, const Node *node) {
+ if (node == nullptr) {
+ return false;
+ }
+ return ChannelIsSendableOnNode(channel, node) &&
+ channel->has_destination_nodes() &&
+ channel->destination_nodes()->size() > 0u;
+}
+
bool ChannelMessageIsLoggedOnNode(const Channel *channel, const Node *node) {
if (node == nullptr) {
// Single node world. If there is a local logger, then we want to use