Skip to content
RepoVersionStarsForks

测点操作 API

测点数据读写相关的 API 接口文档。

获取测点表格数据

http
GET /api/device/table?channel_id={id}&page={page}&page_size={size}

查询参数:

参数类型说明
channel_idint设备通道 ID
pageint页码,从 1 开始
page_sizeint每页数量
frame_typeint测点类型过滤(可选)

响应示例:

json
{
  "code": 200,
  "data": {
    "total": 100,
    "items": [
      {
        "id": 1,
        "name": "A相电压",
        "address": 0,
        "value": 220.5,
        "frame_type": 0,
        "decode": "0x42"
      }
    ]
  }
}

更新测点值

http
PUT /api/device/update_point
Content-Type: application/json

请求体:

json
{
  "point_id": 1,
  "value": 230.0,
  "frame_type": 0
}

手动读取单个测点

http
POST /api/device/read_single_point
Content-Type: application/json

请求体:

json
{
  "channel_id": 1,
  "point_id": 1,
  "frame_type": 0
}

测点类型枚举

类型说明
0YC遥测(模拟量测量)
1YX遥信(开关量状态)
2YK遥控(开关量命令)
3YT遥调(模拟量命令)

Released under the Apache 2.0 License.