From 9ac0af0c3791ccbf73600e726384592d9e9b9c16 Mon Sep 17 00:00:00 2001 From: Patrick Ritchie Date: Wed, 25 Oct 2023 18:43:12 -0400 Subject: [PATCH] Updated SysML Import --- .../Devices/CellDefinition.g.cs | 6 ++--- .../Configurations/ISpecification.g.cs | 4 +-- .../Devices/Configurations/Specification.g.cs | 4 +-- .../Devices/EntryDefinition.g.cs | 6 ++--- .../Devices/ICellDefinition.g.cs | 6 ++--- .../Devices/IEntryDefinition.g.cs | 6 ++--- .../Devices/References/IReference.cs | 24 ----------------- .../Devices/References/Reference.cs | 27 ------------------- .../MTConnectPropertyModel.cs | 6 +++++ 9 files changed, 22 insertions(+), 67 deletions(-) delete mode 100644 src/MTConnect.NET-Common/Devices/References/IReference.cs delete mode 100644 src/MTConnect.NET-Common/Devices/References/Reference.cs diff --git a/src/MTConnect.NET-Common/Devices/CellDefinition.g.cs b/src/MTConnect.NET-Common/Devices/CellDefinition.g.cs index b3dac036..6125c7c4 100644 --- a/src/MTConnect.NET-Common/Devices/CellDefinition.g.cs +++ b/src/MTConnect.NET-Common/Devices/CellDefinition.g.cs @@ -26,17 +26,17 @@ public class CellDefinition : ICellDefinition /// /// Dataitem type that defines the meaning of the key. /// - public DataItemType KeyType { get; set; } + public string KeyType { get; set; } /// /// Same as DataItem DataItem::subType. See DataItem. /// - public DataItemSubType SubType { get; set; } + public string SubType { get; set; } /// /// Same as DataItem DataItem::type. See DataItem Types. /// - public DataItemType Type { get; set; } + public string Type { get; set; } /// /// Same as DataItem DataItem::units. See Value Properties of DataItem. diff --git a/src/MTConnect.NET-Common/Devices/Configurations/ISpecification.g.cs b/src/MTConnect.NET-Common/Devices/Configurations/ISpecification.g.cs index 79359594..9f2944ac 100644 --- a/src/MTConnect.NET-Common/Devices/Configurations/ISpecification.g.cs +++ b/src/MTConnect.NET-Common/Devices/Configurations/ISpecification.g.cs @@ -66,12 +66,12 @@ public interface ISpecification /// /// Same as DataItem DataItem::subType. See DataItem. /// - DataItemSubType SubType { get; } + string SubType { get; } /// /// Same as DataItem type. See DataItem Types. /// - DataItemType Type { get; } + string Type { get; } /// /// Same as DataItem DataItem::units. See DataItem. diff --git a/src/MTConnect.NET-Common/Devices/Configurations/Specification.g.cs b/src/MTConnect.NET-Common/Devices/Configurations/Specification.g.cs index fca2e1da..602f9ad2 100644 --- a/src/MTConnect.NET-Common/Devices/Configurations/Specification.g.cs +++ b/src/MTConnect.NET-Common/Devices/Configurations/Specification.g.cs @@ -71,12 +71,12 @@ public class Specification : ISpecification /// /// Same as DataItem DataItem::subType. See DataItem. /// - public DataItemSubType SubType { get; set; } + public string SubType { get; set; } /// /// Same as DataItem type. See DataItem Types. /// - public DataItemType Type { get; set; } + public string Type { get; set; } /// /// Same as DataItem DataItem::units. See DataItem. diff --git a/src/MTConnect.NET-Common/Devices/EntryDefinition.g.cs b/src/MTConnect.NET-Common/Devices/EntryDefinition.g.cs index 705cab21..8bab4125 100644 --- a/src/MTConnect.NET-Common/Devices/EntryDefinition.g.cs +++ b/src/MTConnect.NET-Common/Devices/EntryDefinition.g.cs @@ -31,17 +31,17 @@ public class EntryDefinition : IEntryDefinition /// /// Dataitem type that defines the meaning of the key. /// - public DataItemType KeyType { get; set; } + public string KeyType { get; set; } /// /// Same as DataItem DataItem::subType. See DataItem. /// - public DataItemSubType SubType { get; set; } + public string SubType { get; set; } /// /// Same as DataItem DataItem::type. See DataItem Types. /// - public DataItemType Type { get; set; } + public string Type { get; set; } /// /// Same as DataItem DataItem::units. See Value Properties of DataItem. diff --git a/src/MTConnect.NET-Common/Devices/ICellDefinition.g.cs b/src/MTConnect.NET-Common/Devices/ICellDefinition.g.cs index 71c18d7a..9aba11c4 100644 --- a/src/MTConnect.NET-Common/Devices/ICellDefinition.g.cs +++ b/src/MTConnect.NET-Common/Devices/ICellDefinition.g.cs @@ -21,17 +21,17 @@ public interface ICellDefinition /// /// Dataitem type that defines the meaning of the key. /// - DataItemType KeyType { get; } + string KeyType { get; } /// /// Same as DataItem DataItem::subType. See DataItem. /// - DataItemSubType SubType { get; } + string SubType { get; } /// /// Same as DataItem DataItem::type. See DataItem Types. /// - DataItemType Type { get; } + string Type { get; } /// /// Same as DataItem DataItem::units. See Value Properties of DataItem. diff --git a/src/MTConnect.NET-Common/Devices/IEntryDefinition.g.cs b/src/MTConnect.NET-Common/Devices/IEntryDefinition.g.cs index e0522b5f..01bfa256 100644 --- a/src/MTConnect.NET-Common/Devices/IEntryDefinition.g.cs +++ b/src/MTConnect.NET-Common/Devices/IEntryDefinition.g.cs @@ -26,17 +26,17 @@ public interface IEntryDefinition /// /// Dataitem type that defines the meaning of the key. /// - DataItemType KeyType { get; } + string KeyType { get; } /// /// Same as DataItem DataItem::subType. See DataItem. /// - DataItemSubType SubType { get; } + string SubType { get; } /// /// Same as DataItem DataItem::type. See DataItem Types. /// - DataItemType Type { get; } + string Type { get; } /// /// Same as DataItem DataItem::units. See Value Properties of DataItem. diff --git a/src/MTConnect.NET-Common/Devices/References/IReference.cs b/src/MTConnect.NET-Common/Devices/References/IReference.cs deleted file mode 100644 index e44df64d..00000000 --- a/src/MTConnect.NET-Common/Devices/References/IReference.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2023 TrakHound Inc., All Rights Reserved. -// TrakHound Inc. licenses this file to you under the MIT license. - -namespace MTConnect.Devices.References -{ - /// - /// Reference is a pointer to information that is associated with another Structural Element defined elsewhere in the XML document for a piece of equipment. - /// That information may be data from the other element or the entire structure of that element. - /// - public interface IReference - { - /// - /// A pointer to the id attribute of the element that contains the information to be associated with this XML element. - /// - string IdRef { get; } - - /// - /// The optional name of the element. Only informative. - /// - string Name { get; } - - string TypeDescription { get; } - } -} \ No newline at end of file diff --git a/src/MTConnect.NET-Common/Devices/References/Reference.cs b/src/MTConnect.NET-Common/Devices/References/Reference.cs deleted file mode 100644 index a36373bc..00000000 --- a/src/MTConnect.NET-Common/Devices/References/Reference.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2023 TrakHound Inc., All Rights Reserved. -// TrakHound Inc. licenses this file to you under the MIT license. - -namespace MTConnect.Devices.References -{ - /// - /// Reference is a pointer to information that is associated with another Structural Element defined elsewhere in the XML document for a piece of equipment. - /// That information may be data from the other element or the entire structure of that element. - /// - public class Reference : IReference - { - public const string DescriptionText = "Reference is a pointer to information that is associated with another Structural Element defined elsewhere in the XML document for a piece of equipment. That information may be data from the other element or the entire structure of that element."; - - - /// - /// A pointer to the id attribute of the element that contains the information to be associated with this XML element. - /// - public string IdRef { get; set; } - - /// - /// The optional name of the element. Only informative. - /// - public string Name { get; set; } - - public virtual string TypeDescription => DescriptionText; - } -} \ No newline at end of file diff --git a/src/MTConnect.NET-SysML/MTConnectPropertyModel.cs b/src/MTConnect.NET-SysML/MTConnectPropertyModel.cs index ddbdb892..acf6d8a5 100644 --- a/src/MTConnect.NET-SysML/MTConnectPropertyModel.cs +++ b/src/MTConnect.NET-SysML/MTConnectPropertyModel.cs @@ -75,6 +75,12 @@ internal static string ParseType(XmiDocument xmiDocument, string typeId) // ID case "_19_0_3_91b028d_1579272245466_691733_672": return "string"; + // DataItemTypeEnum + case "_19_0_3_45f01b9_1579563576485_587701_22033": return "string"; + + // DataItemSubTypeEnum + case "_19_0_3_45f01b9_1579563592155_977172_22064": return "string"; + default: string dataType = null;