diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..a37f2c7 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,64 @@ +root=true + +# All files +[*] +indent_style=space + +# Code files +# [*.cs] +indent_size=4 +insert_final_newline=true + +# Microsoft .NET properties +csharp_new_line_before_members_in_object_initializers=false +csharp_preferred_modifier_order=public, private, protected, internal, new, abstract, virtual, sealed, override, static, readonly, extern, unsafe, volatile, async:suggestion +csharp_space_after_cast=false +csharp_style_var_elsewhere=true:suggestion +csharp_style_var_for_built_in_types=true:suggestion +csharp_style_var_when_type_is_apparent=true:suggestion +dotnet_style_parentheses_in_arithmetic_binary_operators=never_if_unnecessary:none +dotnet_style_parentheses_in_other_binary_operators=never_if_unnecessary:none +dotnet_style_parentheses_in_relational_binary_operators=never_if_unnecessary:none +dotnet_style_predefined_type_for_locals_parameters_members=true:suggestion +dotnet_style_predefined_type_for_member_access=true:suggestion +dotnet_style_qualification_for_event=false:suggestion +dotnet_style_qualification_for_field=true:suggestion +dotnet_style_qualification_for_method=false:suggestion +dotnet_style_qualification_for_property=false:suggestion +dotnet_style_require_accessibility_modifiers=for_non_interface_members:suggestion + +# ReSharper properties +resharper_blank_lines_after_block_statements=0 +resharper_blank_lines_around_auto_property=0 +resharper_blank_lines_around_property=0 +resharper_csharp_blank_lines_around_field=0 +resharper_csharp_blank_lines_around_invocable=0 +resharper_csharp_blank_lines_around_type=0 +resharper_csharp_int_align_comments=true +resharper_csharp_keep_blank_lines_in_code=100 +resharper_csharp_keep_blank_lines_in_declarations=100 +resharper_csharp_max_line_length=406 +resharper_csharp_wrap_before_binary_opsign=true +resharper_place_simple_embedded_statement_on_same_line=false +resharper_remove_blank_lines_near_braces_in_code=false +resharper_remove_blank_lines_near_braces_in_declarations=false +resharper_space_after_cast=false +resharper_use_indent_from_vs=false +resharper_wrap_chained_binary_expressions=chop_if_long + +# ReSharper inspection severities +resharper_arrange_redundant_parentheses_highlighting=hint +resharper_arrange_this_qualifier_highlighting=hint +resharper_arrange_type_member_modifiers_highlighting=hint +resharper_arrange_type_modifiers_highlighting=hint +resharper_built_in_type_reference_style_for_member_access_highlighting=hint +resharper_built_in_type_reference_style_highlighting=hint +resharper_redundant_base_qualifier_highlighting=warning +resharper_suggest_var_or_type_built_in_types_highlighting=hint +resharper_suggest_var_or_type_elsewhere_highlighting=hint +resharper_suggest_var_or_type_simple_types_highlighting=hint + +[*.{appxmanifest,asax,ascx,aspx,axml,build,c,c++,cc,config,cp,cpp,cs,cshtml,csproj,css,cu,cuh,cxx,dbml,discomap,dtd,h,hh,hpp,htm,html,hxx,inc,inl,ino,ipp,js,json,jsproj,jsx,lsproj,master,mpp,njsproj,nuspec,proj,props,proto,razor,resjson,resw,resx,skin,StyleCop,targets,tasks,tpp,ts,tsx,vb,vbproj,xaml,xamlx,xml,xoml,xsd}] +indent_style=space +indent_size=4 +tab_width=4 diff --git a/EEIP.NET.sln b/EEIP.NET.sln index dd7d4fd..430324b 100644 --- a/EEIP.NET.sln +++ b/EEIP.NET.sln @@ -23,6 +23,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wago_750_352_Explicit2", "E EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wago_750_352_Explicit3", "Explicit_Messaging_Example\Wago_750_352_Explicit3.csproj", "{A63A4DE9-4AD0-4D74-8D78-0A5631BB62B4}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1E6B3CD9-B43D-4AB0-BFE7-87630EAFBA24}" + ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/EEIP.NET.sln.DotSettings b/EEIP.NET.sln.DotSettings new file mode 100644 index 0000000..0d46e70 --- /dev/null +++ b/EEIP.NET.sln.DotSettings @@ -0,0 +1,45 @@ + + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> + <Policy Inspect="True" Prefix="I" Suffix="" Style="AaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> + <Policy Inspect="True" Prefix="T" Suffix="" Style="AaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> + True + True \ No newline at end of file diff --git a/EEIP.NET/EEIP.csproj b/EEIP.NET/EEIP.csproj index ff5dba1..9637ef5 100644 --- a/EEIP.NET/EEIP.csproj +++ b/EEIP.NET/EEIP.csproj @@ -1,71 +1,22 @@ - - - + + - Debug - AnyCPU - {C7A980DD-A57F-4FC7-A555-10EDC85C749D} - Library - Properties - ConsoleApplication1 - EEIP - v4.5.2 - 512 - true + netstandard2.0;net451 + 1.6.0 + Copyright © 2018-2020 + Stefan Rossmann Engineering Solutions + EEIP.NET + Ethernet/IP compatible library for .NET implementations Supports IO Scanner and Explicit Message Client functionality For Data Exchange with Ethernet/IP Devices. + true + true + $(NoWarn);1591 + EEIP.NET + Stefan Rossmann and others + https://github.com/rossmann-engineering/EEIP.NET + ethernet-ip cip eeip + MIT + git + https://github.com/rossmann-engineering/EEIP.NET.git - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + diff --git a/EEIP.NET/Program.cs b/EEIP.NET/Program.cs deleted file mode 100644 index 32f4502..0000000 --- a/EEIP.NET/Program.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Sres.Net.EEIP.ObjectLibrary; - -namespace ConsoleApplication1 -{ - class Program - { - static void Main(string[] args) - { - Sres.Net.EEIP.EEIPClient eipClient = new Sres.Net.EEIP.EEIPClient(); - - //UInt32 sessionHandle = eipClient.RegisterSession("192.168.178.66", 0xAF12); - - UInt32 sessionHandle = eipClient.RegisterSession("192.168.178.107", 0xAF12); - // eipClient.O_T_ConnectionType = Sres.Net.EEIP.ConnectionType.Null; - // eipClient.O_T_Length = 0; - - - eipClient.O_T_InstanceID = 101; - eipClient.O_T_Length = 2;//7; - eipClient.O_T_RealTimeFormat = Sres.Net.EEIP.RealTimeFormat.Header32Bit; - eipClient.O_T_OwnerRedundant = false; - eipClient.O_T_Priority = Sres.Net.EEIP.Priority.High; - eipClient.O_T_VariableLength = false; - eipClient.O_T_ConnectionType = Sres.Net.EEIP.ConnectionType.Point_to_Point; - - eipClient.T_O_InstanceID = 104; - eipClient.T_O_Length = 3; - eipClient.T_O_RealTimeFormat = Sres.Net.EEIP.RealTimeFormat.Modeless; - eipClient.T_O_OwnerRedundant = true; - eipClient.T_O_Priority = Sres.Net.EEIP.Priority.High; - eipClient.T_O_VariableLength = false; - eipClient.T_O_ConnectionType = Sres.Net.EEIP.ConnectionType.Multicast; - eipClient.ForwardOpen(); - - for (int i = 0; i < 3; i++ ) - { - eipClient.O_T_IOData[0] = 1; - System.Threading.Thread.Sleep(1000); - eipClient.O_T_IOData[0] = 2; - System.Threading.Thread.Sleep(1000); - eipClient.O_T_IOData[0] = 3; - System.Threading.Thread.Sleep(1000); - eipClient.O_T_IOData[0] = 3; - System.Threading.Thread.Sleep(1000); - - - } - - Console.ReadKey(); - while (true) - { - Console.WriteLine("Value of First Byte 1: " + eipClient.T_O_IOData[0]); - Console.WriteLine("Value of First Byte 1: " + eipClient.T_O_IOData[1]); - Console.WriteLine("Value of First Byte 1: " + eipClient.T_O_IOData[2]); - Console.WriteLine("Value of First Byte 1: " + eipClient.T_O_IOData[3]); - Console.WriteLine("Value of First Byte 1: " + eipClient.T_O_IOData[4]); - Console.WriteLine("Value of First Byte 1: " + eipClient.T_O_IOData[5]); - System.Threading.Thread.Sleep(1000); - } - eipClient.ForwardClose(); - System.Threading.Thread.Sleep(1000); - - - - Console.ReadKey(); - } - } -} diff --git a/EEIP.NET/Properties/AssemblyInfo.cs b/EEIP.NET/Properties/AssemblyInfo.cs deleted file mode 100644 index b09091d..0000000 --- a/EEIP.NET/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("EEIP.NET")] -[assembly: AssemblyDescription("Ethernet/IP")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Stefan Rossmann Engineering Solutions")] -[assembly: AssemblyProduct("EEIP.NET")] -[assembly: AssemblyCopyright("Copyright © 2018-2020")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("c7a980dd-a57f-4fc7-a555-10edc85c749d")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.6.0.*")] -[assembly: AssemblyFileVersion("1.6.0.*")]