How to override custom EventTypes in OPC UA HA Server #2582
Unanswered
ABBINVARED
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a console application which act as a server, here by default OPCUA Event Types are loading ,
Here I have list of Event types from database, same thing need to be loaded to the address space of a OPC UA client.
Here i have to override the default event types from opcua to my application specific event types to the opc ua clinet.
Below is the reference for more details:
public void CreateNodeManagerAddressSpace(IDictionary<NodeId, IList> externalReferences, string configPath)
{
// Load the tag configuration File
IUaDaConfig tagConfig = new UaDaConfig();
IHistoryConfig config = new HistoryConfig();
config.Initialize(configPath);
if (!tagConfig.Initialize(config))
{
Log.Logger.Error("Starting service without configuration.");
this.State = ServerState.NoConfiguration;
return;
}
#pragma warning disable S2589 // Boolean expressions should not be gratuitous
var serverConfigs = tagConfig?.GetServerConfigs();
#pragma warning restore S2589 // Boolean expressions should not be gratuitous
var dbConfig = tagConfig.GetDBConfig();
var historyAccessServer = tagConfig.GetDaDataModel().HistoryAccessServer;
dbConfig.DbConfiguration = new DbConfiguration();
List<Configuration.EventType> eventTypeList = GetAllEventTypeList(this.ConnectionString);
var eventTypes = eventTypeList ?? tagConfig.GetDaDataModel().EventTypes;
var nodes = eventTypes.GroupBy(x => x.ParentEventTypeId).ToList();
How to Override EventTypes to Address space in OPC UA server which is input to the OPC UA Client. Solution which i am trying in .net core 6.0.
public void CreateNodeManagerAddressSpace(IDictionary<NodeId, IList> externalReferences, string configPath)
{
}
var eventTypes = eventTypeList ?? tagConfig.GetDaDataModel().EventTypes;
need to override the address space event types with above list of event types.
from above code, nodes has BaseeventType under Audit to System event, these list have to load.
Share some sample to load custom event types to address space in OPC UA clinet.
Can any one come across this kind of requirement, please share any sample code if it is come across.
Beta Was this translation helpful? Give feedback.
All reactions