活动频道
默认事件 websocket URL 为 ws://localhost:10020
.注意:端口可在配置中更改。
这是一个低频单向通信通道,可接收所有系统事件。 不支持输入信息。
该通道保证为每个事件发送一条信息。
标准格式
所有活动都遵循如下所示的标准结构:
{
"name": "device-connected",
"category": "device",
"level": "notice",
"data": {},
"message": ""
}
字段说明
现场 | 类型 | 说明 |
---|---|---|
name | string | 事件的唯一标识符。 |
category | string | 用于筛选和组织的分组标签(见有效类别)。 |
level | string | 事件的严重性或重要性(见有效级别)。 |
data | object | 包含特定事件详细信息的有效载荷。 |
message | string | 事件的可选人工可读描述或上下文。 |
活动类别
"(《世界人权宣言》) category
总部外办事处将活动分为以下几组
价值 | 说明 |
---|---|
system | 核心或中央系统、全局设置等。 |
input | 外部输入处理(如命令或其他)。 |
session | 与特定用户会话相关的事件。 |
device | 设备管理、控制器交互、串行端口通信。 |
module | 子系统或模块组件事件。 |
feature | 与特定服务特性或功能相关的事件。 |
活动级别
活动 level
字段表示事件的严重性或重要性:
价值 | 说明 |
---|---|
info | 仅供参考 - 日志、指标或非关键性通知。 |
notice | 国家变化或重大事件。 |
warning | 出错或似乎有问题,但系统可以安全继续运行。 |
error | 出现可能影响系统行为或稳定性的问题。 |
critical | 严重破坏系统功能的严重错误。 |
panic | 灾难性故障 - 可能导致崩溃或无法恢复的状态。 |
活动
信息
该列表是系统目前报告的事件列表。我们正在积极设计和扩展事件类型和报告。
输入
invalid-io-channel
当以不支持或非预期方式使用 I/O 通道时触发。
数据
现场 | 类型 | 说明 |
---|---|---|
received_data | string | 收到的原始数据。 |
{
"name": "invalid-io-channel",
"category": "input",
"level": "warning",
"data": {
"received_data": "<raw_input_here>"
}
}
command-deprecated
当接收到的命令已过时并将在未来版本中删除时发出。
现场 | 类型 | 说明 |
---|---|---|
command | string | 收到的废弃命令 |
{
"name": "command-deprecated",
"category": "input",
"level": "warning",
"data": {
"command": "example_cmd"
},
"message": "The command `example_cmd` is deprecated and is replaced by `this_one`."
}
设备
device-connected
表示设备已连接并已完全运行。
现场 | 类型 | 说明 |
---|---|---|
device_family | string | 设备类型: inverse 或 verse_grip . |
device_id | string | 设备的唯一标识符。 |
{
"name": "device-connected",
"category": "device",
"level": "notice",
"data": {
"device_family": "inverse",
"device_id": "04BA"
}
}
device-disconnected
表示先前连接的设备已断开连接。
现场 | 类型 | 说明 |
---|---|---|
device_family | string | 设备类型: inverse 或 verse_grip . |
device_id | string | 设备的唯一标识符。 |
{
"name": "device-disconnected",
"category": "device",
"level": "notice",
"data": {
"device_family": "verse_grip",
"device_id": "61548"
}
}