属性树 (Properties)

分布式分层属性树——类 Unix 路径语法,ZMQ 实时同步。

概述

Properties 是 Quatm 的核心状态管理系统。它是一个分层键值树,通过 ZMQ REP/XPUB 在进程间实时同步变更。

说明
Properties线程化属性树服务,ZMQ 发布/订阅同步
PropertyAttribute描述符式树节点访问器

用法

from quatm.servers.properties import Properties

props = Properties()
props["laser/power"] = 50e-3      # 设置
power = props["laser/power"]       # 读取
props.subscribe("laser/*")         # 监听子树

# 远程访问(另一进程)
value = props["camera/exposure"]   # 自动 ZMQ 同步