public void Initialize(Session session, ComAe2ProxyConfiguration configuration)
{
base.Initialize(session, configuration);
m_session = session;
// discard the table.
m_eventTypes = new NodeIdDictionary<AeEventCategory>();
m_categories = new Dictionary<uint, AeEventCategory>();
m_attributes = new Dictionary<uint, AeEventAttribute>();
// load the well known types from an embedded resource.
IndexWellKnownTypes();
// browse the server for additional types.
if (!configuration.UseOnlyBuiltInTypes)
{
IndexTypesFromServer(Opc.Ua.ObjectTypeIds.BaseEventType, OpcRcw.Ae.Constants.SIMPLE_EVENT);
}
// check for existing category mapping.
NodeIdMappingSet mappingSet = configuration.GetMappingSet("EventCategories");
// update mappings.
UpdateEventTypeMappings(mappingSet);
// update configuration.
configuration.ReplaceMappingSet(mappingSet);
// check for existing attribute mapping.
mappingSet = configuration.GetMappingSet("EventAttributes");
// update mappings.
UpdateEventAttributeMappings(mappingSet);
// update configuration.
configuration.ReplaceMappingSet(mappingSet);
}