Opc.Ua.Com.Client.AeTypeCache.LoadEventAttributes C# (CSharp) Method

LoadEventAttributes() private method

Fetches the attributes for the category from the AE server.
private LoadEventAttributes ( ComAeClient client, int eventTypeId, int categoryId ) : List
client ComAeClient
eventTypeId int
categoryId int
return List
        private List<EventAttribute> LoadEventAttributes(ComAeClient client, int eventTypeId, int categoryId)
        {
            List<EventAttribute> attributes = new List<EventAttribute>();

            int[] ids = null;
            string[] descriptions = null;
            short[] dataTypes = null;

            try
            {
                client.GetEventAttributes(categoryId, out ids, out descriptions, out dataTypes);
            }
            catch (Exception e)
            {
                Utils.Trace(e, "Unexpected error fetching event attributes.");
                ids = null;
            }

            if (ids != null)
            {
                for (int ii = 0; ii < ids.Length; ii++)
                {
                    EventAttribute attribute = new EventAttribute();
                    attribute.Id = ids[ii];
                    attribute.Description = descriptions[ii];
                    attribute.VarType = dataTypes[ii];
                    attributes.Add(attribute);
                }
            }

            return attributes;
        }