Add and move serialization helpers

Added (Get|Set)WordAt, SetAddressAt and moved GetPackage method.
This commit is contained in:
Michael Croes
2018-05-25 22:40:56 +02:00
parent 0721b1a84a
commit aaab24a4c2
5 changed files with 68 additions and 38 deletions

View File

@@ -324,7 +324,7 @@ namespace S7.Net
}
throw new ArgumentException("Value must be a bool or an int to write a bit", nameof(value));
}
return WriteBytes(dataType, db, startByteAdr, GetPackage(value));
return WriteBytes(dataType, db, startByteAdr, Serialization.SerializeValue(value));
}
/// <summary>