2:15, EET
March 22, 2024
I’m extending SubscriptionServiceHandler and overriding the following ,method
protected void createMonitoredItems(ServiceContext sc, CreateMonitoredItemsRequest cmiReq,
CreateMonitoredItemsResponse cmiRes, List readValueIds, List moniterDataItems)
throws ServiceException
The problem is when I call super (before I extend its functionality further) it takes long time to finish and hence I see timeouts on the client (around 10 seconds per 50 items)
Is there a specific reason for that and how can I fix it?
10:53, EET
April 3, 2012
Hi,
What version of the SDK you are using?
Extending the XXXServiceHandlers would typically be a very advanced use-case (basically if nothing else works). May I ask what are you trying to do? In general if you are just starting to use the SDK I would not recommend overriding anything protected unless instructed by us.
That being said, by default the items get their initial value via read. If that takes too long (but I would say 10 seconds is sort of on the low side for a timeout, our UaClient has by default 30s), that can be changed by overriding com.prosysopc.ua.server.IoManager.initializeMonitoredDataItem(ServiceContext, MonitoredDataItem, DataValue) and making the method body empty (do not call super). And yes, in this case you would need to extend IoManager or IoManagerUaNode (if NodeManagerUaNode) and set it via NodeManager.setIoManager(IoManager). After this it is probably a lot faster, though the clients will then see Bad_WaitingForInitialData StatusCode in the first notification (which in general clients should be able to handle).
Alternatively you can try to see if there are bottlenecks when value is read for the items.
18:23, EET
March 22, 2024
Hi,
I use 4.5.4-1405
When new items are added we subscribe to live data from a socket service and when we receive data we send it the client. We need to do that in batches otherwise we get performance issues. So we extend SubscriptionServiceHandler and override createMonitoredItems
As far as I have seen, the timeout logs appear in the client after 10 seconds from calling super.createMonitoredItems.
The solution you suggested works perfectly. I don’t need to read initial value because our socket will send it after subscribe. Thanks for the help.
Most Users Ever Online: 1919
Currently Online:
36 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 756
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1530
Posts: 6473
Newest Members:
juliennea46, skyeglasfurd, delmartrost723, Laquitastype, candaceritchard, tobiasstrader41, terencemonroe6, Jameshax, scarlettkrause7, joesphmonetteModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 350, Lusetti: 0
Administrators: admin: 1