立即试用 商务报价
网关
文档 > 网关特点 > RPC方法

How to use built-in GET/SET RPC methods

This guide will help you use the OPC-UA Connector example’s built-in GET/SET RPC methods.

Every telemetry and attribute parameter has GET and SET RPC methods out of the box, so you don’t need to configure it manually. For example, if you have some telemetry parameter:

1
2
3
4
5
6
"timeseries": [
  {
    "key": "temperature",
    "path": "${ns=3;i=1001}"
  }
]

To get temperature telemetry current value:

1
get ns=3;i=1001

Response:

1
{"get": 25.34, "code": 200}

To set temperature telemetry value:

1
set ns=3;i=1001 23

image


To set new value (T3000) for “model” attribute, run the query:

1
set ns=3;i=1008; T3000

Response:

1
{"success":"true","code": 200}

image