also send MQTT definition topic and handle knx subscription for conditional messages evaluated later

This commit is contained in:
John
2024-01-14 11:04:10 +01:00
parent 3232f4ff95
commit 1316291740
4 changed files with 37 additions and 6 deletions
+15
View File
@@ -399,6 +399,12 @@ class Message : public AttributedItem {
*/
bool isAvailable();
/**
* Get the time when this (potentially conditional) message first became available.
* @return the time when this message first became available, or 0 if it is not available.
*/
time_t getAvailableSinceTime();
/**
* Return whether the field is available.
* @param fieldName the name of the field to find, or nullptr for any.
@@ -673,6 +679,9 @@ class Message : public AttributedItem {
/** the @a Condition for this message, or nullptr. */
Condition* m_condition;
/** the time when the @a Condition first became available, or 0. */
time_t m_availableSinceTime;
/** the last seen @a MasterSymbolString. */
MasterSymbolString m_lastMasterData;
@@ -927,6 +936,12 @@ class Condition {
*/
virtual bool isTrue() = 0;
/**
* Get the system time when the condition was last checked.
* @return the system time when the condition was last checked, 0 for never.
*/
time_t getLastCheckTime() const { return m_lastCheckTime; }
protected:
/** the system time when the condition was last checked, 0 for never. */