kangaroo1122 / milo-spring-boot-starter

基于eclipse milo封装的opc ua客户端starter,方便在spring boot中使用,支持spring boot 3.x。
https://blog.csdn.net/Vampire_1122/article/details/130497727
30 stars 13 forks source link

当opcua server中的 id为 numeric时,会读取不到数据 #4

Closed zichenbro2333 closed 11 months ago

zichenbro2333 commented 11 months ago

当opcua server中的 id为 numeric时,会读取不到数据,现在的读取都是String入参,没有其他类型的入参,这个问题我找了好久才发现的

图片

kangaroo1122 commented 11 months ago

当opcua server中的 id为 numeric时,会读取不到数据,现在的读取都是String入参,没有其他类型的入参,这个问题我找了好久才发现的

图片

你用字符串表示法试试

zichenbro2333 commented 11 months ago

可以详细说一下吗? 因为现在的读方法入参都是string,我现在做的是每个入场都是类型的标志位来判断的哈哈哈哈。

kangaroo1122 @.***>于2023年9月20日 周三17:50写道:

当opcua server中的 id为 numeric时,会读取不到数据,现在的读取都是String入参,没有其他类型的入参,这个问题我找了好久才发现的

[image: 图片] https://user-images.githubusercontent.com/142558759/269231573-362fdaba-8013-40b3-b307-d9f0ac9594d6.png

你用字符串表示法试试

— Reply to this email directly, view it on GitHub https://github.com/kangaroo1122/milo-spring-boot-starter/issues/4#issuecomment-1727373266, or unsubscribe https://github.com/notifications/unsubscribe-auth/BB7UMJ2UD4HMRCWRKOAC433X3K36DANCNFSM6AAAAAA47SM5TA . You are receiving this because you authored the thread.Message ID: @.***>

kangaroo1122 commented 11 months ago

可以详细说一下吗? 因为现在的读方法入参都是string,我现在做的是每个入场都是类型的标志位来判断的哈哈哈哈。 kangaroo1122 @.>于2023年9月20日 周三17:50写道: 当opcua server中的 id为 numeric时,会读取不到数据,现在的读取都是String入参,没有其他类型的入参,这个问题我找了好久才发现的 [image: 图片] https://user-images.githubusercontent.com/142558759/269231573-362fdaba-8013-40b3-b307-d9f0ac9594d6.png 你用字符串表示法试试 — Reply to this email directly, view it on GitHub <#4 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/BB7UMJ2UD4HMRCWRKOAC433X3K36DANCNFSM6AAAAAA47SM5TA . You are receiving this because you authored the thread.Message ID: @.>

image

kangaroo1122 commented 11 months ago

如果是字符串表示法,starter会自动解析成NodeId

zichenbro2333 commented 11 months ago

可以详细说一下吗? 因为现在的读方法入参都是string,我现在做的是每个入场都是类型的标志位来判断的哈哈哈哈。 kangaroo1122 @.**>于2023年9月20日 周三17:50写道: 当opcua server中的 id为 numeric时,会读取不到数据,现在的读取都是String入参,没有其他类型的入参,这个问题我找了好久才发现的 [image: 图片] https://user-images.githubusercontent.com/142558759/269231573-362fdaba-8013-40b3-b307-d9f0ac9594d6.png 你用字符串表示法试试 — Reply to this email directly, view it on GitHub <#4 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/BB7UMJ2UD4HMRCWRKOAC433X3K36DANCNFSM6AAAAAA47SM5TA . You are receiving this because you authored the thread.Message ID: @.**>

image 好的,这下子理解了。但是我们产品经理不打算让用户写这种类似表达式的入参,还是需要我自己去拼,但是理解了是最好的,管他有没有按照最规范的弄。哈哈哈哈哈

kangaroo1122 commented 11 months ago

可以详细说一下吗? 因为现在的读方法入参都是string,我现在做的是每个入场都是类型的标志位来判断的哈哈哈哈。 kangaroo1122 @.**>于2023年9月20日 周三17:50写道: 当opcua server中的 id为 numeric时,会读取不到数据,现在的读取都是String入参,没有其他类型的入参,这个问题我找了好久才发现的 [image: 图片] https://user-images.githubusercontent.com/142558759/269231573-362fdaba-8013-40b3-b307-d9f0ac9594d6.png 你用字符串表示法试试 — Reply to this email directly, view it on GitHub <#4 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/BB7UMJ2UD4HMRCWRKOAC433X3K36DANCNFSM6AAAAAA47SM5TA . You are receiving this because you authored the thread.Message ID: @.**>

image 好的,这下子理解了。但是我们产品经理不打算让用户写这种类似表达式的入参,还是需要我自己去拼,但是理解了是最好的,管他有没有按照最规范的弄。哈哈哈哈哈

很简单,自己程序再封装一下用户的输入就行了

kangaroo1122 commented 11 months ago

希望支持字符串表示法