设备监控-回写
This commit is contained in:
@@ -31,6 +31,19 @@ public:
|
||||
QVector<DeviceTreeNode>& nodesMutable() { return m_nodes; }
|
||||
|
||||
const DeviceTreeNode* findById(const QString& id) const;
|
||||
int findIndexById(const QString& id) const;
|
||||
int findIndexByStableKey(const QString& stableKey) const;
|
||||
|
||||
// Monitor/register path: upsert or mark online/offline
|
||||
QString upsertNodeByStableKey(const QString& stableKey,
|
||||
const QString& preferredId,
|
||||
const QString& type,
|
||||
const QString& endpoint,
|
||||
const QString& name,
|
||||
const QJsonObject& extraParams,
|
||||
bool online,
|
||||
const QString& lastSeenTs);
|
||||
bool markOfflineByStableKey(const QString& stableKey, const QString& lastSeenTs);
|
||||
|
||||
// 序列化为 daemon_config.json 所需格式
|
||||
QJsonArray toDeviceTreeJson() const;
|
||||
|
||||
Reference in New Issue
Block a user