Files
s7netplus/S7.Net/Interfaces/IPLC.cs
Derek Heiser e65c0eed25 S7.NET Testability Updates
Removed the Controls project and existing Test projects. Added new Test
project and references to NUnit and Should projects for testing.
Extracted IPlc interface to help test projects that reference this
library. Also implemented the IDisposable interface on the Plc object so
that references to mSocket would be cleaned up appropriately when the
object is blown away.
2013-02-09 10:17:47 -06:00

26 lines
978 B
C#

using System;
namespace S7
{
public interface IPlc : IDisposable
{
string IP { get; set; }
bool IsConnected { get; }
CPU_Type CPU { get; set; }
Int16 Rack { get; set; }
Int16 Slot { get; set; }
string Name { get; set; }
object Tag { get; set; }
bool IsAvailable { get; }
ErrorCode Open();
void Close();
byte[] ReadBytes(DataType DataType, int DB, int StartByteAdr, int count);
object Read(DataType DataType, int DB, int StartByteAdr, VarType VarType, int VarCount);
object Read(string variable);
object ReadStruct(Type structType, int DB);
ErrorCode WriteBytes(DataType DataType, int DB, int StartByteAdr, byte[] value);
object Write(DataType DataType, int DB, int StartByteAdr, object value);
object Write(string variable, object value);
ErrorCode WriteStruct(object structValue, int DB);
}
}