Method 방법
OPC UA Method 노드는 서버 측에서 노출된 인터페이스입니다 RPC . ua.call(...) 호출을 통해.
하위 페이지 이동
일분 예시
try (OpcUaVariant a = new OpcUaVariant().setInt32(3);
OpcUaVariant b = new OpcUaVariant().setInt32(4)) {
List<OpcUaVariant> outputs = ua.call(
"ns=2;s=Calculator",
"ns=2;s=Calculator.Add",
a, b);
try {
for (OpcUaVariant v : outputs) {
System.out.println("sum = " + v.asInt32());
}
} finally {
for (OpcUaVariant v : outputs) v.close();
}
}