36 m_ttLastNotified = 0us;
37 m_sUUID = QUuid::createUuid().toString();
38 m_sUUID = m_sUUID.mid( 1, m_sUUID.length() - 2);
42 : m_nDuration( duration )
45 m_ttLastNotified = 0us;
46 m_sUUID = QUuid::createUuid().toString();
47 m_sUUID = m_sUUID.mid( 1, m_sUUID.length() - 2);
50 SetExpireTime( m_nDuration );
67 unsigned short m_nKey {0};
68 std::chrono::seconds m_nDuration {0s};
74 m_ttExpires = nowAsDuration<std::chrono::microseconds>() + secs;
102 m_ttLastChanged = nowAsDuration<std::chrono::microseconds>();
106 virtual QString ToString() = 0;
136 return QString(
"%1" ).arg( m_value );
150 if ( m_value != value )
153 m_ttLastChanged = nowAsDuration<std::chrono::microseconds>();
169 virtual void Notify() = 0;
170 using SVMap = QMap<QString, StateVariableBase*>;
179 for (
const auto *it : qAsConst(m_map))
188 if (pBase !=
nullptr)
189 m_map.insert(pBase->
m_sName, pBase);
196 SVMap::iterator it = m_map.find(sName);
197 if (it == m_map.end())
202 if (pVariable ==
nullptr)
205 if ( pVariable->GetValue() != value)
209 if (pVariable->m_bNotify)
222 SVMap::iterator it = m_map.find(sName);
223 if (it == m_map.end())
228 if (pVariable !=
nullptr)
234 uint BuildNotifyBody(QTextStream &ts,
TaskTime ttLastNotified)
const;
258 std::chrono::seconds m_nSubscriptionDuration {30min};
260 short m_nHoldCount {0};
274 {
return m_sEventMethodName; }
277 Eventing (
const QString &sExtensionName,
278 QString sEventMethodName,
279 const QString &sSharePath );
286 short HoldEvents ( );
287 short ReleaseEvents ( );