use constant for scan answer
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1306,7 +1306,7 @@ DataFieldSet* DataFieldSet::getIdentFields()
|
||||
manufacturers[0xb5] = "Vaillant";
|
||||
manufacturers[0xc0] = "Toby";
|
||||
manufacturers[0xc5] = "Weishaupt";
|
||||
manufacturers[0xfd] = "ebusd";
|
||||
manufacturers[0xfd] = "ebusd.eu";
|
||||
vector<SingleDataField*> fields;
|
||||
fields.push_back(new ValueListDataField("MF", "", "", uchDataType, pt_slaveData, 1, 8, manufacturers));
|
||||
fields.push_back(new StringDataField("ID", "", "", stringDataType, pt_slaveData, 5));
|
||||
|
||||
Reference in New Issue
Block a user