Comments (5)
This race condition is discussed here: kevinherron/ua-client-sdk#8
To fix it beyond using the MonitoringMode to control when values get published going to require some fundamental changes to the way the client works or to the API for creating items. I have not really decided what to do about it yet...
from milo.
The more I look at this the more I think the only good solution is to change the API. Anything else will result in the API being non-obvious to use.
Something like this:
createMonitoredItems(TimestampsToReturn timestampsToReturn,
List<MonitoredItemCreateRequest> itemsToCreate,
Consumer<UaMonitoredItem> itemCreationCallback);
Where the callback is your opportunity to set value and event consumers on the item after it is created, with the guarantee by the implementation that it will prevent values from arriving before your consumers are set so long as you do it during the callback.
from milo.
Wouldn't it a possibility to pass in the consumer which you later set anyway?
from milo.
You have to allow for them to set a Consumer
or BiConsumer
of both DataValue
and Variant[]
(for value and event subscriptions). This would require 4 different overloaded calls and you would not be able to create value and event items in the same call.
from milo.
Please have a look at the proposed fix in PR #13
from milo.
Related Issues (20)
- Security upgrade to netty-4.1.105.Final
- CertificateValidationUtil issuer certificate KeyUsage checks
- How to read CustomStructType? HOT 1
- Remove dependency on lombok
- milo version 0.6.11 monitors the approximate limit of the number of PLC points HOT 1
- URI Reading Error HOT 8
- Port forwarding HOT 1
- Milo 0.6.12 Gradle ambiguity error for guava 33 HOT 4
- EndpointDescription is only chosen based on path, not hostname, preventing different certificates per-endpoint HOT 2
- status=Bad_Timeout HOT 1
- Convert `AddressSpace` to blocking API
- Roles and Permissions HOT 1
- Cannot connect to Secured OPC Server HOT 2
- How i can get and mange pEventAttributes from OPC AE and wrapper with Milo? HOT 1
- Setting a node's value to null resp. clearing the node HOT 2
- Upgrade Netty to 4.1.108.Final
- Misleading declaration of `CompositeValidator` compared to its use HOT 3
- Getting `Bad_SecurityChecksFailed` followed by `Bad_ConnectionClosed` when using recursion with `OpcUaClient.getAddressSpace().browseNodesAsync(UaNode).thenCompose()` HOT 22
- Use ReferenceTypeTree in OpcUaServer
- Vulnerabilities CVE-2024-30172/CVE-2024-30171/CVE-2024-29857 for bouncycastle HOT 5
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 milo.