AE Refresh behaviour|Classic OPC: DA, A&E, HDA, XML-DA, etc.|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
AE Refresh behaviour
Avatar
Siyuan Xu
Member
Members
Forum Posts: 7
Member Since:
06/29/2023
sp_UserOfflineSmall Offline
1
09/20/2024 - 01:24
sp_Permalink sp_Print

Hello, could you help me to understand the Refresh() process when there were not any active nor unacknowledged condition on AE server?
Should the AE server send an empty list of EventNotifications with Refresh and LastRefresh flags true?

I get some mixed result with a customer’s server. The server sometimes send nothing, and sometimes send empty pEvents to  OpcCom.Ae.Subscription.OnEvent(

int hClientSubscription,
int bRefresh,
int bLastRefresh,
int dwCount,
OpcRcw.Ae.ONEVENTSTRUCT[] pEvents)

which will cause exception:

System.NullReferenceException
HResult=0x80004003
Message=Object reference not set to an instance of an object.
Source=OpcNetApi.Com
StackTrace:
at OpcCom.Ae.Subscription.Callback.OnEvent(Int32 hClientSubscription, Int32 bRefresh, Int32 bLastRefresh, Int32 dwCount, ONEVENTSTRUCT[] pEvents) in xxxxxxxxxx\NetCore\OpcNetApi.Com\Ae\OpcCom.Ae.Subscription.cs:line 523

This exception was originally thrown at this call stack:
OpcCom.Ae.Subscription.Callback.OnEvent(int, int, int, int, OpcRcw.Ae.ONEVENTSTRUCT[]) in OpcCom.Ae.Subscription.cs

Avatar
Randy Armstrong
Admin
Forum Posts: 1549
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
09/20/2024 - 07:26
sp_Permalink sp_Print

Do you have the code for the NET API?

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 12
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1423
Posts: 4813