From da40d514af346d727335f2c273936e69c26028fb Mon Sep 17 00:00:00 2001 From: john30 Date: Sat, 2 Jan 2016 12:14:53 +0100 Subject: [PATCH] use constant for scan answer --- src/ebusd/bushandler.cpp | 5 ++++- src/lib/ebus/data.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ebusd/bushandler.cpp b/src/ebusd/bushandler.cpp index 3694b0d4..e206c024 100644 --- a/src/ebusd/bushandler.cpp +++ b/src/ebusd/bushandler.cpp @@ -33,6 +33,9 @@ using namespace std; +// the string used for answering to a scan request (07h 04h) +#define SCAN_ANSWER ("ebusd.eu;" PACKAGE_NAME ";" SCAN_VERSION ";100") + /** * Return the string corresponding to the @a BusState. * @param state the @a BusState. @@ -630,7 +633,7 @@ result_t BusHandler::handleSymbol() if (message == NULL || message->isWrite()) return setState(bs_skip, RESULT_ERR_INVALID_ARG); // don't know this request or definition has wrong direction, deny if (message == m_messages->getScanMessage()) { - input.str("ebusd;ebusd;" SCAN_VERSION ";100"); + input.str(SCAN_ANSWER); } // build response and store in m_response for sending back to requesting master diff --git a/src/lib/ebus/data.cpp b/src/lib/ebus/data.cpp index 047d98c9..352cda69 100644 --- a/src/lib/ebus/data.cpp +++ b/src/lib/ebus/data.cpp @@ -1306,7 +1306,7 @@ DataFieldSet* DataFieldSet::getIdentFields() manufacturers[0xb5] = "Vaillant"; manufacturers[0xc0] = "Toby"; manufacturers[0xc5] = "Weishaupt"; - manufacturers[0xfd] = "ebusd"; + manufacturers[0xfd] = "ebusd.eu"; vector fields; fields.push_back(new ValueListDataField("MF", "", "", uchDataType, pt_slaveData, 1, 8, manufacturers)); fields.push_back(new StringDataField("ID", "", "", stringDataType, pt_slaveData, 5));