extend MQTT integration support with seen filter and variable compression

This commit is contained in:
John
2022-01-23 19:34:45 +01:00
parent 5f54d560a7
commit 7128a380f3
4 changed files with 76 additions and 8 deletions
+9 -1
View File
@@ -115,7 +115,7 @@ Message::Message(const string& filename, const string& circuit, const string& le
m_data(data), m_deleteData(deleteData),
m_pollPriority(pollPriority),
m_usedByCondition(false), m_isScanMessage(false), m_condition(condition),
m_lastUpdateTime(0), m_lastChangeTime(0), m_pollOrder(0), m_lastPollTime(0) {
m_dataHandlerState(0), m_lastUpdateTime(0), m_lastChangeTime(0), m_pollOrder(0), m_lastPollTime(0) {
if (circuit == "scan") {
setScanMessage();
m_pollPriority = 0;
@@ -1025,6 +1025,14 @@ void Message::decodeJson(bool leadingSeparator, bool appendDirectionCondition, b
*output << "\n }";
}
bool Message::setDataHandlerState(int state) {
if (state == m_dataHandlerState) {
return false;
}
m_dataHandlerState = state;
return true;
}
ChainedMessage::ChainedMessage(const string& filename, const string& circuit, const string& level, const string& name,
bool isWrite, const map<string, string>& attributes,