feat:support builtin tags

This commit is contained in:
hxy7yx
2025-09-07 20:39:43 -07:00
parent ce6544743d
commit 394de07e6f
18 changed files with 665 additions and 13 deletions
+47 -2
View File
@@ -328,11 +328,13 @@ Neuron 将为 IIoT 平台提供一系列 API 服务,用于查询基本信息
//node name
"name": "sample-driver-adapter",
//plugin name
"plugin": "Modbus TCP"
"plugin": "Modbus TCP",
"support_import_tags": false
},
{
"name": "modbus-tcp-adapter",
"plugin": "Modbus TCP"
"plugin": "Modbus TCP",
"support_import_tags": false
}
]
}
@@ -863,6 +865,49 @@ Neuron 将为 IIoT 平台提供一系列 API 服务,用于查询基本信息
```
### 响应
```json
{
//tags count
"index": 4,
"error": 0
}
```
## 导入内置 Tag
*POST* /api/v2/tags/import
### 请求头部
**Content-Type** application/json
**Authorization** Bearer \<token\>
### 响应状态
* 200 OK
* 206
* 2202 tag name conflict
* 2203 tag attribute not support
* 2204 tag type not support
* 2205 tag address format invalid
* 404
* 2003 node not exist
* 3029 not support import tags
### 请求体
```json
{
//node name
"node": "cnc-node"
}
```
### 响应
```json
+47 -2
View File
@@ -320,11 +320,13 @@ Neuron provide a series of API services for IIoT platform, to query the basic in
//node name
"name": "sample-driver-adapter",
//plugin name
"plugin": "Modbus TCP"
"plugin": "Modbus TCP",
"support_import_tags": false
},
{
"name": "modbus-tcp-adapter",
"plugin": "Modbus TCP"
"plugin": "Modbus TCP",
"support_import_tags": false
}
]
}
@@ -844,6 +846,49 @@ To update both group name and interval:
```
### Response
```json
{
//tags count
"index": 4,
"error": 0
}
```
## Add builtin Tag
*POST* /api/v2/tags/import
### Request Headers
**Content-Type** application/json
**Authorization** Bearer \<token\>
### Response Status
* 200 OK
* 206
* 2202 tag name conflict
* 2203 tag attribute not support
* 2204 tag type not support
* 2205 tag address format invalid
* 404
* 2003 node not exist
* 3029 not support import tags
### Body
```json
{
//node name
"node": "cnc-node"
}
```
### Response
```json