From 6fc526b8866e1d679d5fdb2b1e87c011d74931a7 Mon Sep 17 00:00:00 2001 From: Michael Croes Date: Wed, 23 Aug 2023 22:40:57 +0200 Subject: [PATCH] Stub PLC ReadClock methods --- S7.Net/PlcAsynchronous.cs | 11 +++++++++++ S7.Net/PlcSynchronous.cs | 9 +++++++++ 2 files changed, 20 insertions(+) diff --git a/S7.Net/PlcAsynchronous.cs b/S7.Net/PlcAsynchronous.cs index eb49e5d..63edcd9 100644 --- a/S7.Net/PlcAsynchronous.cs +++ b/S7.Net/PlcAsynchronous.cs @@ -312,6 +312,17 @@ namespace S7.Net return dataItems; } + /// + /// Read the PLC clock value. + /// + /// The token to monitor for cancellation requests. The default value is None. + /// Please note that cancellation is advisory/cooperative and will not lead to immediate cancellation in all cases. + /// A task that represents the asynchronous operation, with it's result set to the current PLC time on completion. + public async Task ReadClockAsync(CancellationToken cancellationToken = default) + { + throw new NotImplementedException(); + } + /// /// Read the current status from the PLC. A value of 0x08 indicates the PLC is in run status, regardless of the PLC type. /// diff --git a/S7.Net/PlcSynchronous.cs b/S7.Net/PlcSynchronous.cs index 1b3af97..50483ad 100644 --- a/S7.Net/PlcSynchronous.cs +++ b/S7.Net/PlcSynchronous.cs @@ -492,6 +492,15 @@ namespace S7.Net } } + /// + /// Read the PLC clock value. + /// + /// The current PLC time. + public System.DateTime ReadClock() + { + throw new NotImplementedException(); + } + /// /// Read the current status from the PLC. A value of 0x08 indicates the PLC is in run status, regardless of the PLC type. ///