Comments (10)
Hello, you can see the implementation in the TestClient project, and the implementation of the subscription for the server in the TestServer project.
from libua.
Hello,
Can you capture subscribing via uaexpert in Wireshark with no security and share that here? I would guess it subscribed to something besides (nodeid, value).
from libua.
Hi Nauful,
sure, I've capture the traffic from UAExpert and the LibUA client for the mentioned node, which is now ns=4;i=2801; after an structure update on the OPC server. The according dump is named after that at the end (..._libua / ..._uaexpert).
What I've seen so far, the requests are nearly the same for the specific node, but in the LibUA client, the "NotifyDataChangeNotifications" method is not fired on an publish response for that node. Maybe there is some filter or switch case missing in LibUA?
opc_nodeid_subscribe_libua.zip
opc_nodeid_subscribe_uaexpert.zip
from libua.
Hmm, it looks like that should have worked. Please check this line and step through to see if it reaches the call to NotifyDataChangeNotifications
:
LibUA/NET Core/LibUA/Client.cs
Line 4294 in 34253aa
If decoding succeeds, it should call NotifyDataChangeNotifications
. You override that in your client, for example:
LibUA/NET Core/TestClient/Program.cs
Line 98 in 34253aa
from libua.
Thanks for the hint. I've stepped through the code and found the failing part in the Client.cs on line 4299, where the call succeeded &= recvHandler.RecvBuf.Decode(out notifications[j]);
returns 'false'.
Digging deeper in the stack, it tries to decode the notification as variant in MemoryBufferExtensions.cs on line 1194. Finally in the VariantDecode function in MemoryBuffer.cs line 635, it fails on line 644, where if ((mask & 0x80) != 0)
is always 0.
Maybe the ExtensionObject has a different mask and need to be handle separately in the MemoryBufferExtensions.cs?
from libua.
Thanks, that gives me a hint. Let me investigate. I don't think I've seen an extension object in a variant before so this is a new case.
from libua.
Fixed, let me know if the latest version works.
from libua.
Looks good, great work 👍 . The only thing that seems to be missing is the source timestamp, the server timestamp is correct in the notification. Maybe another bug?
from libua.
There's no source timestamp in the data:
uaexpert requested both timestamps:
In your CreateMonitoredItemsRequest
, request both source and server timestamps:
from libua.
Okay that was my fault, sorry for that 👍 .
Thanks again for the fast response and quick fix, everything is working now like expected :-)
from libua.
Related Issues (20)
- How to read an ExtensionObject? HOT 6
- Error DefaultAddressSpace HOT 1
- TranslateBrowsePath does not mark the final BrowsePathTarget correctly HOT 2
- Exception in MemoryBufferExtension.cs with a Prosys OPCUA Server HOT 16
- Nullreference Exception in Client Sample HOT 1
- LingerState: Unhandled Exception - Invalid Argument HOT 1
- Method calls are not executed HOT 5
- EUInformation and Range HOT 4
- Switch to use ArrayPool in memorybuffer to reduce allocation pressure HOT 1
- Browsing S7 OPCUA Server, Outputs not returned (FunctionalGroupType?) HOT 7
- Missing ServiceResult returns of CheckServiceFaultResponse() in Client.cs HOT 1
- BadAttributeIdInvalid when browsing Server HOT 1
- Regarding client connection issues HOT 4
- Chunk messages are not created. HOT 7
- Thoughts on Unit Tests HOT 1
- TIMEOUT: get Server Status HOT 3
- High CPU HOT 5
- NodeVariables don't currently expose ArrayDimensions HOT 1
- Having trouble with Call method when method has Extension Object HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libua.