From 61958107afab9321922601dd4bcc01de0698c010 Mon Sep 17 00:00:00 2001 From: John Date: Sat, 30 Jan 2021 20:14:28 +0100 Subject: [PATCH] log read only, enhanced, and device --- src/ebusd/main.cpp | 8 ++++++-- src/lib/ebus/device.h | 6 ++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/ebusd/main.cpp b/src/ebusd/main.cpp index 311e0adc..3c6d53ff 100644 --- a/src/ebusd/main.cpp +++ b/src/ebusd/main.cpp @@ -1329,10 +1329,14 @@ int main(int argc, char* argv[]) { signal(SIGINT, signalHandler); signal(SIGTERM, signalHandler); - logNotice(lf_main, PACKAGE_STRING "." REVISION " started%s", + logNotice(lf_main, PACKAGE_STRING "." REVISION " started%s%s on%s device %s", + device->isReadOnly() ? " read only" : "", opt.scanConfig ? opt.initialScan == ESC ? " with auto scan" : opt.initialScan == BROADCAST ? " with broadcast scan" : opt.initialScan == SYN ? " with full scan" - : " with single scan" : ""); + : " with single scan" : "", + device->isEnhancedProto() ? " enhanced" : "", + device->getName() + ); // load configuration files loadConfigFiles(s_messageMap); diff --git a/src/lib/ebus/device.h b/src/lib/ebus/device.h index 6b876940..997b40af 100755 --- a/src/lib/ebus/device.h +++ b/src/lib/ebus/device.h @@ -194,6 +194,12 @@ class Device { */ bool isReadOnly() const { return m_readOnly; } + /** + * Return whether the device supports the ebusd enhanced protocol. + * @return whether the device supports the ebusd enhanced protocol. + */ + bool isEnhancedProto() const { return m_enhancedProto; } + /** * Set the @a DeviceListener. * @param listener the @a DeviceListener.