作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
OPCUA 服务器有一种带有一个输入参数的方法例如
protected Variant[] invoke(InvocationContext invocationContext, Variant[] inputValues) {
logger.debug("Invoking sqrt() method of objectId={}", invocationContext.getObjectId());
double x = (double) inputValues[0].getValue();
double xSqrt = Math.sqrt(x);
return new Variant[]{new Variant(xSqrt)};
}
在 OPCUA 客户端,我可以使用数组 int 调用此方法吗?例如[1,4,9,16,25]
CallMethodRequest request = new CallMethodRequest(
objectId,
methodId,
new Variant[]{new Variant(input)}
);
这里的inputArguments是Variant数组,我可以设置[1,4,9,16,25]并得到[1,2,3,4,5]吗?
最佳答案
不,事情不是这样的。
不过,您可以在一个 CallRequest
内发送 5 个 CallMethodRequest
。
关于java - eclipse 米洛 : Does method support argument array?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61887587/
我是一名优秀的程序员,十分优秀!