diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-08-09 16:07:05 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-08-09 16:07:05 +0200 |
commit | 684326a8875ce96af53da58fa4c26afa6a7b781f (patch) | |
tree | 51681bc07bfdca24d9de6e905b1d9e67438e8a1b /low-can-binding/binding/low-can-socket.cpp | |
parent | cfefec3991f272f5eaaa3f909f0f4f402ea5b04f (diff) |
Improve debugging diag and empty event
Change-Id: I64dd5b3f241a9696dc759dffff884772e3f72fd7
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'low-can-binding/binding/low-can-socket.cpp')
-rw-r--r-- | low-can-binding/binding/low-can-socket.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/low-can-binding/binding/low-can-socket.cpp b/low-can-binding/binding/low-can-socket.cpp index fdd506b3..afdc9860 100644 --- a/low-can-binding/binding/low-can-socket.cpp +++ b/low-can-binding/binding/low-can-socket.cpp @@ -107,7 +107,10 @@ const std::string low_can_socket_t::get_name() const { if (can_signal_ != nullptr) return can_signal_->get_name(); + else if (!diagnostic_message_.empty()) + return "diagnostic_messages"; + AFB_WARNING("No diagnostics messages nor CAN signals registered in that subscription. Name empty ! It's a bug to be reported."); return ""; } @@ -119,6 +122,7 @@ const std::string low_can_socket_t::get_name(uint32_t pid) const if (!diagnostic_message_.empty()) return get_diagnostic_message(pid)->get_name() ; + AFB_WARNING("No diagnostics messages nor CAN signals registered in that subscription. Name empty ! It's a bug to be reported."); return ""; } |