public override AmlCollection ToAml() { var button = new Attribute(); button.Name = "Button"; var buttonValue = new Attribute(); if (Description != null) { buttonValue.Name = "aml-text=" + Description; } buttonValue.AttributeDataType = "xs:integer"; var value = new Value { Content = ButtonValue.ToString() }; buttonValue.Value = value; button.Attributes.Add(buttonValue); var actionStartedMessage = new Attribute(); var actionStartedMessageSubelement = new Attribute(); if (ActionStartedMessage != null) { actionStartedMessageSubelement.Name = "aml-text=" + ActionStartedMessage; } actionStartedMessage.Attributes.Add(actionStartedMessageSubelement); button.Attributes.Add(actionStartedMessage); return(AmlCollection.Of(button)); }
public override AmlCollection ToAml() { var element = new InternalElement { Name = "DeviceFunction", Id = "DeviceFunction" }; if (Features != null) { element.InternalElements.AddRange(Features.ToAml().Cast <InternalElement>()); } if (VariableCollection != null) { element.InternalElements.AddRange(VariableCollection.ToAml().Cast <InternalElement>()); } if (EventCollection != null) { element.InternalElements.AddRange(EventCollection.ToAml().Cast <InternalElement>()); } if (DataTypeCollection != null) { element.InternalElements.AddRange(DataTypeCollection.ToAml().Cast <InternalElement>()); } if (ProcessDataCollection != null) { element.InternalElements.AddRange(ProcessDataCollection.ToAml().Cast <InternalElement>()); } return(AmlCollection.Of(element)); }
public override AmlCollection ToAml() { var element = new InternalElement { Name = Id }; element.Attributes.Add(new Attribute { Name = "BitLength", AttributeDataType = "xs:integer", Value = new Value { Content = BitLength.ToString() } }); foreach (var dataType in DataTypes) { var amlElement = dataType.ToAml(); element.Attributes.Add(amlElement as Attribute); } foreach (var dataTypeRef in DataTypeRefs) { var amlElement = dataTypeRef.ToAml(); element.Attributes.Add(amlElement as Attribute); } return(AmlCollection.Of(element)); }
public override AmlCollection ToAml() { var element = new AmlDescription { Content = TextId }; return(AmlCollection.Of(element)); }
public override AmlCollection ToAml() { var internalElement = new InternalElement(); internalElement.Name = "UserInterface"; internalElement.Id = "UserInterface"; return(AmlCollection.Of(internalElement)); }
public override AmlCollection ToAml() { var attribute = new Attribute { Name = TextId, AttributeDataType = "xs:string" }; return(AmlCollection.Of(attribute)); }
public override AmlCollection ToAml() { var element = new AdditionalInformation { WriterVendor = Copyright, LastWritingDateTime = DateTime.Now }; return(AmlCollection.Of(element)); }
public override AmlCollection ToAml() { var attribute = new Attribute { Name = Id, Value = new Value { Content = Value } }; return(AmlCollection.Of(attribute)); }
public override AmlCollection ToAml() { var stdEventRef = new Attribute { Name = Code.ToString(), AttributeDataType = "xs:integer", DefaultValue = new DefaultValue { Content = "0" } }; return(AmlCollection.Of(stdEventRef)); }
public override AmlCollection ToAml() { var element = new InternalElement { Name = "SupportedAccessLocks" }; element.Attributes.Add(CreateAttribute("Parameter", Parameter)); element.Attributes.Add(CreateAttribute("DataStorage", DataStorage)); element.Attributes.Add(CreateAttribute("LocalUserInterface", LocalUserInterface)); element.Attributes.Add(CreateAttribute("LocalParameterization", LocalParameterization)); return(AmlCollection.Of(element)); }
public override AmlCollection ToAml() { var attribute = new Attribute { Name = "StdSingleValueRef", AttributeDataType = "xs:integer", Value = new Value { Content = Value } }; return(AmlCollection.Of(attribute)); }
public override AmlCollection ToAml() { var element = new InternalElement { Name = $"aml-lang={Lang}" }; foreach (var text in Texts) { var amlElement = text.ToAml().Cast <Attribute>(); element.Attributes.AddRange(amlElement); } return(AmlCollection.Of(element)); }
public override AmlCollection ToAml() { // TODO: var attribute = new Attribute { Name = Code.ToString(), AttributeDataType = "xs:integer", DefaultValue = new DefaultValue { Content = "0" } }; return(AmlCollection.Of(attribute)); }
public override AmlCollection ToAml() { var collection = new AmlCollection(); if (DeviceIdentity != null) { collection.Add(DeviceIdentity.ToAml().Cast <InternalElement>()); } if (DeviceFunction != null) { collection.Add(DeviceFunction.ToAml().Cast <InternalElement>()); } return(collection); }
public override AmlCollection ToAml() { var element = new InternalElement { Name = "DatatypeCollection", Id = "DatatypeCollection" }; foreach (var dataType in DataTypes) { var amlElement = dataType.ToAml() as Attribute; element.Attributes.Add(amlElement); } return(AmlCollection.Of(element)); }
public override AmlCollection ToAml() { var element = new InternalElement { Name = "ProcessDataCollection", Id = "ProcessDataCollection" }; foreach (var processData in ProcessDataList) { var amlElement = processData.ToAml().Cast <InternalElement>(); element.InternalElements.AddRange(amlElement); } return(AmlCollection.Of(element)); }
public override AmlCollection ToAml() { var element = new InternalElement { Name = "DeviceIdentity", Id = "DeviceIdentity" }; element.Attributes.Add(CreateAttribute("VendorId", "xs:integer", VendorId.ToString())); element.Attributes.Add(CreateAttribute("VendorName", "xs:string", VendorName)); element.Attributes.Add(CreateAttribute("DeviceId", "xs:integer", DeviceId)); element.Attributes.Add(CreateAttribute("VendorText", "xs:string", VendorText)); element.Attributes.Add(CreateAttribute("VendorUrl", "xs:anyURI", VendorUrl)); element.Attributes.Add(CreateAttribute("DeviceFamily", "xs:string", DeviceFamily)); element.Attributes.Add(CreateAttribute("DeviceName", "xs:string", DeviceName)); return(AmlCollection.Of(element, ConstructVendorLogo())); }
public override AmlCollection ToAml() { var element = new InternalElement { Name = Id }; element.Attributes.Add(CreateAttribute("Index", "xs:integer", Index.ToString())); element.Attributes.Add(CreateAttribute("AccessRights", "xs:string", AccessRights ?? string.Empty)); element.Attributes.Add(CreateAttribute(Name?.TextId ?? string.Empty, "xs:string", null)); element.Attributes.Add(CreateAttribute("Description", "xs:string", Description?.TextId ?? string.Empty)); if (DataType != null) { element.Attributes.Add(DataType.ToAml() as Attribute); } return(AmlCollection.Of(element)); }
public override AmlCollection ToAml() { var internalElement = new InternalElement { Name = "EventCollection", Id = "EventCollection" }; foreach (var @event in Events) { internalElement.Attributes.AddRange(@event.ToAml().Cast <Attribute>()); } foreach (var stdEventRef in StdEventRefs) { internalElement.Attributes.AddRange(stdEventRef.ToAml().Cast <Attribute>()); } return(AmlCollection.Of(internalElement)); }
public override AmlCollection ToAml() { var element = new InternalElement { Name = Id }; foreach (var processDataIn in ProcessDataIns) { var amlElement = processDataIn.ToAml().Cast <InternalElement>(); element.InternalElements.AddRange(amlElement); } if (Condition != null) { var amlElement = Condition.ToAml().Cast <InternalElement>(); element.InternalElements.AddRange(amlElement); } return(AmlCollection.Of(element)); }
public override AmlCollection ToAml() { var element = new InternalElement { Name = "aml-text=TI_TextCollection" }; if (PrimaryLanguage != null) { var primaryLanguageAml = PrimaryLanguage.ToAml().Cast <InternalElement>(); element.InternalElements.AddRange(primaryLanguageAml); } foreach (var language in Languages) { var languageAml = language.ToAml().Cast <InternalElement>(); element.InternalElements.AddRange(languageAml); } return(AmlCollection.Of(element)); }
public override AmlCollection ToAml() { var element = new InternalElement { Name = "Features", Id = "Features" }; element.Attributes.Add(CreateAttribute("blockParameter", "xs:boolean", BlockParameter.ToString())); element.Attributes.Add(CreateAttribute("dataStorage", "xs:boolean", DataStorage.ToString())); if (SupportedAccessLocks == null) { return(AmlCollection.Of(element)); } var accessLocksElement = SupportedAccessLocks.ToAml().Cast <InternalElement>(); element.InternalElements.AddRange(accessLocksElement); return(AmlCollection.Of(element)); }
public override AmlCollection ToAml() { var element = new InternalElement { Name = "VariableCollection", Id = "VariableCollection" }; foreach (var variable in Variables) { var amlElement = variable.ToAml().Cast <InternalElement>(); element.InternalElements.AddRange(amlElement); } foreach (var variableRef in StdVariableRefs) { var amlElement = variableRef.ToAml().Cast <InternalElement>(); element.InternalElements.AddRange(amlElement); } return(AmlCollection.Of(element)); }
public override AmlCollection ToAml() { var internalElement = new InternalElement { Name = "IODD", SupportedRoleClass = new SupportedRoleClass() }; internalElement.ExternalInterfaces.Add(new ExternalInterface { Name = "IODD 1.1", Attribute = new Attribute { Name = "RefURI", AttributeDataType = "xs:anyURI", Value = new Value { Content = "/Balluff-BNI_IOL-302-000-K006-20150130-IODD1.1.xml" } } }); internalElement.ExternalInterfaces.Add(new ExternalInterface { Name = "IODD 1.0.1", Attribute = new Attribute { Name = "RefURI", AttributeDataType = "xs:anyURI", Value = new Value { Content = "/Balluff-BNI_IOL-302-000-K006-20150130-IODD1.0.1.xml" } } }); return(AmlCollection.Of(internalElement)); }
public override AmlCollection ToAml() { var systemUnitClass = new SystemUnitClass { Name = "Device" }; systemUnitClass.InternalElements.AddRange(ProfileHeader.ToAml().Cast <InternalElement>()); systemUnitClass.InternalElements.AddRange(ProfileBody.ToAml().Cast <InternalElement>()); systemUnitClass.InternalElements.AddRange(ExternalTextCollection.ToAml().Cast <InternalElement>()); var file = new CaexFile { AdditionalInformation = DocumentInfo.ToAml().First() as AdditionalInformation, SystemUnitClassLib = new SystemUnitClassLib { Name = "ComponentSystemUnitClassLib", SystemUnitClass = systemUnitClass } }; return(AmlCollection.Of(file)); }
public override AmlCollection ToAml() { return(AmlCollection.Emtpy()); }
public override AmlCollection ToAml() { var stdVariableRef = new InternalElement { Name = Id ?? string.Empty, Id = Id }; if (DefaultValue != null) { var defaultValue = new Attribute { Name = "DefaultValue", AttributeDataType = "xs:integer", Value = new Value { Content = DefaultValue } }; stdVariableRef.Attributes.Add(defaultValue); } var fixedLengthRestriction = new Attribute { Name = "FixedLengthRestriction", AttributeDataType = "xs:integer", Value = new Value { Content = FixedLengthRestriction.ToString() } }; var excludeFromDataStorage = new Attribute { Name = "ExcludeFromDataStorage", AttributeDataType = "xs:boolean", Value = new Value { Content = ExcludeFromDataStorage.ToString() } }; stdVariableRef.Attributes.Add(fixedLengthRestriction); stdVariableRef.Attributes.Add(excludeFromDataStorage); if (SingleValueRefs != null) { foreach (var singleValueRef in SingleValueRefs) { var amlElement = singleValueRef.ToAml(); stdVariableRef.Attributes.AddRange(amlElement.Cast <Attribute>()); } } if (SingleValues != null) { foreach (var singleValue in SingleValues) { var amlElement = singleValue.ToAml(); stdVariableRef.Attributes.AddRange(amlElement.Cast <Attribute>()); } } if (ValueRanges != null) { foreach (var valueRange in ValueRanges) { var amlElement = valueRange.ToAml(); stdVariableRef.Attributes.AddRange(amlElement.Cast <Attribute>()); } } if (RecordItemRef != null) { stdVariableRef.Attributes.AddRange(RecordItemRef.ToAml().Cast <Attribute>()); } return(AmlCollection.Of(stdVariableRef)); }