private AdminShellV20.SubmodelElementCollection CreatePropertyCollection(Class cls, IEnumerable <Model.IElement> properties) { var collection = Iec61360Utils.CreateCollection(_env, cls.GetIec61360Data(_all)); AddProperties(collection, properties); return(collection); }
private AdminShellV20.SubmodelElementCollection CreateLevelCollection(Property property, LevelType levelType) { var data = property.GetIec61360Data(_all); var collection = Iec61360Utils.CreateCollection(_env, data); foreach (var levelValue in levelType.Types) { var p = CreateLevelProperty(data, levelType, levelValue); collection.Add(p); } return(collection); }
private AdminShellV20.SubmodelElementCollection CreateAggregateCollection( PropertyWrapper wrapper, AggregateType aggregateType) { var collection = Iec61360Utils.CreateCollection(_env, wrapper.Element.GetIec61360Data(_all)); if (wrapper.Children.Count == 1) { var child = wrapper.Children.First(); if (child.IsSelected) { for (int i = 0; i < Math.Max(1, aggregateType.MinimumElementCount); i++) { var element = CreateSubmodelElement(child); if (element != null) { element.idShort += i; collection.Add(element); } } } } return(collection); }