38 m_ttLastNotified = 0us;
39 m_sUUID = QUuid::createUuid().toString();
40 m_sUUID = m_sUUID.mid( 1, m_sUUID.length() - 2);
44 : m_qURL(url), m_nDuration( duration )
47 m_ttLastNotified = 0us;
48 m_sUUID = QUuid::createUuid().toString();
49 m_sUUID = m_sUUID.mid( 1, m_sUUID.length() - 2);
51 SetExpireTime( m_nDuration );
68 unsigned short m_nKey {0};
69 std::chrono::seconds m_nDuration {0s};
75 m_ttExpires = nowAsDuration<std::chrono::microseconds>() + secs;
100 : m_bNotify(bNotify), m_sName(std::move(sName))
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 : std::as_const(m_map))
188 if (pBase !=
nullptr)
189 m_map.insert(pBase->
m_sName, pBase);
194 bool SetValue(
const QString &sName,
const T& value )
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 ( );