2014-08-01 update 4

This commit is contained in:
parallelbgls
2014-08-01 13:59:48 +08:00
parent 32232fa34c
commit a6e06afb6d
2 changed files with 47 additions and 42 deletions

View File

@@ -42,6 +42,12 @@ namespace ModBus.Net
Protocals.Add(linkProtocal.GetType().Name, linkProtocal);
}
public virtual byte[] SendReceive(params object[] content)
{
int t;
return _protocalLinker.SendReceive(ProtocalUnit.TranslateContent(content));
}
public virtual OutputStruct SendReceive(ProtocalUnit unit, params object[] content)
{
int t = 0;

View File

@@ -15,12 +15,11 @@ namespace ModBus.Net
}
public abstract OutputStruct Unformat(byte[] messageBytes, ref int pos);
/// <summary>
/// </summary>
/// <param name="contents"></param>
/// <returns></returns>
public byte[] TranslateContent(params object[] contents)
public static byte[] TranslateContent(params object[] contents)
{
bool b = false;
var newContentsList = new List<object>();