Add S7 Time type (C# TimeSpan)

Adds the S7 TIME (IEC) type (32 bits long)
It is deserialized to C# TimeSpan and serialized as S7 DInt.
This commit is contained in:
Dawid Pągowski
2023-07-19 20:30:32 +02:00
parent e869d19587
commit 0d2817661e
4 changed files with 113 additions and 3 deletions

View File

@@ -1006,7 +1006,7 @@ namespace S7.Net.UnitTest
var db = 2;
randomEngine.NextBytes(data);
cancellationSource.CancelAfter(TimeSpan.FromMilliseconds(5));
cancellationSource.CancelAfter(System.TimeSpan.FromMilliseconds(5));
try
{
await plc.WriteBytesAsync(DataType.DataBlock, db, 0, data, cancellationToken);
@@ -1045,7 +1045,7 @@ namespace S7.Net.UnitTest
var db = 2;
randomEngine.NextBytes(data.Span);
cancellationSource.CancelAfter(TimeSpan.FromMilliseconds(5));
cancellationSource.CancelAfter(System.TimeSpan.FromMilliseconds(5));
try
{
await plc.WriteBytesAsync(DataType.DataBlock, db, 0, data, cancellationToken);