Skip to content

Commit

Permalink
Merge branch 'MTConnect-v2.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickRitchie committed Oct 21, 2024
2 parents da0dc74 + c856e3c commit cb12bbd
Show file tree
Hide file tree
Showing 26 changed files with 488 additions and 32 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[![MTConnect.NET](https://github.com/TrakHound/MTConnect.NET/actions/workflows/dotnet.yml/badge.svg)](https://github.com/TrakHound/MTConnect.NET/actions/workflows/dotnet.yml)

> **New Release 5/13/2024** : Version 6.4 Released with new Agent, Adapter, & SysML Import
> **New Release 10/21/2024** : Version 6.5 Released with support for MTConnect v2.4
## Download
<table>
Expand Down Expand Up @@ -39,7 +39,7 @@
</table>

## Overview
MTConnect.NET is a fully featured and fully Open Source **[.NET](https://dotnet.microsoft.com/)** library for **[MTConnect](https://www.mtconnect.org/)** to develop Agents, Adapters, and Clients. Supports MTConnect Versions up to 2.3. A pre-compiled Agent application is available to download as well as an Adapter application that can be easily customized.
MTConnect.NET is a fully featured and fully Open Source **[.NET](https://dotnet.microsoft.com/)** library for **[MTConnect](https://www.mtconnect.org/)** to develop Agents, Adapters, and Clients. Supports MTConnect Versions up to 2.4. A pre-compiled Agent application is available to download as well as an Adapter application that can be easily customized.

- .NET Native MTConnect Agent
- Adapter framework used to send data to an MTConnect Agent
Expand All @@ -49,7 +49,7 @@ MTConnect.NET is a fully featured and fully Open Source **[.NET](https://dotnet.
- Module based Agent & Adapter architecture
- Supports running as Windows Service with easy to use command line arguments
- Presistent Agent Buffers that are backed up on the File System. Retains state after Agent is restarted
- Fully compatible up to the latest MTConnect v2.3
- Fully compatible up to the latest MTConnect v2.4
- Kept up to date by utilizing the MTConnect SysML Model to generate source files
- Supports multiple MTConnect Version output. Automatically removes data that is not compatible with the requested version
- Full client support for requesting data from any MTConnect Agent (Probe, Current, Sample Stream, Assets, etc.).
Expand Down
2 changes: 1 addition & 1 deletion agent/MTConnect.NET-Agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</table>

## Overview
This project is a full implementation of an MTConnect Agent used to read data from industrial machine tools and devices. This MTConnect Agent application is fully compatible with the latest **Version 2.3 of the MTConnect Standard**.
This project is a full implementation of an MTConnect Agent used to read data from industrial machine tools and devices. This MTConnect Agent application is fully compatible with the latest **Version 2.4 of the MTConnect Standard**.

#### Features
- Plugin architecture to support Http Server, Mqtt Server, SHDR Adapters, etc.
Expand Down
4 changes: 2 additions & 2 deletions build/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Reflection;

[assembly: AssemblyVersion("6.4.7")]
[assembly: AssemblyFileVersion("6.4.7")]
[assembly: AssemblyVersion("6.5.0")]
[assembly: AssemblyFileVersion("6.5.0")]
[assembly: AssemblyCompany("TrakHound Inc.")]
[assembly: AssemblyCopyright("Copyright (c) 2024 TrakHound Inc., All Rights Reserved.")]
2 changes: 1 addition & 1 deletion build/MTConnect.NET-SysML-Import/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Text.Json;

//var xmlPath = @"D:\TrakHound\MTConnect\MTConnectSysMLModel.xml";
var xmlPath = @"D:\TrakHound\MTConnect\Standard\v2.3\MTConnectSysMLModel.xml";
var xmlPath = @"D:\TrakHound\MTConnect\Standard\v2.4\MTConnectSysMLModel.xml";

var mtconnectModel = MTConnectModel.Parse(xmlPath);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace MTConnect.Assets.ComponentConfigurationParameters
{
/// <summary>
/// Property defining a configuration of a Component.
/// Property that determines the characteristic or behavior of an entity.
/// </summary>
public interface IParameter
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public interface IParameterSet
string Name { get; }

/// <summary>
/// Property defining a configuration of a Component.
/// Property that determines the characteristic or behavior of an entity.
/// </summary>
System.Collections.Generic.IEnumerable<MTConnect.Assets.ComponentConfigurationParameters.IParameter> Parameters { get; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
namespace MTConnect.Assets.ComponentConfigurationParameters
{
/// <summary>
/// Property defining a configuration of a Component.
/// Property that determines the characteristic or behavior of an entity.
/// </summary>
public class Parameter : IParameter
{
public const string DescriptionText = "Property defining a configuration of a Component.";
public const string DescriptionText = "Property that determines the characteristic or behavior of an entity.";


/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class ParameterSet : IParameterSet
public string Name { get; set; }

/// <summary>
/// Property defining a configuration of a Component.
/// Property that determines the characteristic or behavior of an entity.
/// </summary>
public System.Collections.Generic.IEnumerable<MTConnect.Assets.ComponentConfigurationParameters.IParameter> Parameters { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public static class ParameterSetDescriptions
public const string Name = "Name of the parameter set if more than one exists.";

/// <summary>
/// Property defining a configuration of a Component.
/// Property that determines the characteristic or behavior of an entity.
/// </summary>
public const string Parameters = "Property defining a configuration of a Component.";
public const string Parameters = "Property that determines the characteristic or behavior of an entity.";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
namespace MTConnect.Devices.Components
{
/// <summary>
/// Leaf Component composed of a receptacle or container that holds material.
/// Leaf Component generally composed of an enclosed container.
/// </summary>
public class TankComponent : Component
{
public const string TypeId = "Tank";
public const string NameId = "tank";
public new const string DescriptionText = "Leaf Component composed of a receptacle or container that holds material.";
public new const string DescriptionText = "Leaf Component generally composed of an enclosed container.";

public override string TypeDescription => DescriptionText;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
namespace MTConnect.Devices.Components
{
/// <summary>
/// Leaf Component composed of a container that holds liquid or powdered materials.
/// Leaf Component generally composed of an open container.
/// </summary>
public class VatComponent : Component
{
public const string TypeId = "Vat";
public const string NameId = "vat";
public new const string DescriptionText = "Leaf Component composed of a container that holds liquid or powdered materials.";
public new const string DescriptionText = "Leaf Component generally composed of an open container.";

public override string TypeDescription => DescriptionText;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Copyright (c) 2024 TrakHound Inc., All Rights Reserved.
// TrakHound Inc. licenses this file to you under the MIT license.

// MTConnect SysML v2.3 : UML ID = _19_0_3_68e0225_1712320901547_688092_333

namespace MTConnect.Devices.DataItems
{
/// <summary>
/// Textual description of the location of an object or activity.
/// </summary>
public class LocationNarrativeDataItem : DataItem
{
public const DataItemCategory CategoryId = DataItemCategory.EVENT;
public const string TypeId = "LOCATION_NARRATIVE";
public const string NameId = "locationNarrative";


public new const string DescriptionText = "Textual description of the location of an object or activity.";

public override string TypeDescription => DescriptionText;




public LocationNarrativeDataItem()
{
Category = CategoryId;
Type = TypeId;
Name = NameId;


}

public LocationNarrativeDataItem(string deviceId)
{
Id = CreateId(deviceId, NameId);
Category = CategoryId;
Type = TypeId;
Name = NameId;


}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Copyright (c) 2024 TrakHound Inc., All Rights Reserved.
// TrakHound Inc. licenses this file to you under the MIT license.

// MTConnect SysML v2.3 : UML ID = _19_0_3_68e0225_1712322699365_211671_599

namespace MTConnect.Devices.DataItems
{
/// <summary>
/// Absolute geographic location defined by two coordinates, longitude and latitude and an elevation.
/// </summary>
public class LocationSpatialGeographicDataItem : DataItem
{
public const DataItemCategory CategoryId = DataItemCategory.EVENT;
public const string TypeId = "LOCATION_SPATIAL_GEOGRAPHIC";
public const string NameId = "locationSpatialGeographic";
public const DataItemRepresentation DefaultRepresentation = DataItemRepresentation.TABLE;

public new const string DescriptionText = "Absolute geographic location defined by two coordinates, longitude and latitude and an elevation.";

public override string TypeDescription => DescriptionText;

public override System.Version MinimumVersion => MTConnectVersions.Version23;


public LocationSpatialGeographicDataItem()
{
Category = CategoryId;
Type = TypeId;
Name = NameId;
Representation = DefaultRepresentation;

}

public LocationSpatialGeographicDataItem(string deviceId)
{
Id = CreateId(deviceId, NameId);
Category = CategoryId;
Type = TypeId;
Name = NameId;
Representation = DefaultRepresentation;

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
// Copyright (c) 2024 TrakHound Inc., All Rights Reserved.
// TrakHound Inc. licenses this file to you under the MIT license.

// MTConnect SysML v2.3 : UML ID = _19_0_3_68e0225_1712321222573_635969_358

namespace MTConnect.Devices.DataItems
{
/// <summary>
/// Dimension between two surfaces of an object, usually the dimension of smallest measure, for example an additive layer, or a depth of cut.
/// </summary>
public class ThicknessDataItem : DataItem
{
public const DataItemCategory CategoryId = DataItemCategory.EVENT;
public const string TypeId = "THICKNESS";
public const string NameId = "thickness";
public const DataItemRepresentation DefaultRepresentation = DataItemRepresentation.VALUE;

public new const string DescriptionText = "Dimension between two surfaces of an object, usually the dimension of smallest measure, for example an additive layer, or a depth of cut.";

public override string TypeDescription => DescriptionText;




public enum SubTypes
{
/// <summary>
/// ACTUAL.
/// </summary>
ACTUAL,

/// <summary>
/// COMMANDED.
/// </summary>
COMMANDED,

/// <summary>
/// TARGET.
/// </summary>
TARGET,

/// <summary>
/// PROGRAMMED.
/// </summary>
PROGRAMMED
}


public ThicknessDataItem()
{
Category = CategoryId;
Type = TypeId;
Name = NameId;
Representation = DefaultRepresentation;

}

public ThicknessDataItem(
string parentId,
SubTypes subType
)
{
Id = CreateId(parentId, NameId, GetSubTypeId(subType));
Category = CategoryId;
Type = TypeId;
SubType = subType.ToString();
Name = NameId;
Representation = DefaultRepresentation;

}

public override string SubTypeDescription => GetSubTypeDescription(SubType);

public static string GetSubTypeDescription(string subType)
{
var s = subType.ConvertEnum<SubTypes>();
switch (s)
{
case SubTypes.ACTUAL: return "ACTUAL.";
case SubTypes.COMMANDED: return "COMMANDED.";
case SubTypes.TARGET: return "TARGET.";
case SubTypes.PROGRAMMED: return "PROGRAMMED.";
}

return null;
}

public static string GetSubTypeId(SubTypes subType)
{
switch (subType)
{
case SubTypes.ACTUAL: return "ACTUAL";
case SubTypes.COMMANDED: return "COMMANDED";
case SubTypes.TARGET: return "TARGET";
case SubTypes.PROGRAMMED: return "PROGRAMMED";
}

return null;
}

}
}
19 changes: 17 additions & 2 deletions libraries/MTConnect.NET-Common/Devices/NativeUnits.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ public static class NativeUnits
/// </summary>
public const string CENTIPOISE = "CENTIPOISE";

/// <summary>
/// Geometric volume in feet.
/// </summary>
public const string CUBIC_FOOT = "CUBIC_FOOT";

/// <summary>
/// Change of geometric volume in cubic foot per hour.
/// </summary>
Expand Down Expand Up @@ -105,6 +110,11 @@ public static class NativeUnits
/// </summary>
public const string INCH_PER_MINUTE = "INCH/MINUTE";

/// <summary>
/// Inch per revolution.
/// </summary>
public const string INCH_PER_REVOLUTION = "INCH/REVOLUTION";

/// <summary>
/// Inches per second.
/// </summary>
Expand Down Expand Up @@ -181,15 +191,20 @@ public static class NativeUnits
public const string RADIAN_PER_MINUTE = "RADIAN/MINUTE";

/// <summary>
/// Rotational acceleration in radian per second squared.
/// Velocity in radians per second.
/// </summary>
public const string RADIAN_PER_SECOND = "RADIAN/SECOND";

/// <summary>
/// Rotational acceleration in radian per second squared.
/// Acceleration in radians per second squared.
/// </summary>
public const string RADIAN_PER_SECOND_SQUARED = "RADIAN/SECOND^2";

/// <summary>
/// Geometric area in inches.
/// </summary>
public const string SQUARE_INCH = "SQUARE_INCH";

/// <summary>
/// Pressure in Torr.
/// </summary>
Expand Down
Loading

0 comments on commit cb12bbd

Please sign in to comment.