forked from mtconnect/dot_net_sdk
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tbm0115/memory fix namespace refactor (#26)
* Added null check * Added implicit null operators and fixed null reference exception * Added null check * Support for component collections in device configuration * Fixed naming issues * Refactored Adapter code into Interface class/project * Update AdapterSdk.csproj * UPnP abstraction * Abstracted methods and Assets * Extensions abstraction * Fix generic AgentCommand * Fixed subcomponent naming * Improved implicit operators * EnableDynamicLoading * Refactor * Removed migrated code * Migrated enums and generated code to Core * Release versions
- Loading branch information
Showing
571 changed files
with
31,944 additions
and
29,077 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>netcoreapp3.1;netstandard2.0;net461;</TargetFrameworks> | ||
<BaseOutputPath>bin\</BaseOutputPath> | ||
<GenerateDocumentationFile>True</GenerateDocumentationFile> | ||
<NeutralLanguage>en-US</NeutralLanguage> | ||
<RootNamespace>Mtconnect.AdapterSdk</RootNamespace> | ||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild> | ||
<PackageId>Mtconnect.AdapterSdk.Core</PackageId> | ||
<Title>MTConnect Adapter SDK Core</Title> | ||
<Authors>tbm0115</Authors> | ||
<Company>True Analytics Manufacturing Solutions</Company> | ||
<Product>MTConnect</Product> | ||
<Description>An interface library for connecting other libraries into the Mtconnect.AdapterSdk.</Description> | ||
<Copyright>True Analytics Manufacturing Solutions, LLC 2023</Copyright> | ||
<PackageIcon>icon.jpg</PackageIcon> | ||
<RepositoryType>git</RepositoryType> | ||
<PackageTags>MTConnect;Adapter;Interface</PackageTags> | ||
<PackageReleaseNotes>Added support for device model configuration with a MTConnect Agent.</PackageReleaseNotes> | ||
<ApplicationIcon>icon.ico</ApplicationIcon> | ||
<PackageProjectUrl>https://github.com/TrueAnalyticsSolutions/Mtconnect.Adapter</PackageProjectUrl> | ||
<RepositoryUrl>$(ProjectUrl)</RepositoryUrl> | ||
<Version>1.0.1.0</Version> | ||
<IncludeSymbols>True</IncludeSymbols> | ||
<SymbolPackageFormat>snupkg</SymbolPackageFormat> | ||
<DebugSymbols>true</DebugSymbols> | ||
<EmbedAllSources>true</EmbedAllSources> | ||
<DebugType>portable</DebugType> | ||
<DocumentationFile>$(AssemblyName).xml</DocumentationFile> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<None Remove="icon.jpg" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="..\Constants.cs" Link="Constants.cs" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Content Include="icon.ico" /> | ||
<Content Include="icon.jpg"> | ||
<PackagePath>\</PackagePath> | ||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
<Pack>True</Pack> | ||
</Content> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Folder Include="Contracts\Enums\Values\" /> | ||
<Folder Include="Contracts\Enums\Types\" /> | ||
<Folder Include="Contracts\Components\" /> | ||
<Folder Include="Contracts\Values\" /> | ||
</ItemGroup> | ||
|
||
</Project> |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System.Xml; | ||
|
||
namespace Mtconnect.AdapterSdk.Assets | ||
{ | ||
/// <summary> | ||
/// Abstract Asset class. | ||
/// </summary> | ||
public interface IAsset | ||
{ | ||
/// <summary> | ||
/// Unique identifier of an MTConnect Asset. | ||
/// </summary> | ||
string AssetId { set; get; } | ||
|
||
/// <summary> | ||
/// Writes XML to the provided <paramref name="writer"/>. | ||
/// </summary> | ||
/// <param name="writer">Method uses this to write XML.</param> | ||
/// <returns>Pass-thru reference to <paramref name="writer"/>.</returns> | ||
XmlWriter ToXml(XmlWriter writer); | ||
|
||
/// <summary> | ||
/// Generic method for getting the type of Asset. | ||
/// </summary> | ||
/// <returns>Reference to the type of MTConnect Asset type.</returns> | ||
string GetMTCType(); | ||
} | ||
} |
4 changes: 1 addition & 3 deletions
4
...ontracts/Attributes/ConditionAttribute.cs → ...ontracts/Attributes/ConditionAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...Contracts/Attributes/DataItemAttribute.cs → ...Contracts/Attributes/DataItemAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ts/Attributes/DataItemPartialAttribute.cs → ...ts/Attributes/DataItemPartialAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 1 addition & 4 deletions
5
.../Contracts/Attributes/MessageAttribute.cs → .../Contracts/Attributes/MessageAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tributes/ObservationalSubTypeAttribute.cs → ...tributes/ObservationalSubTypeAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../Attributes/ObservationalTypeAttribute.cs → .../Attributes/ObservationalTypeAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
AdapterSdk.Core/Contracts/Attributes/ObservationalValueAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
|
||
namespace Mtconnect.AdapterSdk.Attributes | ||
{ | ||
/// <summary> | ||
/// Attribute indicating the <see cref="Enum"/> listing the possible Values for the attached Field | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Method | AttributeTargets.Property, AllowMultiple = false, Inherited = false)] | ||
public class ObservationalValueAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// Reference to the remote <see cref="Enum"/> | ||
/// </summary> | ||
public Type ValueEnum { get; set; } | ||
|
||
/// <summary> | ||
/// Constructs a new instance of this attribute. | ||
/// </summary> | ||
/// <param name="valueEnum"><inheritdoc cref="ValueEnum" path="/summary"/></param> | ||
public ObservationalValueAttribute(Type valueEnum) | ||
{ | ||
ValueEnum = valueEnum; | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...k/Contracts/Attributes/SampleAttribute.cs → ...e/Contracts/Attributes/SampleAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ntracts/Attributes/TimeSeriesAttribute.cs → ...ntracts/Attributes/TimeSeriesAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ontracts/Attributes/TimestampAttribute.cs → ...ontracts/Attributes/TimestampAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.