Does opc ua server has publish Called Event Handler?|OPC UA Implementation: Stacks, Tools, and Samples|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Does opc ua server has publish Called Event Handler?
Avatar
Happy Happy
Member
Members
Forum Posts: 4
Member Since:
08/18/2016
sp_UserOfflineSmall Offline
1
04/04/2017 - 21:47
sp_Permalink sp_Print sp_EditHistory

I has a problem about Event Handler.

My SDK version is C#.

I can use "InformatiobNodes.OnCallMethod = new GenericMethodCalledEventHandler(OnInformatiobNodesEvent)" to get When the user clicks on the call event. And I can use this to update the node data.

But when the opc ua client publishing the nodes without use call event, how can i get the puhlish event every 100ms to update the node data?(if the ua client set 100ms publishing Interval).

My current practice is to use an thread and infinite loop to update the node data, but this is a waste of CPU performance.

  • while
  • {
  •     InformatiobNodes.Value = GetRandomValue();
  •     InformatiobNodes.ClearChangeMasks(SystemContext, false);
  •     Thread.Sleep(100);
  • }

Can i use Event Handler or other methods to update the publishing nodes data every 100ms?

Avatar
Paul Hunkar
Cleveland, Ohio, USA
Moderator
Members

Moderators-Specifications

Moderators-Companion

Moderators-Implementation

Moderators-Certification

Moderators-COM
Forum Posts: 112
Member Since:
02/24/2014
sp_UserOfflineSmall Offline
2
04/05/2017 - 10:49
sp_Permalink sp_Print

This might be better posted to GitHub if you are looking for support related to code.

 I'm also wondering what you are actually looking for?  Publish interval is how often a server sends data if something has changed (i.e. if anything has passed the client provided filter).  If nothing changes no data is published.  Periodically a keep-alive will be sent, but again no data if nothing has changed.  The server has a sampling rate (again requested by the client, but can be updated by the server) at which it checks the underlining system for value/status changes, but again if nothing changes nothing is reported.  Typically the server has a thread that either process exception changes from an underlining system or poll the underlining system for any data that changes - if anything is reported or found to change, it updates the value/status and marks a change.  The server code that handles client communication will detect the change and report it back on the next publishing interval.

Paul Hunkar - DSInteroperability

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online: David Puffer
Guest(s) 51
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1435
Posts: 4855