Skip to content

Commit

Permalink
feat: Stub PLC WriteClock methods
Browse files Browse the repository at this point in the history
  • Loading branch information
mycroes committed Aug 31, 2023
1 parent 1969aac commit f419df4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
12 changes: 12 additions & 0 deletions S7.Net/PlcAsynchronous.cs
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,18 @@ public async Task<List<DataItem>> ReadMultipleVarsAsync(List<DataItem> dataItems
return ParseClockReadResponse(response);
}

/// <summary>
///Write the PLC clock value.
/// </summary>
/// <param name="value">The date and time to set the PLC clock to</param>
/// <param name="cancellationToken">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.</param>
/// <returns>A task that represents the asynchronous operation.</returns>
public async Task WriteClockAsync(System.DateTime value, CancellationToken cancellationToken = default)
{
throw new NotImplementedException();
}

/// <summary>
/// Read the current status from the PLC. A value of 0x08 indicates the PLC is in run status, regardless of the PLC type.
/// </summary>
Expand Down
9 changes: 9 additions & 0 deletions S7.Net/PlcSynchronous.cs
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,15 @@ public System.DateTime ReadClock()
return ParseClockReadResponse(response);
}

/// <summary>
/// Write the PLC clock value.
/// </summary>
/// <param name="value">The date and time to set the PLC clock to.</param>
public void WriteClock(System.DateTime value)
{
throw new NotImplementedException();
}

/// <summary>
/// Read the current status from the PLC. A value of 0x08 indicates the PLC is in run status, regardless of the PLC type.
/// </summary>
Expand Down

0 comments on commit f419df4

Please sign in to comment.