diff --git a/AllenBradleyPointIO/Program.cs b/AllenBradleyPointIO/Program.cs
index 1e5609f..500e0b9 100644
--- a/AllenBradleyPointIO/Program.cs
+++ b/AllenBradleyPointIO/Program.cs
@@ -12,7 +12,7 @@
// Allen-Bradley 1734-OB4E 4-Channel Digital Output Module
// Allen-Bradley 1734-OB4E 4-Channel Digital Output Module
// IP-Address: 192.168.178.107 (By DHCP-Server)
-// This example also handles a reconnection procedure if the Impicit Messaging has Timed out
+// This example also handles a reconnection procedure if the Impicit Messaging has Timed out
// (If the Property "LastReceivedImplicitMessage" is more than one second ago)
namespace AllenBradleyPointIO
{
@@ -51,7 +51,7 @@ static void Main(string[] args)
while(true)
{
-
+
//Read the Inputs Transfered form Target -> Originator
Console.WriteLine("State of first Input byte: " + eeipClient.T_O_IOData[8]);
Console.WriteLine("State of second Input byte: " + eeipClient.T_O_IOData[9]);
@@ -71,7 +71,7 @@ static void Main(string[] args)
{
eeipClient.ForwardClose();
eeipClient.UnRegisterSession();
-
+
eeipClient.RegisterSession();
eeipClient.ForwardOpen();
}
diff --git a/AllenBradleyPointIO/Properties/AssemblyInfo.cs b/AllenBradleyPointIO/Properties/AssemblyInfo.cs
index e04da7e..d44f4b1 100644
--- a/AllenBradleyPointIO/Properties/AssemblyInfo.cs
+++ b/AllenBradleyPointIO/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// 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("AllenBradleyPointIO")]
@@ -14,8 +14,8 @@
[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
+// 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)]
@@ -25,11 +25,11 @@
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Build and Revision Numbers
+// 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.0.0.0")]
diff --git a/ConsoleApplication1/Program.cs b/ConsoleApplication1/Program.cs
index 8ccbb98..322de1c 100644
--- a/ConsoleApplication1/Program.cs
+++ b/ConsoleApplication1/Program.cs
@@ -39,8 +39,8 @@ static void Main(string[] args)
Console.WriteLine("Current light Intensity Sensor 2 in %: " + (response[1] * 255 + response[0]).ToString());
eeipClient.UnRegisterSession();
Console.ReadKey();
-
-
+
+
}
}
}
diff --git a/ConsoleApplication1/Properties/AssemblyInfo.cs b/ConsoleApplication1/Properties/AssemblyInfo.cs
index 0837866..2ab65ff 100644
--- a/ConsoleApplication1/Properties/AssemblyInfo.cs
+++ b/ConsoleApplication1/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// 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("ConsoleApplication1")]
@@ -14,8 +14,8 @@
[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
+// 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)]
@@ -25,11 +25,11 @@
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Build and Revision Numbers
+// 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.0.0.0")]
diff --git a/DiscoverDevices/Properties/AssemblyInfo.cs b/DiscoverDevices/Properties/AssemblyInfo.cs
index 66c8734..1e3d191 100644
--- a/DiscoverDevices/Properties/AssemblyInfo.cs
+++ b/DiscoverDevices/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// 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("DiscoverDevices")]
@@ -14,8 +14,8 @@
[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
+// 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)]
@@ -25,11 +25,11 @@
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Build and Revision Numbers
+// 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.0.0.0")]
diff --git a/EEIP.NET/EIPClient.cs b/EEIP.NET/EIPClient.cs
index aa0acb9..d185ed9 100644
--- a/EEIP.NET/EIPClient.cs
+++ b/EEIP.NET/EIPClient.cs
@@ -44,11 +44,11 @@ public class EEIPClient
///
public UInt32 RequestedPacketRate_T_O { get; set; } = 0x7A120; //500ms
///
- /// "1" Indicates that multiple connections are allowed Originator -> Target for Implicit-Messaging (Default: TRUE)
+ /// "1" Indicates that multiple connections are allowed Originator -> Target for Implicit-Messaging (Default: TRUE)
///
public bool O_T_OwnerRedundant { get; set; } = true; //For Forward Open
///
- /// "1" Indicates that multiple connections are allowed Target -> Originator for Implicit-Messaging (Default: TRUE)
+ /// "1" Indicates that multiple connections are allowed Target -> Originator for Implicit-Messaging (Default: TRUE)
///
public bool T_O_OwnerRedundant { get; set; } = true; //For Forward Open
///
@@ -98,16 +98,16 @@ public class EEIPClient
///
public byte T_O_InstanceID { get; set; } = 0x65; //Eingänge
///
- /// Provides Access to the Class 1 Real-Time IO-Data Originator -> Target for Implicit Messaging
+ /// Provides Access to the Class 1 Real-Time IO-Data Originator -> Target for Implicit Messaging
///
- private byte[] _O_T_IOData = new byte[505]; //Class 1 Real-Time IO-Data O->T
+ private byte[] _O_T_IOData = new byte[505]; //Class 1 Real-Time IO-Data O->T
private object _O_T_IOData_lock = new object();
///
/// Provides Access to the Class 1 Real-Time IO-Data Target -> Originator for Implicit Messaging
///
- private byte[] _T_O_IOData = new byte[505]; //Class 1 Real-Time IO-Data T->O
+ private byte[] _T_O_IOData = new byte[505]; //Class 1 Real-Time IO-Data T->O
private object _T_O_IOData_lock = new object();
@@ -133,9 +133,9 @@ public class EEIPClient
///
/// Returns the Date and Time when the last Implicit Message has been received fŕom The Target Device
/// Could be used to determine a Timeout
- ///
+ ///
public DateTime LastReceivedImplicitMessage { get; set; }
-
+
public EEIPClient()
{
Console.WriteLine("EEIP Library Version: " + Assembly.GetExecutingAssembly().GetName().Version.ToString());
@@ -148,11 +148,10 @@ private void ReceiveCallback(IAsyncResult ar)
lock (this)
{
UdpClient u = (UdpClient)((UdpState)(ar.AsyncState)).u;
-
+
System.Net.IPEndPoint e = (System.Net.IPEndPoint)((UdpState)(ar.AsyncState)).e;
Byte[] receiveBytes = u.EndReceive(ar, ref e);
- string receiveString = Encoding.ASCII.GetString(receiveBytes);
// EndReceive worked and we have received data and remote endpoint
if (receiveBytes.Length > 0)
@@ -164,7 +163,7 @@ private void ReceiveCallback(IAsyncResult ar)
returnList.Add(Encapsulation.CIPIdentityItem.getCIPIdentityItem(24, receiveBytes));
}
}
- var asyncResult = u.BeginReceive(new AsyncCallback(ReceiveCallback), (UdpState)(ar.AsyncState));
+ u.BeginReceive(new AsyncCallback(ReceiveCallback), (UdpState)(ar.AsyncState));
}
}
@@ -180,10 +179,10 @@ public class UdpState
///
/// List and identify potential targets. This command shall be sent as braodcast massage using UDP.
///
- /// List contains the received informations from all devices
+ /// List contains the received informations from all devices
public List ListIdentity()
{
-
+
foreach (NetworkInterface ni in NetworkInterface.GetAllNetworkInterfaces())
{
if (ni.NetworkInterfaceType == NetworkInterfaceType.Wireless80211 || ni.NetworkInterfaceType == NetworkInterfaceType.Ethernet)
@@ -208,7 +207,7 @@ public class UdpState
s.e = endPoint;
s.u = udpClient;
- var asyncResult = udpClient.BeginReceive(new AsyncCallback(ReceiveCallback), s);
+ udpClient.BeginReceive(new AsyncCallback(ReceiveCallback), s);
System.Threading.Thread.Sleep(1000);
}
@@ -221,9 +220,9 @@ public class UdpState
///
/// Sends a RegisterSession command to a target to initiate session
///
- /// IP-Address of the target device
- /// Port of the target device (default should be 0xAF12)
- /// Session Handle
+ /// IP-Address of the target device
+ /// Port of the target device (default should be 0xAF12)
+ /// Session Handle
public UInt32 RegisterSession(UInt32 address, UInt16 port)
{
if (sessionHandle != 0)
@@ -245,7 +244,7 @@ public UInt32 RegisterSession(UInt32 address, UInt16 port)
stream.Write(encapsulation.toBytes(), 0, encapsulation.toBytes().Length);
byte[] data = new Byte[256];
- Int32 bytes = stream.Read(data, 0, data.Length);
+ stream.Read(data, 0, data.Length);
UInt32 returnvalue = (UInt32)data[4] + (((UInt32)data[5]) << 8) + (((UInt32)data[6]) << 16) + (((UInt32)data[7]) << 24);
this.sessionHandle = returnvalue;
@@ -254,14 +253,14 @@ public UInt32 RegisterSession(UInt32 address, UInt16 port)
///
/// Sends a UnRegisterSession command to a target to terminate session
- ///
+ ///
public void UnRegisterSession()
{
Encapsulation encapsulation = new Encapsulation();
encapsulation.Command = Encapsulation.CommandsEnum.UnRegisterSession;
encapsulation.Length = 0;
encapsulation.SessionHandle = sessionHandle;
-
+
try
{
stream.Write(encapsulation.toBytes(), 0, encapsulation.toBytes().Length);
@@ -270,7 +269,7 @@ public void UnRegisterSession()
{
//Handle Exception to allow to Close the Stream if the connection was closed by Remote Device
}
- byte[] data = new Byte[256];
+
client.Close();
stream.Close();
sessionHandle = 0;
@@ -304,7 +303,7 @@ public void ForwardOpen(bool largeForwardOpen)
encapsulation.SessionHandle = sessionHandle;
encapsulation.Command = Encapsulation.CommandsEnum.SendRRData;
//!!!!!!-----Length Field at the end!!!!!!!!!!!!!
-
+
//---------------Interface Handle CIP
encapsulation.CommandSpecificData.Add(0);
encapsulation.CommandSpecificData.Add(0);
@@ -324,7 +323,7 @@ public void ForwardOpen(bool largeForwardOpen)
commonPacketFormat.AddressItem = 0x0000; //NULL (used for UCMM Messages)
commonPacketFormat.AddressLength = 0x0000;
-
+
commonPacketFormat.DataItem = 0xB2;
commonPacketFormat.DataLength = (ushort)(41 + (ushort)lengthOffset);
if (largeForwardOpen)
@@ -461,7 +460,7 @@ public void ForwardOpen(bool largeForwardOpen)
//-XXX---- = Production Trigger, 0 = Cyclic, 1 = CoS, 2 = Application Object
//----XXXX = Transport class, 0 = Class 0, 1 = Class 1, 2 = Class 2, 3 = Class 3
//----------------Transport Type Trigger
- //Connection Path size
+ //Connection Path size
commonPacketFormat.Data.Add((byte)((0x2) + (O_T_ConnectionType == ConnectionType.Null ? 0 : 1) + (T_O_ConnectionType == ConnectionType.Null ? 0 : 1) ));
//Verbindugspfad
commonPacketFormat.Data.Add((byte)(0x20));
@@ -478,9 +477,9 @@ public void ForwardOpen(bool largeForwardOpen)
commonPacketFormat.Data.Add((byte)(0x2C));
commonPacketFormat.Data.Add((byte)(T_O_InstanceID));
}
-
+
//AddSocket Addrress Item O->T
-
+
commonPacketFormat.SocketaddrInfo_O_T = new Encapsulation.SocketAddress();
commonPacketFormat.SocketaddrInfo_O_T.SIN_port = OriginatorUDPPort;
commonPacketFormat.SocketaddrInfo_O_T.SIN_family = 2;
@@ -502,11 +501,11 @@ public void ForwardOpen(bool largeForwardOpen)
System.Buffer.BlockCopy(encapsulation.toBytes(), 0, dataToWrite, 0, encapsulation.toBytes().Length);
System.Buffer.BlockCopy(commonPacketFormat.toBytes(), 0, dataToWrite, encapsulation.toBytes().Length, commonPacketFormat.toBytes().Length);
//encapsulation.toBytes();
-
+
stream.Write(dataToWrite, 0, dataToWrite.Length);
byte[] data = new Byte[564];
- Int32 bytes = stream.Read(data, 0, data.Length);
+ stream.Read(data, 0, data.Length);
//--------------------------BEGIN Error?
if (data[42] != 0) //Exception codes see "Table B-1.1 CIP General Status Codes"
@@ -557,13 +556,13 @@ public void ForwardOpen(bool largeForwardOpen)
{
System.Net.IPAddress multicast = (new System.Net.IPAddress(multicastAddress));
udpClientReceive.JoinMulticastGroup(multicast);
-
+
}
System.Threading.Thread sendThread = new System.Threading.Thread(sendUDP);
sendThread.Start();
- var asyncResult = udpClientReceive.BeginReceive(new AsyncCallback(ReceiveCallbackClass1), s);
+ udpClientReceive.BeginReceive(new AsyncCallback(ReceiveCallbackClass1), s);
}
public void LargeForwardOpen()
@@ -714,7 +713,7 @@ public void ForwardClose()
commonPacketFormat.Data.Add(0xFF);
//----------------Originator Serial Number
- //Connection Path size
+ //Connection Path size
commonPacketFormat.Data.Add((byte)((0x2) + (O_T_ConnectionType == ConnectionType.Null ? 0 : 1) + (T_O_ConnectionType == ConnectionType.Null ? 0 : 1)));
//Reserved
commonPacketFormat.Data.Add(0);
@@ -753,7 +752,7 @@ public void ForwardClose()
try
{
- Int32 bytes = stream.Read(data, 0, data.Length);
+ stream.Read(data, 0, data.Length);
}
catch (Exception e)
{
@@ -771,8 +770,8 @@ public void ForwardClose()
//Close the Socket for Receive
udpClientReceiveClosed = true;
udpClientReceive.Close();
-
-
+
+
}
@@ -790,9 +789,7 @@ private void sendUDP()
{
byte[] o_t_IOData = new byte[564];
System.Net.IPEndPoint endPointsend = new System.Net.IPEndPoint(System.Net.IPAddress.Parse(IPAddress), TargetUDPPort);
-
- UdpState send = new UdpState();
-
+
//---------------Item count
o_t_IOData[0] = 2;
o_t_IOData[1] = 0;
@@ -811,17 +808,17 @@ private void sendUDP()
//---------------connection ID
sequenceCount++;
o_t_IOData[6] = (byte)(connectionID_O_T);
- o_t_IOData[7] = (byte)(connectionID_O_T >> 8);
- o_t_IOData[8] = (byte)(connectionID_O_T >> 16);
+ o_t_IOData[7] = (byte)(connectionID_O_T >> 8);
+ o_t_IOData[8] = (byte)(connectionID_O_T >> 16);
o_t_IOData[9] = (byte)(connectionID_O_T >> 24);
- //---------------connection ID
+ //---------------connection ID
//---------------sequence count
o_t_IOData[10] = (byte)(sequenceCount);
o_t_IOData[11] = (byte)(sequenceCount >> 8);
o_t_IOData[12] = (byte)(sequenceCount >> 16);
o_t_IOData[13] = (byte)(sequenceCount >> 24);
- //---------------sequence count
+ //---------------sequence count
//---------------Type ID
o_t_IOData[14] = 0xB1;
@@ -878,7 +875,7 @@ private void sendUDP()
}
private void ReceiveCallbackClass1(IAsyncResult ar)
- {
+ {
UdpClient u = (UdpClient)((UdpState)(ar.AsyncState)).u;
if (udpClientReceiveClosed)
return;
@@ -921,9 +918,9 @@ private void ReceiveCallbackClass1(IAsyncResult ar)
///
/// Sends a RegisterSession command to a target to initiate session
///
- /// IP-Address of the target device
- /// Port of the target device (default should be 0xAF12)
- /// Session Handle
+ /// IP-Address of the target device
+ /// Port of the target device (default should be 0xAF12)
+ /// Session Handle
public UInt32 RegisterSession(string address, UInt16 port)
{
string[] addressSubstring = address.Split('.');
@@ -934,8 +931,8 @@ public UInt32 RegisterSession(string address, UInt16 port)
///
/// Sends a RegisterSession command to a target to initiate session with the Standard or predefined Port (Standard: 0xAF12)
///
- /// IP-Address of the target device
- /// Session Handle
+ /// IP-Address of the target device
+ /// Session Handle
public UInt32 RegisterSession(string address)
{
string[] addressSubstring = address.Split('.');
@@ -946,10 +943,9 @@ public UInt32 RegisterSession(string address)
///
/// Sends a RegisterSession command to a target to initiate session with the Standard or predefined Port and Predefined IPAddress (Standard-Port: 0xAF12)
///
- /// Session Handle
+ /// Session Handle
public UInt32 RegisterSession()
{
-
return RegisterSession(this.IPAddress, this.TCPPort);
}
@@ -958,7 +954,6 @@ public byte[] GetAttributeSingle(int classID, int instanceID, int attributeID)
byte[] requestedPath = GetEPath(classID, instanceID, attributeID);
if (sessionHandle == 0) //If a Session is not Registers, Try to Registers a Session with the predefined IP-Address and Port
this.RegisterSession();
- byte[] dataToSend = new byte[42+ requestedPath.Length];
Encapsulation encapsulation = new Encapsulation();
encapsulation.SessionHandle = sessionHandle;
encapsulation.Command = Encapsulation.CommandsEnum.SendRRData;
@@ -1035,15 +1030,14 @@ public byte[] GetAttributeSingle(int classID, int instanceID, int attributeID)
///
/// Implementation of Common Service "Get_Attribute_All" - Service Code: 0x01
///
- /// Class id of requested Attributes
- /// Instance of Requested Attributes (0 for class Attributes)
- /// Session Handle
+ /// Class id of requested Attributes
+ /// Instance of Requested Attributes (0 for class Attributes)
+ /// Session Handle
public byte[] GetAttributeAll(int classID, int instanceID)
{
byte[] requestedPath = GetEPath(classID, instanceID, 0);
if (sessionHandle == 0) //If a Session is not Registered, Try to Registers a Session with the predefined IP-Address and Port
this.RegisterSession();
- byte[] dataToSend = new byte[42 + requestedPath.Length];
Encapsulation encapsulation = new Encapsulation();
encapsulation.SessionHandle = sessionHandle;
encapsulation.Command = Encapsulation.CommandsEnum.SendRRData;
@@ -1093,7 +1087,7 @@ public byte[] GetAttributeAll(int classID, int instanceID)
byte[] dataToWrite = new byte[encapsulation.toBytes().Length + commonPacketFormat.toBytes().Length];
System.Buffer.BlockCopy(encapsulation.toBytes(), 0, dataToWrite, 0, encapsulation.toBytes().Length);
System.Buffer.BlockCopy(commonPacketFormat.toBytes(), 0, dataToWrite, encapsulation.toBytes().Length, commonPacketFormat.toBytes().Length);
-
+
stream.Write(dataToWrite, 0, dataToWrite.Length);
byte[] data = new Byte[564];
@@ -1117,7 +1111,6 @@ public byte[] SetAttributeSingle(int classID, int instanceID, int attributeID, b
byte[] requestedPath = GetEPath(classID, instanceID, attributeID);
if (sessionHandle == 0) //If a Session is not Registers, Try to Registers a Session with the predefined IP-Address and Port
this.RegisterSession();
- byte[] dataToSend = new byte[42 + value.Length + requestedPath.Length];
Encapsulation encapsulation = new Encapsulation();
encapsulation.SessionHandle = sessionHandle;
encapsulation.Command = Encapsulation.CommandsEnum.SendRRData;
@@ -1213,7 +1206,7 @@ private byte[] GetEPath(int classID, int instanceID, int attributeID)
byteCount = byteCount + 2;
else
byteCount = byteCount + 4;
-
+
if (instanceID < 0xff)
byteCount = byteCount + 2;
else
@@ -1279,7 +1272,7 @@ private byte[] GetEPath(int classID, int instanceID, int attributeID)
///
/// Implementation of Common Service "Get_Attribute_All" - Service Code: 0x01
///
- /// Class id of requested Attributes
+ /// Class id of requested Attributes
public byte[] GetAttributeAll(int classID)
{
return this.GetAttributeAll(classID, 0);
@@ -1345,7 +1338,7 @@ public ObjectLibrary.TcpIpInterfaceObject TcpIpInterfaceObject
}
///
- /// Provides Access to the Class 1 Real-Time IO-Data Originator -> Target for Implicit Messaging
+ /// Provides Access to the Class 1 Real-Time IO-Data Originator -> Target for Implicit Messaging
///
public byte[] O_T_IOData
{
@@ -1388,7 +1381,7 @@ public byte[] T_O_IOData
///
/// Converts a bytearray (received e.g. via getAttributeSingle) to ushort
///
- /// bytearray to convert
+ /// bytearray to convert
public static ushort ToUshort(byte[] byteArray)
{
UInt16 returnValue;
@@ -1399,7 +1392,7 @@ public static ushort ToUshort(byte[] byteArray)
///
/// Converts a bytearray (received e.g. via getAttributeSingle) to uint
///
- /// bytearray to convert
+ /// bytearray to convert
public static uint ToUint(byte[] byteArray)
{
UInt32 returnValue = ((UInt32)byteArray[3] << 24 | (UInt32)byteArray[2] << 16 | (UInt32)byteArray[1] << 8 | (UInt32)byteArray[0]);
@@ -1409,12 +1402,11 @@ public static uint ToUint(byte[] byteArray)
///
/// Returns the "Bool" State of a byte Received via getAttributeSingle
///
- /// byte to convert
- /// bitposition to convert (First bit = bitposition 0)
+ /// byte to convert
+ /// bitposition to convert (First bit = bitposition 0)
/// Converted bool value
public static bool ToBool(byte inputByte, int bitposition)
{
-
return (((inputByte>>bitposition)&0x01) != 0) ? true : false;
}
}
@@ -1440,7 +1432,5 @@ public enum RealTimeFormat : byte
ZeroLength = 1,
Heartbeat = 2,
Header32Bit = 3
-
-
}
}
diff --git a/EEIP.NET/Encapsulation.cs b/EEIP.NET/Encapsulation.cs
index bfff878..2372316 100644
--- a/EEIP.NET/Encapsulation.cs
+++ b/EEIP.NET/Encapsulation.cs
@@ -102,7 +102,7 @@ public class CIPIdentityItem
public byte[] Revision1 = new byte[2]; //Device revision
public UInt16 Status1; //Current status of device
public UInt32 SerialNumber1; //Serial number of device
- public byte ProductNameLength;
+ public byte ProductNameLength;
public string ProductName1; //Human readable description of device
public byte State1; //Current state of device
diff --git a/EEIP.NET/ObjectLibrary/AssemblyObject.cs b/EEIP.NET/ObjectLibrary/AssemblyObject.cs
index b27d8ee..99d59a2 100644
--- a/EEIP.NET/ObjectLibrary/AssemblyObject.cs
+++ b/EEIP.NET/ObjectLibrary/AssemblyObject.cs
@@ -25,7 +25,7 @@ public AssemblyObject(EEIPClient eeipClient)
/// bytes of the Instance
public byte[] getInstance(int instanceNo)
{
-
+
byte[] byteArray = eeipClient.GetAttributeSingle(4, instanceNo, 3);
return byteArray;
}
diff --git a/EEIP.NET/ObjectLibrary/ConnectionManagerObject.cs b/EEIP.NET/ObjectLibrary/ConnectionManagerObject.cs
index ca03f65..c37c702 100644
--- a/EEIP.NET/ObjectLibrary/ConnectionManagerObject.cs
+++ b/EEIP.NET/ObjectLibrary/ConnectionManagerObject.cs
@@ -15,7 +15,7 @@ public class ConnectionManagerObject
///
/// Returns the Explanation of a given statuscode (Table 3-5-29) Page 3-75 Vol 1
///
- /// Extended Status Code
+ /// Extended Status Code
public static string GetExtendedStatus(uint statusCode)
{
switch(statusCode)
diff --git a/EEIP.NET/ObjectLibrary/MessageRouterObject.cs b/EEIP.NET/ObjectLibrary/MessageRouterObject.cs
index 230139d..b2b0ad2 100644
--- a/EEIP.NET/ObjectLibrary/MessageRouterObject.cs
+++ b/EEIP.NET/ObjectLibrary/MessageRouterObject.cs
@@ -85,7 +85,7 @@ public UInt16[] ActiveConnections
returnValue[i] = (UInt16)(byteArray[1 + 2*i] << 8 | byteArray[0 + 2*i]);
}
return returnValue;
-
+
}
}
diff --git a/EEIP.NET/ObjectLibrary/TcpIpInterfaceObject.cs b/EEIP.NET/ObjectLibrary/TcpIpInterfaceObject.cs
index e820140..41059cb 100644
--- a/EEIP.NET/ObjectLibrary/TcpIpInterfaceObject.cs
+++ b/EEIP.NET/ObjectLibrary/TcpIpInterfaceObject.cs
@@ -38,7 +38,7 @@ public InterfaceStatus Status
return status;
}
}
-
+
///
/// gets the Configuration capability / Read "TCP/IP Interface Object" Class Code 0xF5 - Attribute ID 2
@@ -144,7 +144,7 @@ public struct InterfaceStatus
public bool NotConfigured;
public bool ValidConfiguration;
public bool ValidManualConfiguration;
- public bool McastPending;
+ public bool McastPending;
}
///
diff --git a/EEIP.NET/Program.cs b/EEIP.NET/Program.cs
index 32f4502..f1b70fe 100644
--- a/EEIP.NET/Program.cs
+++ b/EEIP.NET/Program.cs
@@ -15,11 +15,11 @@ static void Main(string[] args)
//UInt32 sessionHandle = eipClient.RegisterSession("192.168.178.66", 0xAF12);
- UInt32 sessionHandle = eipClient.RegisterSession("192.168.178.107", 0xAF12);
+ 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;
@@ -27,7 +27,7 @@ static void Main(string[] args)
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;
@@ -36,7 +36,7 @@ static void Main(string[] args)
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;
@@ -50,7 +50,7 @@ static void Main(string[] args)
}
-
+
Console.ReadKey();
while (true)
{
@@ -64,7 +64,7 @@ static void Main(string[] args)
}
eipClient.ForwardClose();
System.Threading.Thread.Sleep(1000);
-
+
Console.ReadKey();
diff --git a/EEIP.NET/Properties/AssemblyInfo.cs b/EEIP.NET/Properties/AssemblyInfo.cs
index b09091d..d5202d3 100644
--- a/EEIP.NET/Properties/AssemblyInfo.cs
+++ b/EEIP.NET/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// 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")]
@@ -14,8 +14,8 @@
[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
+// 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)]
@@ -25,11 +25,11 @@
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Build and Revision Numbers
+// 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.*")]
diff --git a/Explicit_Message_Example2/Program.cs b/Explicit_Message_Example2/Program.cs
index 0323e80..08932d8 100644
--- a/Explicit_Message_Example2/Program.cs
+++ b/Explicit_Message_Example2/Program.cs
@@ -13,7 +13,7 @@ static void Main(string[] args)
{
EEIPClient eeipClient = new EEIPClient();
- //Register Session (Wago-Device 750-352 IP-Address: 192.168.178.66)
+ //Register Session (Wago-Device 750-352 IP-Address: 192.168.178.66)
//we use the Standard Port for Ethernet/IP TCP-connections 0xAF12
eeipClient.RegisterSession("192.168.1.3");
diff --git a/Explicit_Message_Example2/Properties/AssemblyInfo.cs b/Explicit_Message_Example2/Properties/AssemblyInfo.cs
index 4c5a5b0..c61af90 100644
--- a/Explicit_Message_Example2/Properties/AssemblyInfo.cs
+++ b/Explicit_Message_Example2/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// 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("Explicit_Message_Example2")]
@@ -14,8 +14,8 @@
[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
+// 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)]
@@ -25,11 +25,11 @@
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Build and Revision Numbers
+// 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.0.0.0")]
diff --git a/Explicit_Message_Example_ReadAnalogInput/Program.cs b/Explicit_Message_Example_ReadAnalogInput/Program.cs
index 9ecd4c8..ee46486 100644
--- a/Explicit_Message_Example_ReadAnalogInput/Program.cs
+++ b/Explicit_Message_Example_ReadAnalogInput/Program.cs
@@ -13,7 +13,7 @@ static void Main(string[] args)
{
EEIPClient eeipClient = new EEIPClient();
- //Register Session (Wago-Device 750-352 IP-Address: 192.168.178.66)
+ //Register Session (Wago-Device 750-352 IP-Address: 192.168.178.66)
//we use the Standard Port for Ethernet/IP TCP-connections 0xAF12
eeipClient.RegisterSession("192.168.1.3");
diff --git a/Explicit_Message_Example_ReadAnalogInput/Properties/AssemblyInfo.cs b/Explicit_Message_Example_ReadAnalogInput/Properties/AssemblyInfo.cs
index 5f1f7ad..9427fc1 100644
--- a/Explicit_Message_Example_ReadAnalogInput/Properties/AssemblyInfo.cs
+++ b/Explicit_Message_Example_ReadAnalogInput/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// 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("Explicit_Message_Example_ReadAnalogInput")]
@@ -14,8 +14,8 @@
[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
+// 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)]
@@ -25,11 +25,11 @@
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Build and Revision Numbers
+// 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.0.0.0")]
diff --git a/Explicit_Messaging_Example/Program.cs b/Explicit_Messaging_Example/Program.cs
index fbb3d3b..f50486f 100644
--- a/Explicit_Messaging_Example/Program.cs
+++ b/Explicit_Messaging_Example/Program.cs
@@ -13,7 +13,7 @@ static void Main(string[] args)
{
EEIPClient eeipClient = new EEIPClient();
- //Register Session (Wago-Device 750-352 IP-Address: 192.168.178.66)
+ //Register Session (Wago-Device 750-352 IP-Address: 192.168.178.66)
//we use the Standard Port for Ethernet/IP TCP-connections 0xAF12
eeipClient.RegisterSession("192.168.1.3");
diff --git a/Explicit_Messaging_Example/Properties/AssemblyInfo.cs b/Explicit_Messaging_Example/Properties/AssemblyInfo.cs
index e30d561..f2d6a3a 100644
--- a/Explicit_Messaging_Example/Properties/AssemblyInfo.cs
+++ b/Explicit_Messaging_Example/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// 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("Wago_750_352_Explicit2")]
@@ -14,8 +14,8 @@
[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
+// 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)]
@@ -25,11 +25,11 @@
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Build and Revision Numbers
+// 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.0.0.0")]
diff --git a/Keyence-NU_EP1_Implicit2/Program.cs b/Keyence-NU_EP1_Implicit2/Program.cs
index cb3deaa..cf7ee5c 100644
--- a/Keyence-NU_EP1_Implicit2/Program.cs
+++ b/Keyence-NU_EP1_Implicit2/Program.cs
@@ -6,7 +6,7 @@
using Sres.Net.EEIP;
-//This example demonstrates the usage of Implicit Messaging
+//This example demonstrates the usage of Implicit Messaging
//whith an Keyence NU-EP1 Network Unit. This is an Input Only connection.
//The 128 received bytes returns the state of the Sensors (Page 3-9 of Keyence Manual contains the assignment).
//Keyence Users Manual Page 3-6 No. 2
diff --git a/Keyence-NU_EP1_Implicit2/Properties/AssemblyInfo.cs b/Keyence-NU_EP1_Implicit2/Properties/AssemblyInfo.cs
index e68d85c..ed24ae3 100644
--- a/Keyence-NU_EP1_Implicit2/Properties/AssemblyInfo.cs
+++ b/Keyence-NU_EP1_Implicit2/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// 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("Keyence-NU_EP1_Implicit2")]
@@ -14,8 +14,8 @@
[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
+// 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)]
@@ -25,11 +25,11 @@
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Build and Revision Numbers
+// 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.0.0.0")]
diff --git a/Keyence_NU_RP1_Implicit/Program.cs b/Keyence_NU_RP1_Implicit/Program.cs
index 7b23efe..4c7d808 100644
--- a/Keyence_NU_RP1_Implicit/Program.cs
+++ b/Keyence_NU_RP1_Implicit/Program.cs
@@ -6,7 +6,7 @@
using Sres.Net.EEIP;
-//This example demonstrates the usage of Implicit Messaging
+//This example demonstrates the usage of Implicit Messaging
//whith an Keyence NU-EP1 Network Unit. This is an Input Only connection.
//The two received bytes represents the output state of the sensors.
//Keyence Users Manual Page 3-6 No. 3
@@ -24,7 +24,7 @@ static void Main(string[] args)
//Parameters from Originator -> Target
eeipClient.O_T_InstanceID = 0xfe; //Instance ID of the Output Assembly
- eeipClient.O_T_Length = 0;
+ eeipClient.O_T_Length = 0;
eeipClient.O_T_RealTimeFormat = Sres.Net.EEIP.RealTimeFormat.Header32Bit; //Header Format
eeipClient.O_T_OwnerRedundant = false;
eeipClient.O_T_Priority = Sres.Net.EEIP.Priority.Low;
diff --git a/Keyence_NU_RP1_Implicit/Properties/AssemblyInfo.cs b/Keyence_NU_RP1_Implicit/Properties/AssemblyInfo.cs
index 75588ed..ba6971f 100644
--- a/Keyence_NU_RP1_Implicit/Properties/AssemblyInfo.cs
+++ b/Keyence_NU_RP1_Implicit/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// 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("Keyence_NU_RP1_Implicit")]
@@ -14,8 +14,8 @@
[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
+// 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)]
@@ -25,11 +25,11 @@
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Build and Revision Numbers
+// 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.0.0.0")]
diff --git a/Turck FEN20/Program.cs b/Turck FEN20/Program.cs
index 4ad885b..5a1b311 100644
--- a/Turck FEN20/Program.cs
+++ b/Turck FEN20/Program.cs
@@ -5,7 +5,7 @@
// Turck FEN20-4DIP-4DXP
//Unisversal Digital Channels are used as Digital Outputs
// Manual: http://pdb2.turck.de/repo/media/_en/Anlagen/Datei_EDB/edb_6931090_gbr_en.pdf
-//IP-Address: 192.168.1.254
+//IP-Address: 192.168.1.254
namespace TurckFEN20
{
diff --git a/Turck FEN20/Properties/AssemblyInfo.cs b/Turck FEN20/Properties/AssemblyInfo.cs
index 3cbda91..ecf2cca 100644
--- a/Turck FEN20/Properties/AssemblyInfo.cs
+++ b/Turck FEN20/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// 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("Turck FEN20")]
@@ -14,8 +14,8 @@
[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
+// 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)]
@@ -25,11 +25,11 @@
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Build and Revision Numbers
+// 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.0.0.0")]