Moved ProtocolCore, SlotConfig and PortConfig to common\hardware\interfaces
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.IO.Ports;
|
||||
|
||||
namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig
|
||||
namespace Xylem.Common.Hardware.Interfaces.Ports.PortCore
|
||||
{
|
||||
/// <summary>
|
||||
/// Collection of port settings
|
||||
@@ -94,7 +94,10 @@
|
||||
<Compile Include="EventArguments\ListBytePortDataEventArgs.cs" />
|
||||
<Compile Include="EventArguments\StringPortDataEventArgs.cs" />
|
||||
<Compile Include="IPort.cs" />
|
||||
<Compile Include="PortConfig.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SlotConfig.cs" />
|
||||
<Compile Include="SlotType.cs" />
|
||||
<Compile Include="TransmitPortSettings.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -107,6 +110,7 @@
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\..\ServiceFwUpdate\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig
|
||||
namespace Xylem.Common.Hardware.Interfaces.Ports.PortCore
|
||||
{
|
||||
/// <summary>
|
||||
/// Container for port configuration
|
||||
@@ -0,0 +1,17 @@
|
||||
namespace Xylem.Common.Hardware.Interfaces.Ports.PortCore
|
||||
{
|
||||
/// <summary>
|
||||
/// Definition of type for slot
|
||||
/// </summary>
|
||||
public enum SlotType
|
||||
{
|
||||
/// <summary>
|
||||
/// Cordonel used as DUT with two serial ports
|
||||
/// </summary>
|
||||
DutMeter,
|
||||
/// <summary>
|
||||
/// Cordonel used as temperature meter with one serial port streaming the temperature
|
||||
/// </summary>
|
||||
TemperatureMeter,
|
||||
}
|
||||
}
|
||||
@@ -215,7 +215,10 @@
|
||||
<Compile Include="..\..\..\..\.shared\SharedAssemblyInfo.cs">
|
||||
<Link>Properties\SharedAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="EventArguments\CalibDataEventArgs.cs" />
|
||||
<Compile Include="EventArguments\FlowDataEventArgs.cs" />
|
||||
<Compile Include="EventArguments\RegisterUpdateEventArgs.cs" />
|
||||
<Compile Include="EventArguments\RequestResponseDataEventArgs.cs" />
|
||||
<Compile Include="MeasurementRecords\CalibrationRecord.cs" />
|
||||
<Compile Include="MeasurementRecords\FlowTestRecord.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
@@ -241,6 +244,10 @@
|
||||
<Project>{6CCDB656-C676-4360-BABA-C4596AAD175D}</Project>
|
||||
<Name>Measurements</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\ProtocolCore\ProtocolCore.csproj">
|
||||
<Project>{8BDD2789-96D4-43EA-AAD7-0F49D0347998}</Project>
|
||||
<Name>ProtocolCore</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Registers\Registers.csproj">
|
||||
<Project>{F4AAF7E6-7333-4284-B735-E32DEB076C64}</Project>
|
||||
<Name>Registers</Name>
|
||||
|
||||
+3
-1
@@ -1,7 +1,9 @@
|
||||
using System;
|
||||
using Xylem.Common.Hardware.Interfaces.Protocols.ProtocolCore.EventArguments;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords;
|
||||
|
||||
namespace Xylem.Common.Hardware.WaterMeter.ProtocolCore.EventArguments
|
||||
|
||||
namespace Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.EventArguments
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public class CalibDataEventArgs : BaseDataEventArgs
|
||||
+3
-1
@@ -1,7 +1,9 @@
|
||||
using System;
|
||||
using Xylem.Common.Hardware.Interfaces.Protocols.ProtocolCore.EventArguments;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords;
|
||||
|
||||
namespace Xylem.Common.Hardware.WaterMeter.ProtocolCore.EventArguments
|
||||
|
||||
namespace Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.EventArguments
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public class FlowDataEventArgs : BaseDataEventArgs
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Xylem.Common.Hardware.Interfaces.Protocols.ProtocolCore.EventArguments;
|
||||
|
||||
namespace Xylem.Common.Hardware.WaterMeter.ProtocolCore.EventArguments
|
||||
namespace Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.EventArguments
|
||||
{
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
@@ -94,10 +94,7 @@
|
||||
<Compile Include="CommunicationConfig.cs" />
|
||||
<Compile Include="Const\MeterConfig.cs" />
|
||||
<Compile Include="ProcessConfig.cs" />
|
||||
<Compile Include="PortConfig.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SlotConfig.cs" />
|
||||
<Compile Include="SlotType.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Interfaces\Ports\PortCore\PortCore.csproj">
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig
|
||||
{
|
||||
public enum SlotType
|
||||
{
|
||||
DutMeter,
|
||||
TemperatureMeter,
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,8 @@ using Xylem.Common.CommonCore.ThreadWatcher;
|
||||
using Xylem.Common.Hardware.Interfaces.Ports.PortCore;
|
||||
using Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments;
|
||||
using Xylem.Common.Hardware.Interfaces.Ports.SerialPorts;
|
||||
using Xylem.Common.Hardware.Interfaces.Protocols.ProtocolCore;
|
||||
using Xylem.Common.Hardware.Interfaces.Protocols.ProtocolCore.EventArguments;
|
||||
using Xylem.Common.Hardware.Interfaces.Protocols.TransmitProtocol;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Applications;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Applications.Const;
|
||||
@@ -32,8 +34,6 @@ using Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.EventArguments;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
||||
using Xylem.Common.Hardware.WaterMeter.ProtocolCore;
|
||||
using Xylem.Common.Hardware.WaterMeter.ProtocolCore.EventArguments;
|
||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
|
||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts;
|
||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterRegisters;
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.IO;
|
||||
using System.IO.Ports;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using Xylem.Common.Hardware.Interfaces.Ports.PortCore;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.Properties;
|
||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
|
||||
|
||||
@@ -6,12 +6,12 @@ using System.Threading;
|
||||
using Xylem.Common.Utils.Logging;
|
||||
using NLog;
|
||||
using Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments;
|
||||
using Xylem.Common.Hardware.Interfaces.Protocols.ProtocolCore;
|
||||
using Xylem.Common.Hardware.Interfaces.Protocols.ProtocolCore.EventArguments;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.EventArguments;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
||||
using Xylem.Common.Hardware.WaterMeter.ProtocolCore;
|
||||
using Xylem.Common.Hardware.WaterMeter.ProtocolCore.EventArguments;
|
||||
|
||||
namespace Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol
|
||||
{
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
using System;
|
||||
using Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments;
|
||||
using Xylem.Common.Hardware.WaterMeter.ProtocolCore;
|
||||
using Xylem.Common.Hardware.WaterMeter.ProtocolCore.EventArguments;
|
||||
using Xylem.Common.Hardware.Interfaces.Protocols.ProtocolCore;
|
||||
using Xylem.Common.Hardware.Interfaces.Protocols.ProtocolCore.EventArguments;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.EventArguments;
|
||||
|
||||
namespace Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol
|
||||
{
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using Xylem.Common.Hardware.Interfaces.Protocols.ProtocolCore.EventArguments;
|
||||
using Xylem.Common.Hardware.WaterMeter.MagFlux.DataPackages.MeasurementRecords;
|
||||
using Xylem.Common.Hardware.WaterMeter.ProtocolCore.EventArguments;
|
||||
|
||||
namespace Xylem.Common.Hardware.WaterMeter.MagFlux.DataPackages.EventArguments
|
||||
{
|
||||
|
||||
+1
-2
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Xylem.Common.Hardware.WaterMeter.ProtocolCore;
|
||||
using Xylem.Common.Hardware.WaterMeter.ProtocolCore.EventArguments;
|
||||
using Xylem.Common.Hardware.Interfaces.Protocols.ProtocolCore.EventArguments;
|
||||
|
||||
namespace Xylem.Common.Hardware.WaterMeter.MagFlux.DataPackages.EventArguments
|
||||
{
|
||||
|
||||
@@ -46,10 +46,8 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="CommunicationConfig.cs" />
|
||||
<Compile Include="Const\MeterConfig.cs" />
|
||||
<Compile Include="PortConfig.cs" />
|
||||
<Compile Include="ProcessConfig.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SlotConfig.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
using System;
|
||||
using System.IO.Ports;
|
||||
|
||||
namespace Xylem.Common.Hardware.WaterMeter.MagFlux.MagFluxConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Collection of port settings
|
||||
/// </summary>
|
||||
public struct PortConfig
|
||||
{
|
||||
private String _portName;
|
||||
/// <summary>
|
||||
/// Assigns a port name and creates the serial port object
|
||||
/// Port name e.g. "COM2"
|
||||
/// </summary>
|
||||
public String PortName
|
||||
{
|
||||
get =>
|
||||
//if the serial port object does not exists
|
||||
GetSerialPort() == null ? "NA" : _portName;
|
||||
set
|
||||
{
|
||||
if (value == null) return;
|
||||
|
||||
_portName = value;
|
||||
//create a serial port object
|
||||
if (GetSerialPort() == null)
|
||||
{
|
||||
SetSerialPort(new SerialPort(value));
|
||||
}
|
||||
else
|
||||
{
|
||||
GetSerialPort().PortName = value;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// setup of port type from name (referenced as "Type" in config file)
|
||||
/// </summary>
|
||||
public String Type { get; set; }
|
||||
|
||||
|
||||
private SerialPort _serialPort;
|
||||
|
||||
/// <summary>
|
||||
/// using dotNets <see cref="GetSerialPort()"/> for connection
|
||||
/// </summary>
|
||||
public SerialPort GetSerialPort()
|
||||
{
|
||||
return _serialPort;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// using dotNets <see cref="GetSerialPort()"/> for connection
|
||||
/// </summary>
|
||||
private void SetSerialPort(SerialPort value)
|
||||
{
|
||||
_serialPort = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Xylem.Common.Hardware.WaterMeter.MagFlux.MagFluxConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Container for port configuration
|
||||
/// </summary>
|
||||
public class SlotConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Slot number
|
||||
/// </summary>
|
||||
public Int32 Slot { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Request port settings
|
||||
/// </summary>
|
||||
public PortConfig Request { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Streaming port settings
|
||||
/// </summary>
|
||||
public PortConfig Streaming { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,8 @@
|
||||
using modbus_master_csharp.Device;
|
||||
using NLog;
|
||||
using Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments;
|
||||
using Xylem.Common.Hardware.WaterMeter.ProtocolCore;
|
||||
using Xylem.Common.Hardware.WaterMeter.ProtocolCore.EventArguments;
|
||||
using Xylem.Common.Hardware.Interfaces.Protocols.ProtocolCore;
|
||||
using Xylem.Common.Hardware.Interfaces.Protocols.ProtocolCore.EventArguments;
|
||||
using Xylem.Common.Utils.Logging;
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments;
|
||||
using Xylem.Common.Hardware.Interfaces.Protocols.ProtocolCore;
|
||||
using Xylem.Common.Hardware.Interfaces.Protocols.ProtocolCore.EventArguments;
|
||||
using Xylem.Common.Hardware.WaterMeter.MagFlux.DataPackages.EventArguments;
|
||||
using Xylem.Common.Hardware.WaterMeter.ProtocolCore;
|
||||
using Xylem.Common.Hardware.WaterMeter.ProtocolCore.EventArguments;
|
||||
|
||||
namespace Xylem.Common.Hardware.WaterMeter.MagFlux.Protocols.StreamingProtocol
|
||||
{
|
||||
|
||||
@@ -3,10 +3,10 @@ using System.Collections.Concurrent;
|
||||
using System.Threading;
|
||||
using Xylem.Common.CommonCore.ThreadWatcher;
|
||||
using Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments;
|
||||
using Xylem.Common.Hardware.Interfaces.Protocols.ProtocolCore.EventArguments;
|
||||
using Xylem.Common.Hardware.Interfaces.Protocols.TransmitProtocol;
|
||||
using Xylem.Common.Hardware.WaterMeter.ProtocolCore.EventArguments;
|
||||
|
||||
namespace Xylem.Common.Hardware.WaterMeter.ProtocolCore
|
||||
namespace Xylem.Common.Hardware.Interfaces.Protocols.ProtocolCore
|
||||
{
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Xylem.Common.Hardware.WaterMeter.ProtocolCore.EventArguments
|
||||
namespace Xylem.Common.Hardware.Interfaces.Protocols.ProtocolCore.EventArguments
|
||||
{
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments;
|
||||
using Xylem.Common.Hardware.Interfaces.Protocols.ProtocolCore.EventArguments;
|
||||
using Xylem.Common.Hardware.Interfaces.Protocols.TransmitProtocol;
|
||||
using Xylem.Common.Hardware.WaterMeter.ProtocolCore.EventArguments;
|
||||
|
||||
namespace Xylem.Common.Hardware.WaterMeter.ProtocolCore
|
||||
namespace Xylem.Common.Hardware.Interfaces.Protocols.ProtocolCore
|
||||
{
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyTitle("Xylem.Common.Hardware.WaterMeter.ProtocolCore")]
|
||||
[assembly: AssemblyTitle("Xylem.Common.Hardware.Interfaces.Protocols.ProtocolCore")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: Guid("1A402949-095C-4039-8AE3-6594A7FB2242")]
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
<ProjectGuid>{8BDD2789-96D4-43EA-AAD7-0F49D0347998}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Xylem.Common.Hardware.WaterMeter.ProtocolCore</RootNamespace>
|
||||
<AssemblyName>Xylem.Common.Hardware.WaterMeter.ProtocolCore</AssemblyName>
|
||||
<RootNamespace>Xylem.Common.Hardware.Interfaces.Protocols.ProtocolCore</RootNamespace>
|
||||
<AssemblyName>Xylem.Common.Hardware.Interfaces.Protocols.ProtocolCore</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
@@ -51,7 +51,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<LangVersion>6</LangVersion>
|
||||
<DocumentationFile>bin\x86\Debug\Xylem.Common.Hardware.WaterMeter.ProtocolCore.xml</DocumentationFile>
|
||||
<DocumentationFile>bin\x86\Debug\Xylem.Common.Hardware.Interfaces.Protocols.ProtocolCore.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
@@ -178,31 +178,27 @@
|
||||
<Reference Include="System.Core" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\..\.shared\SharedAssemblyInfo.cs">
|
||||
<Link>Properties\SharedAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="BaseProtocol.cs" />
|
||||
<Compile Include="EventArguments\BaseDataEventArgs.cs" />
|
||||
<Compile Include="EventArguments\CalibDataEventArgs.cs" />
|
||||
<Compile Include="EventArguments\FlowDataEventArgs.cs" />
|
||||
<Compile Include="EventArguments\RequestResponseDataEventArgs.cs" />
|
||||
<Compile Include="IProtocol.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\CommonCore\ThreadWatcher\ThreadWatcher.csproj">
|
||||
<Project>{94ca71f3-c5d7-4ec6-ba47-fa8eea3c9406}</Project>
|
||||
<Project>{94CA71F3-C5D7-4EC6-BA47-FA8EEA3C9406}</Project>
|
||||
<Name>ThreadWatcher</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Interfaces\Ports\PortCore\PortCore.csproj">
|
||||
<Project>{2e139f63-b6fe-4ea9-a098-85364fe9b26c}</Project>
|
||||
<Project>{2E139F63-B6FE-4EA9-A098-85364FE9B26C}</Project>
|
||||
<Name>PortCore</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Interfaces\Protocols\TransmitProtocol\TransmitProtocol.csproj">
|
||||
<Project>{63E0AC5E-B7C8-4363-A2FE-BE489E648FF0}</Project>
|
||||
<Name>TransmitProtocol</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Genesis\DataPackages\DataPackages.csproj">
|
||||
<Project>{0e524d43-7b66-45cd-aa74-41d51afc3d99}</Project>
|
||||
<Name>DataPackages</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
|
||||
Reference in New Issue
Block a user