본문으로 건너뛰기

Method 방법

OPC UA Method 노드는 서버 측에서 노출된 인터페이스입니다 RPC . ua.call(...) 호출을 통해.

하위 페이지 이동
  • 메서드 호출의 전체 시그니처 / 메모리 소유권 / 메서드 찾기 자세한 내용은 다음을 NodeId 참조하십시오. Call.
  • 알람 확인(Acknowledge)도 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();
}
}

다음 단계​