活动频道
事件的默认 WebSocket URL 是 ws://localhost:10020.
该端口可在配置中进行修改。
这是一个低频的单向通信通道,您可通过该通道接收系统的所有事件。 不支持任何输入消息。
该通道可确保每发生一次事件都会发送一条消息。
标准格式
所有事件都遵循以下标准结构:
{
"name": "device-connected",
"category": "device",
"level": "notice",
"data": {},
"message": ""
}
字段说明
| 冠军 | 类型 | 说明 |
|---|---|---|
name | string | 该事件的唯一标识符。 |
category | string | 用于筛选和整理的分组标签(参见有效类别)。 |
level | string | 事件的严重性或重要性(参见有效等级)。 |
data | object | 包含该活动具体信息的任务说明。 |
message | string | 该活动的描述或背景(非必填),供人工阅读。 |
活动类别
Le champ category 将活动归类到以下类别中:
| Valeur | 说明 |
|---|---|
system | 主要或核心系统、全局参数等。 |
input | 外部输入的管理(例如订单或其他)。 |
session | 与特定用户会话相关的事件。 |
device | 设备管理、与控制器的交互、SerialPort通信。 |
module | 子系统或模块化组件的事件。 |
feature | 与该服务的特定功能或能力相关的事件。 |
事件级别
Le champ level 该事件的性质表明了其严重性或重要性:
| Valeur | 说明 |
|---|---|
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>"
}
}
http-route-deprecated
当某个 HTTP 路径已过时且将在未来版本中被移除时触发。
数据
| 冠军 | 类型 | 说明 |
|---|---|---|
route | string | 那条过时的路。 |
substitute | string | 建议的替代路线。 |
{
"name": "http-route-deprecated",
"category": "input",
"level": "warning",
"data": {
"route": "/the/old/way",
"substitute": "/the/new/way"
}
}
settings-invalid-key
当参数密钥无效时触发。
数据
| 冠军 | 类型 | 说明 |
|---|---|---|
key | string | 未找到的密钥。 |
{
"name": "settings-invalid-key",
"category": "input",
"level": "warning",
"data": {
"key": "devices/none-existent/key"
}
}
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 ou 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 ou verse_grip. |
device_id | string | 设备的唯一标识符。 |
{
"name": "device-disconnected",
"category": "device",
"level": "notice",
"data": {
"device_family": "verse_grip",
"device_id": "61548"
}
}
会话
device-low-control-rate
当接收到的某台设备的直接控制命令频率过低且达到安全限值时触发。这是一条警告,表明该 频率已接近限值。
| 冠军 | 类型 | 说明 |
|---|---|---|
session_id | int | 目标模拟会话的标识符。 |
device_family | string | 设备类型: inverse ou verse_grip. |
device_id | string | 设备的唯一标识符。 |
frequency | int | 您当前的采样频率,单位为赫兹。 |
{
"name": "device-low-control-rate",
"category": "session",
"level": "warning",
"data": {
"session_id": 3,
"device_family": "inverse",
"device_id": "1A2B",
"frequency": 260
},
"message": ""
}
device-critical-control-rate
当接收到的某台设备的直接控制命令频率过低且达到安全限值时触发。
| 冠军 | 类型 | 说明 |
|---|---|---|
session_id | int | 目标模拟会话的标识符。 |
device_family | string | 设备类型: inverse ou verse_grip. |
device_id | string | 设备的唯一标识符。 |
frequency | int | 您当前的采样频率,单位为赫兹。 |
{
"name": "device-critical-control-rate",
"category": "session",
"level": "error",
"data": {
"session_id": 3,
"device_family": "inverse",
"device_id": "1A2B",
"frequency": 82
},
"message": ""
}
功能
sdf-sdf_hfx-created
在创建 SDF 实体 FX 效果时触发。
| 冠军 | 类型 | 说明 |
|---|---|---|
session_id | int | 目标模拟会话的标识符。 |
device_id | string | 设备的唯一标识符。 |
hfx_id | string | 创建该FX效果时所使用的ID。 |
{
"name": "sdf-sdf_hfx-created",
"category": "feature",
"level": "notice",
"data": {
"session_id": 3,
"device_id": "1A2B",
"hfx_id": "my_fx_name"
},
"message": ""
}
sdf-sdf_hfx-deleted
当删除 SDF 实体的 FX 效果时触发。
| 冠军 | 类型 | 说明 |
|---|---|---|
session_id | int | 目标模拟会话的标识符。 |
device_id | string | 设备的唯一标识符。 |
hfx_id | string | 已删除的FX效果的标识符。 |
{
"name": "sdf-sdf_hfx-deleted",
"category": "feature",
"level": "notice",
"data": {
"session_id": 3,
"device_id": "1A2B",
"hfx_id": "my_fx_name"
},
"message": ""
}
sdf-sdf_hfx-updated
当 SDF 实体的 FX 效果被更新时触发。
| 冠军 | 类型 | 说明 |
|---|---|---|
session_id | int | 目标模拟会话的标识符。 |
device_id | string | 设备的唯一标识符。 |
hfx_id | string | FX 效果的标识符已更新。 |
{
"name": "sdf-sdf_hfx-updated",
"category": "feature",
"level": "notice",
"data": {
"session_id": 3,
"device_id": "1A2B",
"hfx_id": "my_fx_name"
},
"message": ""
}
sdf-sdf_hfx-range-entered
当相关设备的光标进入 SDF 实体的覆盖范围时触发。
| 冠军 | 类型 | 说明 |
|---|---|---|
session_id | int | 目标模拟会话的标识符。 |
device_id | string | 设备的唯一标识符。 |
hfx_id | string | FX 效应的标识符。 |
{
"name": "sdf-sdf_hfx-range-entered",
"category": "feature",
"level": "notice",
"data": {
"session_id": 3,
"device_id": "1A2B",
"hfx_id": "my_fx_name"
},
"message": ""
}
sdf-sdf_hfx-range-exited
当相关设备的光标超出 SDF 实体的覆盖范围时触发。
| 冠军 | 类型 | 说明 |
|---|---|---|
session_id | int | 目标模拟会话的标识符。 |
device_id | string | 设备的唯一标识符。 |
hfx_id | string | FX 效应的标识符。 |
{
"name": "sdf-sdf_hfx-range-exited",
"category": "feature",
"level": "notice",
"data": {
"session_id": 3,
"device_id": "1A2B",
"hfx_id": "my_fx_name"
},
"message": ""
}