public AasEventMsgEnvelope( DateTime timestamp, AdminShell.Reference source = null, AdminShell.SemanticId sourceSemanticId = null, AdminShell.Reference observableReference = null, AdminShell.SemanticId observableSemanticId = null, string topic = null, string subject = null, AasPayloadBase payload = null, List <AasPayloadBase> payloads = null) { Timestamp = timestamp; Source = source; SourceSemanticId = sourceSemanticId; ObservableReference = observableReference; ObservableSemanticId = observableSemanticId; Topic = topic; Subject = subject; if (payload != null) { Payloads.Add(payload); } if (payloads != null) { Payloads.AddRange(payloads); } }
// // HasSemantic // public void DisplayOrEditEntitySemanticId(AnyUiStackPanel stack, AdminShell.SemanticId semanticId, Action <AdminShell.SemanticId> setOutput, string statement = null, bool checkForCD = false, string addExistingEntities = null, CopyPasteBuffer cpb = null) { // access if (stack == null) { return; } // members this.AddGroup(stack, "Semantic ID:", levelColors.SubSection); // hint this.AddHintBubble( stack, hintMode, new[] { new HintCheck( () => { return(semanticId == null || semanticId.IsEmpty); }, "Check if you want to add a semantic reference. " + statement, severityLevel: HintCheck.Severity.Notice, breakIfTrue: true), new HintCheck( () => { return(checkForCD && semanticId[0].type != AdminShell.Key.ConceptDescription); }, "The semanticId usually refers to a ConceptDescription " + "within the respective repository.", severityLevel: HintCheck.Severity.Notice) }); // add from Copy Buffer var bufferKeys = CopyPasteBuffer.PreparePresetsForListKeys(cpb); // add the keys if (this.SafeguardAccess( stack, repo, semanticId, "semanticId:", "Create data element!", v => { setOutput?.Invoke(new AdminShell.SemanticId()); return(new AnyUiLambdaActionRedrawEntity()); })) { this.AddKeyListKeys( stack, "semanticId", semanticId.Keys, repo, packages, PackageCentral.PackageCentral.Selector.MainAux, addExistingEntities: addExistingEntities, addFromPool: true, addEclassIrdi: true, addPresetNames: bufferKeys.Item1, addPresetKeyLists: bufferKeys.Item2, jumpLambda: (kl) => { return(new AnyUiLambdaActionNavigateTo(AdminShell.Reference.CreateNew(kl))); }); } }
public BomNodeStyle FindFirstNodeStyle(AdminShell.SemanticId semId) { if (semId == null) { return(null); } return(NodeStyles.Store.FindElementByReference(semId, AdminShell.Key.MatchMode.Relaxed)); }
public BomNodeStyle FindFirstNodeStyle(AdminShell.SemanticId semId) { foreach (var rec in this) { var res = rec.FindFirstNodeStyle(semId); if (res != null) { return(res); } } return(null); }
/// <summary> /// Find matching options records /// </summary> public IEnumerable <BomStructureOptionsRecord> MatchingRecords(AdminShell.SemanticId semId) { foreach (var rec in Records) { if (rec.AllowSubmodelSemanticId != null) { foreach (var x in rec.AllowSubmodelSemanticId) { if (semId != null && semId.Matches(x)) { yield return(rec); } } } } }
public ImageMap() { // info this.DomainInfo = "Plugin ImageMap"; // Referable SEM_ImageMapSubmodel = new AdminShell.SemanticId( AdminShell.Key.CreateNew( type: "Submodel", local: false, idType: "IRI", value: "http://admin-shell.io/aasx-package-explorer/plugins/ImageMap/Submodel/1/0")); CD_ImageFile = CreateSparseConceptDescription("en", "IRI", "ImageFile", "http://admin-shell.io/aasx-package-explorer/plugins/ImageMap/ImageFile/1/0", @"File element with the image to be displayed."); CD_EntityOfImageMap = CreateSparseConceptDescription("en", "IRI", "EntityOfImageMap", "http://admin-shell.io/aasx-package-explorer/plugins/ImageMap/EntityOfImageMap/1/0", @"States, that the Entity is part of an image map definition."); CD_RegionRect = CreateSparseConceptDescription("en", "IRI", "RegionRect", "http://admin-shell.io/aasx-package-explorer/plugins/ImageMap/RegionRect/1/0", @"Definition of a rectangular region in JSON format [ x0, y0, x1, y1 ]."); CD_RegionCircle = CreateSparseConceptDescription("en", "IRI", "RegionCircle", "http://admin-shell.io/aasx-package-explorer/plugins/ImageMap/RegionCircle/1/0", @"Definition of a circular region in JSON format [ x0, y0, radius ]."); CD_RegionPolygon = CreateSparseConceptDescription("en", "IRI", "RegionPolygon", "http://admin-shell.io/aasx-package-explorer/plugins/ImageMap/RegionPolygon/1/0", @"Definition of a polygon region in JSON format [ x0, y0, x1, y1, .. ]."); CD_NavigateTo = CreateSparseConceptDescription("en", "IRI", "NavigateTo", "http://admin-shell.io/aasx-package-explorer/plugins/ImageMap/NavigateTo/1/0", @"If ReferenceElement subordinate to Entity, overrules Entity AssetId and navigates to value " + "reference ."); // reflect AddEntriesByReflection(this.GetType(), useAttributes: false, useFieldNames: true); }
// // HasSemantic // public void DisplayOrEditEntitySemanticId(StackPanel stack, AdminShell.SemanticId semanticId, Action <AdminShell.SemanticId> setOutput, string statement = null, bool checkForCD = false, string addExistingEntities = null) { // access if (stack == null) { return; } // members this.AddGroup(stack, "Semantic ID:", levelColors[1][0], levelColors[1][1]); this.AddHintBubble( stack, hintMode, new[] { new HintCheck( () => { return(semanticId == null || semanticId.IsEmpty); }, "Check if you want to add a semantic reference. " + statement, severityLevel: HintCheck.Severity.Notice, breakIfTrue: true), new HintCheck( () => { return(checkForCD && semanticId[0].type != AdminShell.Key.ConceptDescription); }, "The semanticId usually refers to a ConceptDescription " + "within the respective repository.", severityLevel: HintCheck.Severity.Notice) }); if (this.SafeguardAccess( stack, repo, semanticId, "semanticId:", "Create data element!", v => { setOutput?.Invoke(new AdminShell.SemanticId()); return(new ModifyRepo.LambdaActionRedrawEntity()); })) { this.AddKeyListKeys( stack, "semanticId", semanticId.Keys, repo, package: package, addExistingEntities: addExistingEntities, addFromPool: true); } }
public ModuleTypePackage(AasxDefinitionBase bs) { SEM_MtpSubmodel = new AdminShell.SemanticId( AdminShell.Key.CreateNew( type: "Submodel", local: false, idType: "IRI", value: "http://www.admin-shell.io/mtp/v1/submodel")); SEM_MtpInstanceSubmodel = new AdminShell.SemanticId( AdminShell.Key.CreateNew( type: "Submodel", local: false, idType: "IRI", value: "http://www.admin-shell.io/mtp/v1/mtp-instance-submodel")); CD_MtpTypeSubmodel = CreateSparseConceptDescription("en", "IRI", "MtpTypeSubmodel", "http://www.admin-shell.io/mtp/v1/New/MtpTypeSubmodel", @"Direct Reference to MTP Type Submodel."); CD_SourceList = CreateSparseConceptDescription("en", "IRI", "SourceList", "http://www.admin-shell.io/mtp/v1/MTPSUCLib/CommunicationSet/SourceList", @"Collects source of process data for MTP."); CD_SourceOpcUaServer = CreateSparseConceptDescription("en", "IRI", "SourceOpcUaServer", "http://www.admin-shell.io/mtp/v1/MTPCommunicationSUCLib/ServerAssembly/OPCUAServer", "Holds infomation on a single data source, which is an OPC UA server."); CD_Endpoint = CreateSparseConceptDescription("en", "IRI", "Endpoint", "http://www.admin-shell.io/mtp/v1/MTPCommunicationSUCLib/ServerAssembly/OPCUAServer/Endpoint", "URL of OPC UA server for data source."); CD_MtpFile = CreateSparseConceptDescription("en", "IRI", "MtpFile", "http://www.admin-shell.io/mtp/v1/MTPSUCLib/ModuleTypePackage", "Specifies a File, which contains MTP information in MTP/ AutmationML format." + "File may be zipped."); }
public GenericFormsOptionsRecord MatchRecordsForSemanticId(AdminShell.SemanticId sem) { // check for a record in options, that matches Submodel GenericFormsOptionsRecord res = null; if (Records != null) { foreach (var rec in Records) { if (rec?.FormSubmodel?.KeySemanticId != null) { if (sem != null && sem.Matches(rec.FormSubmodel.KeySemanticId)) { res = rec; break; } } } } return(res); }
public SmdExporter() { // info this.DomainInfo = "Plugin SmdExporter"; // Referable SEM_SmdExporterSubmodel = new AdminShell.SemanticId( AdminShell.Key.CreateNew( type: "Submodel", local: false, idType: "IRI", value: "http://admin-shell.io/aasx-package-explorer/plugins/SmdExporter/Submodel/1/0")); // dummy .. to be replaced later CD_Dummy = CreateSparseConceptDescription("en", "IRI", "Dummy", "http://admin-shell.io/aasx-package-explorer/plugins/SmdExporter/Dummy/1/0", @"TBD."); // reflect AddEntriesByReflection(this.GetType(), useAttributes: false, useFieldNames: true); }
public ModuleTypePackage() { // info this.DomainInfo = "Module Type Package (MTP)"; // Referable SEM_MtpSubmodel = new AdminShell.SemanticId( AdminShell.Key.CreateNew( type: "Submodel", local: false, idType: "IRI", value: "http://www.admin-shell.io/mtp/v1/submodel")); SEM_MtpInstanceSubmodel = new AdminShell.SemanticId( AdminShell.Key.CreateNew( type: "Submodel", local: false, idType: "IRI", value: "http://www.admin-shell.io/mtp/v1/mtp-instance-submodel")); CD_MtpTypeSubmodel = CreateSparseConceptDescription("en", "IRI", "MtpTypeSubmodel", "http://www.admin-shell.io/mtp/v1/New/MtpTypeSubmodel", @"Direct Reference to MTP Type Submodel."); CD_SourceList = CreateSparseConceptDescription("en", "IRI", "SourceList", "http://www.admin-shell.io/mtp/v1/MTPSUCLib/CommunicationSet/SourceList", @"Collects source of process data for MTP."); CD_SourceOpcUaServer = CreateSparseConceptDescription("en", "IRI", "SourceOpcUaServer", "http://www.admin-shell.io/mtp/v1/MTPCommunicationSUCLib/ServerAssembly/OPCUAServer", "Holds infomation on a single data source, which is an OPC UA server."); CD_Endpoint = CreateSparseConceptDescription("en", "IRI", "Endpoint", "http://www.admin-shell.io/mtp/v1/MTPCommunicationSUCLib/ServerAssembly/OPCUAServer/Endpoint", "URL of OPC UA server for data source."); CD_MtpFile = CreateSparseConceptDescription("en", "IRI", "MtpFile", "http://www.admin-shell.io/mtp/v1/MTPSUCLib/ModuleTypePackage", "Specifies a File, which contains MTP information in MTP/ AutmationML format." + "File may be zipped."); CD_IdentifierRenaming = CreateSparseConceptDescription("en", "IRI", "IdentifierRenaming", "http://www.admin-shell.io/mtp/v1/New/IdentifierRenaming", "Specifies a renaming of OPC UA identifiers for nodes. Designates a SubmodelElementCollection " + "containing two Properties for OldText and NewText for string replacement."); CD_NamespaceRenaming = CreateSparseConceptDescription("en", "IRI", "NamespaceRenaming", "http://www.admin-shell.io/mtp/v1/New/NamespaceRenaming", "Specifies a renaming of OPC UA namespaces for nodes. Designates a SubmodelElementCollection " + "containing two Properties for OldText and NewText for string replacement."); CD_RenamingOldText = CreateSparseConceptDescription("en", "IRI", "OldText", "http://www.admin-shell.io/mtp/v1/New/RenamingOldText", "Within a renaming of OPC UA identifiers or namespaces, designates the text which shall be " + "replaced."); CD_RenamingNewText = CreateSparseConceptDescription("en", "IRI", "NewText", "http://www.admin-shell.io/mtp/v1/New/RenamingNewText", "Within a renaming of OPC UA identifiers or namespaces, designates the new text, which shall be " + "substituted."); // reflect AddEntriesByReflection(this.GetType(), useAttributes: false, useFieldNames: true); }