2015-05-14 update 1

This commit is contained in:
parallelbgls@outlook.com
2015-05-14 14:09:36 +08:00
parent 1ee85d8992
commit 2e9c099384
36 changed files with 155 additions and 100 deletions

View File

@@ -1,8 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ModBus.Net namespace ModBus.Net
{ {

View File

@@ -1,8 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ModBus.Net namespace ModBus.Net
{ {

View File

@@ -1,6 +1,5 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Dynamic;
namespace ModBus.Net namespace ModBus.Net
{ {

View File

@@ -1,7 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;

View File

@@ -1,7 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace ModBus.Net namespace ModBus.Net

View File

@@ -1,10 +1,6 @@
using System; using System;
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace ModBus.Net namespace ModBus.Net
{ {

View File

@@ -1,7 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection; using System.Reflection;
using System.Threading.Tasks;
namespace ModBus.Net namespace ModBus.Net
{ {

View File

@@ -1,9 +1,5 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace ModBus.Net namespace ModBus.Net
{ {

View File

@@ -1,8 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ModBus.Net namespace ModBus.Net
{ {

View File

@@ -1,7 +1,5 @@
using System; using System;
using System.Collections.Generic;
using System.IO.Ports; using System.IO.Ports;
using System.Linq;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;

View File

@@ -1,8 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ModBus.Net namespace ModBus.Net
{ {

View File

@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{E97FCE46-855D-498B-8E58-00AFF3A1E760}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>ModBus.Net</RootNamespace>
<AssemblyName>ModBus.Net</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="AddressCombiner.cs" />
<Compile Include="AddressFormater.cs" />
<Compile Include="AddressTranslator.cs" />
<Compile Include="AsyncHelper.cs" />
<Compile Include="BaseConnector.cs" />
<Compile Include="BaseMachine.cs" />
<Compile Include="BaseProtocal.cs" />
<Compile Include="BaseUtility.cs" />
<Compile Include="ComConnector.cs" />
<Compile Include="ComProtocalLinker.cs" />
<Compile Include="ConfigurationManager.Designer.cs">
<DependentUpon>ConfigurationManager.resx</DependentUpon>
</Compile>
<Compile Include="CRC16.cs" />
<Compile Include="IProtocalFormatting.cs" />
<Compile Include="ModbusMachine.cs" />
<Compile Include="ModbusProtocal.cs" />
<Compile Include="ModbusProtocalLinkerBytesExtend.cs" />
<Compile Include="ModbusRtuProtocal.cs" />
<Compile Include="ModbusRtuProtocalLinker.cs" />
<Compile Include="ModbusTcpProtocal.cs" />
<Compile Include="ModbusTcpProtocalLinker.cs" />
<Compile Include="ModbusUtility.cs" />
<Compile Include="ProtocalLinker.cs" />
<Compile Include="ProtocalLinkerBytesExtend.cs" />
<Compile Include="ProtocalUnit.cs" />
<Compile Include="SimenseMachine.cs" />
<Compile Include="SimenseProtocal.cs" />
<Compile Include="SimenseProtocalLinkerBytesExtend.cs" />
<Compile Include="SimenseStructDefinition.cs" />
<Compile Include="SimenseTcpProtocal.cs" />
<Compile Include="SimenseTcpProtocalLinker.cs" />
<Compile Include="SimenseUtility.cs" />
<Compile Include="TaskManager.cs" />
<Compile Include="TcpConnector.cs" />
<Compile Include="TcpProtocalLinker.cs" />
<Compile Include="ValueHelper.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<None Include="ConfigurationManager.resx" />
</ItemGroup>
<ItemGroup>
<Folder Include="c:\Users\luosheng\Documents\Projects\Modbus.Net-xamarin\ModBus.Net\" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
</Project>

View File

@@ -1,8 +1,5 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ModBus.Net namespace ModBus.Net
{ {

View File

@@ -1,6 +1,5 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Runtime.Remoting.Messaging;
internal enum ModbusProtocalVariableFunctionCode : byte internal enum ModbusProtocalVariableFunctionCode : byte
{ {

View File

@@ -1,8 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ModBus.Net namespace ModBus.Net
{ {

View File

@@ -1,8 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ModBus.Net namespace ModBus.Net
{ {

View File

@@ -1,9 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ModBus.Net namespace ModBus.Net
{ {
class ModbusRtuProtocalLinker : ComProtocalLinker class ModbusRtuProtocalLinker : ComProtocalLinker

View File

@@ -0,0 +1,19 @@
using System;
namespace ModBus.Net
{
/// <summary>
/// Modbus/Tcp协议
/// </summary>
public class ModbusTcpProtocal : ModbusProtocal
{
public ModbusTcpProtocal() : this(ConfigurationManager.IP)
{
}
public ModbusTcpProtocal(string ip)
{
ProtocalLinker = new ModbusTcpProtocalLinker(ip);
}
}
}

View File

@@ -1,8 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ModBus.Net namespace ModBus.Net
{ {

View File

@@ -1,8 +1,4 @@
using System; using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Windows.Forms;
/// <summary> /// <summary>
/// Modbus连接类型 /// Modbus连接类型

View File

@@ -1,5 +1,4 @@
using System.Reflection; using System.Reflection;
using System.Threading.Tasks;
namespace ModBus.Net namespace ModBus.Net
{ {

View File

@@ -1,8 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ModBus.Net namespace ModBus.Net
{ {

View File

@@ -1,7 +1,4 @@
using System; using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace ModBus.Net namespace ModBus.Net
{ {

View File

@@ -1,8 +1,5 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ModBus.Net namespace ModBus.Net
{ {

View File

@@ -1,9 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics.Eventing;
using System.Linq; using System.Linq;
using System.Reflection.Emit;
using System.Windows.Forms;
public enum SimenseTypeCode : byte public enum SimenseTypeCode : byte
{ {

View File

@@ -1,8 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ModBus.Net namespace ModBus.Net
{ {

View File

@@ -1,8 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ModBus.Net namespace ModBus.Net
{ {

View File

@@ -1,8 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ModBus.Net namespace ModBus.Net
{ {

View File

@@ -1,8 +1,5 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ModBus.Net namespace ModBus.Net
{ {
public class SimenseTcpProtocalLinker : TcpProtocalLinker public class SimenseTcpProtocalLinker : TcpProtocalLinker

View File

@@ -1,8 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
public enum SimenseType public enum SimenseType
{ {

View File

@@ -1,12 +1,10 @@
using System; using System;
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Timer = System.Timers.Timer; using Timer = System.Timers.Timer;
using ModBus.Net;
namespace ModBus.Net namespace ModBus.Net
{ {

View File

@@ -1,8 +1,5 @@
using System; using System;
using System.IO;
using System.Net;
using System.Net.Sockets; using System.Net.Sockets;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace ModBus.Net namespace ModBus.Net

View File

@@ -1,7 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
namespace ModBus.Net namespace ModBus.Net
{ {

View File

@@ -0,0 +1,17 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModBus.Net-xamarin", "ModBus.Net\ModBus.Net-xamarin.csproj", "{E97FCE46-855D-498B-8E58-00AFF3A1E760}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E97FCE46-855D-498B-8E58-00AFF3A1E760}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E97FCE46-855D-498B-8E58-00AFF3A1E760}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E97FCE46-855D-498B-8E58-00AFF3A1E760}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E97FCE46-855D-498B-8E58-00AFF3A1E760}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,19 @@
<Properties StartupItem="ModBus.Net\ModBus.Net-xamarin.csproj">
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
<MonoDevelop.Ide.Workbench ActiveDocument="ModBus.Net\ConfigurationManager.Designer.cs">
<Files>
<File FileName="ModBus.Net\ValueHelper.cs" Line="1" Column="1" />
<File FileName="ModBus.Net\TcpProtocalLinker.cs" Line="1" Column="1" />
<File FileName="ModBus.Net\ModbusTcpProtocal.cs" Line="1" Column="1" />
<File FileName="ModBus.Net\ConfigurationManager.Designer.cs" Line="1" Column="1" />
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore />
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
<DisabledProjects>
<String>Modbus.Net-xamarin\Modbus.Net.csproj</String>
<String>ModBus.Net\ModBus.Net.csproj</String>
</DisabledProjects>
</Properties>

View File

@@ -0,0 +1,18 @@
using System;
namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions
{
/// <summary>
/// Use this attribute to change the name of the <see cref="ModelDescription"/> generated for a type.
/// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum, AllowMultiple = false, Inherited = false)]
public sealed class ModelNameAttribute : Attribute
{
public ModelNameAttribute(string name)
{
Name = name;
}
public string Name { get; private set; }
}
}