public bool ImportSubmodel(ClassWrapper cls, AdminShellV20.AdministrationShell adminShell) { if (!cls.IsSelected) { return(false); } var submodel = Iec61360Utils.CreateSubmodel(_env, adminShell, cls.Element.GetIec61360Data(_all)); AddProperties(submodel, cls.Children); return(true); }
protected static AdminShellV20.AdministrationShell CreateAdminShell(AdminShellV20.AdministrationShellEnv env) { var adminShell = new AdminShellV20.AdministrationShell() { identification = new AdminShellV20.Identification( AdminShellV20.Identification.IRI, AdminShellUtil.GenerateIdAccordingTemplate(Options.Curr.TemplateIdAas)), }; env.AdministrationShells.Add(adminShell); return(adminShell); }
private static AdminShellV20.AdministrationShell CreateAdminShell(AdminShellV20.AdministrationShellEnv env) { var adminShell = new AdminShellV20.AdministrationShell() { identification = new AdminShellV20.Identification( AdminShellV20.Identification.IRI, AasxPackageExplorer.Options.Curr.GenerateIdAccordingTemplate( AasxPackageExplorer.Options.Curr.TemplateIdAas)), }; env.AdministrationShells.Add(adminShell); return(adminShell); }
public static AdminShellV20.Submodel CreateSubmodel( AdminShellV20.AdministrationShellEnv env, AdminShellV20.AdministrationShell adminShell, Iec61360Data data) { var submodel = new AdminShellV20.Submodel() { identification = new AdminShellV20.Identification( AdminShellV20.Identification.IRI, AasxPackageExplorer.Options.Curr.GenerateIdAccordingTemplate( AasxPackageExplorer.Options.Curr.TemplateIdSubmodelInstance)), idShort = data.IdShort, kind = AdminShellV20.ModelingKind.CreateAsInstance(), }; AddDescriptions(submodel, data); AddDataSpecification(env, submodel, data); adminShell.AddSubmodelRef(submodel.GetReference() as AdminShellV20.SubmodelRef); env.Submodels.Add(submodel); return(submodel); }
public static AdminShellV20.Submodel CreateSubmodel( AdminShellV20.AdministrationShellEnv env, AdminShellV20.AdministrationShell adminShell, Iec61360Data data) { // We need this to ensure that we don't use the same AAS ID twice when importing multiple submodels (as // GenerateIdAccordingTemplate uses the timestamp as part of the ID). Thread.Sleep(1000); var submodel = new AdminShellV20.Submodel() { identification = new AdminShellV20.Identification( AdminShell.Identification.IRI, AdminShellUtil.GenerateIdAccordingTemplate(Options.Curr.TemplateIdSubmodelInstance)), idShort = data.IdShort, kind = AdminShellV20.ModelingKind.CreateAsInstance(), }; AddDescriptions(submodel, data); AddDataSpecification(env, submodel, data); adminShell.AddSubmodelRef(submodel.GetReference() as AdminShellV20.SubmodelRef); env.Submodels.Add(submodel); return(submodel); }
public override bool ImportSubmodelInto(AdminShellV20.AdministrationShellEnv env, AdminShellV20.AdministrationShell adminShell) { return(new Importer(env, Context).ImportSubmodel(this, adminShell)); }
public virtual bool ImportSubmodelInto(AdminShellV20.AdministrationShellEnv env, AdminShellV20.AdministrationShell adminShell) => false;