chore: Fix xmldoc warnings

This commit is contained in:
Michael Croes
2023-07-26 23:38:32 +02:00
parent 12e180ea2d
commit 8ad25033d5
8 changed files with 16 additions and 6 deletions

View File

@@ -55,6 +55,7 @@ namespace S7.Net
/// See: https://tools.ietf.org/html/rfc905 /// See: https://tools.ietf.org/html/rfc905
/// </summary> /// </summary>
/// <param name="stream">The socket to read from</param> /// <param name="stream">The socket to read from</param>
/// <param name="cancellationToken">A cancellation token that can be used to cancel the asynchronous operation.</param>
/// <returns>COTP DPDU instance</returns> /// <returns>COTP DPDU instance</returns>
public static async Task<TPDU> ReadAsync(Stream stream, CancellationToken cancellationToken) public static async Task<TPDU> ReadAsync(Stream stream, CancellationToken cancellationToken)
{ {
@@ -89,6 +90,7 @@ namespace S7.Net
/// See: https://tools.ietf.org/html/rfc905 /// See: https://tools.ietf.org/html/rfc905
/// </summary> /// </summary>
/// <param name="stream">The stream to read from</param> /// <param name="stream">The stream to read from</param>
/// <param name="cancellationToken">A cancellation token that can be used to cancel the asynchronous operation.</param>
/// <returns>Data in TSDU</returns> /// <returns>Data in TSDU</returns>
public static async Task<byte[]> ReadAsync(Stream stream, CancellationToken cancellationToken) public static async Task<byte[]> ReadAsync(Stream stream, CancellationToken cancellationToken)
{ {

View File

@@ -12,8 +12,8 @@ namespace S7.Net
/// <summary> /// <summary>
/// Creates the header to read bytes from the PLC /// Creates the header to read bytes from the PLC
/// </summary> /// </summary>
/// <param name="amount"></param> /// <param name="stream">The stream to write to.</param>
/// <returns></returns> /// <param name="amount">The number of items to read.</param>
private static void BuildHeaderPackage(System.IO.MemoryStream stream, int amount = 1) private static void BuildHeaderPackage(System.IO.MemoryStream stream, int amount = 1)
{ {
//header size = 19 bytes //header size = 19 bytes
@@ -32,6 +32,7 @@ namespace S7.Net
/// Create the bytes-package to request data from the PLC. You have to specify the memory type (dataType), /// Create the bytes-package to request data from the PLC. You have to specify the memory type (dataType),
/// the address of the memory, the address of the byte and the bytes count. /// the address of the memory, the address of the byte and the bytes count.
/// </summary> /// </summary>
/// <param name="stream">The stream to write the read data request to.</param>
/// <param name="dataType">MemoryType (DB, Timer, Counter, etc.)</param> /// <param name="dataType">MemoryType (DB, Timer, Counter, etc.)</param>
/// <param name="db">Address of the memory to be read</param> /// <param name="db">Address of the memory to be read</param>
/// <param name="startByteAdr">Start address of the byte</param> /// <param name="startByteAdr">Start address of the byte</param>

View File

@@ -428,7 +428,6 @@ namespace S7.Net
/// <summary> /// <summary>
/// Writes a single variable from the PLC, takes in input strings like "DB1.DBX0.0", "DB20.DBD200", "MB20", "T45", etc. /// Writes a single variable from the PLC, takes in input strings like "DB1.DBX0.0", "DB20.DBD200", "MB20", "T45", etc.
/// If the write was not successful, check <see cref="LastErrorCode"/> or <see cref="LastErrorString"/>.
/// </summary> /// </summary>
/// <param name="variable">Input strings like "DB1.DBX0.0", "DB20.DBD200", "MB20", "T45", etc.</param> /// <param name="variable">Input strings like "DB1.DBX0.0", "DB20.DBD200", "MB20", "T45", etc.</param>
/// <param name="value">Value to be written to the PLC</param> /// <param name="value">Value to be written to the PLC</param>
@@ -507,6 +506,7 @@ namespace S7.Net
/// <param name="db">Address of the memory area (if you want to read DB1, this is set to 1). This must be set also for other memory area types: counters, timers,etc.</param> /// <param name="db">Address of the memory area (if you want to read DB1, this is set to 1). This must be set also for other memory area types: counters, timers,etc.</param>
/// <param name="startByteAdr">Start byte address. If you want to read DB1.DBW200, this is 200.</param> /// <param name="startByteAdr">Start byte address. If you want to read DB1.DBW200, this is 200.</param>
/// <param name="value">Bytes to write. The lenght of this parameter can't be higher than 200. If you need more, use recursion.</param> /// <param name="value">Bytes to write. The lenght of this parameter can't be higher than 200. If you need more, use recursion.</param>
/// <param name="cancellationToken">A cancellation token that can be used to cancel the asynchronous operation.</param>
/// <returns>A task that represents the asynchronous write operation.</returns> /// <returns>A task that represents the asynchronous write operation.</returns>
private async Task WriteBytesWithASingleRequestAsync(DataType dataType, int db, int startByteAdr, ReadOnlyMemory<byte> value, CancellationToken cancellationToken) private async Task WriteBytesWithASingleRequestAsync(DataType dataType, int db, int startByteAdr, ReadOnlyMemory<byte> value, CancellationToken cancellationToken)
{ {

View File

@@ -289,7 +289,6 @@ namespace S7.Net
/// <summary> /// <summary>
/// Writes a single variable from the PLC, takes in input strings like "DB1.DBX0.0", "DB20.DBD200", "MB20", "T45", etc. /// Writes a single variable from the PLC, takes in input strings like "DB1.DBX0.0", "DB20.DBD200", "MB20", "T45", etc.
/// If the write was not successful, check <see cref="LastErrorCode"/> or <see cref="LastErrorString"/>.
/// </summary> /// </summary>
/// <param name="variable">Input strings like "DB1.DBX0.0", "DB20.DBD200", "MB20", "T45", etc.</param> /// <param name="variable">Input strings like "DB1.DBX0.0", "DB20.DBD200", "MB20", "T45", etc.</param>
/// <param name="value">Value to be written to the PLC</param> /// <param name="value">Value to be written to the PLC</param>

View File

@@ -39,6 +39,7 @@ namespace S7.Net
/// <param name="buffer">the buffer to read into</param> /// <param name="buffer">the buffer to read into</param>
/// <param name="offset">the offset in the buffer to read into</param> /// <param name="offset">the offset in the buffer to read into</param>
/// <param name="count">the amount of bytes to read into the buffer</param> /// <param name="count">the amount of bytes to read into the buffer</param>
/// <param name="cancellationToken">A cancellation token that can be used to cancel the asynchronous operation.</param>
/// <returns>returns the amount of read bytes</returns> /// <returns>returns the amount of read bytes</returns>
public static async Task<int> ReadExactAsync(this Stream stream, byte[] buffer, int offset, int count, CancellationToken cancellationToken) public static async Task<int> ReadExactAsync(this Stream stream, byte[] buffer, int offset, int count, CancellationToken cancellationToken)
{ {

View File

@@ -29,6 +29,7 @@ namespace S7.Net
/// Reads a TPKT from the socket Async /// Reads a TPKT from the socket Async
/// </summary> /// </summary>
/// <param name="stream">The stream to read from</param> /// <param name="stream">The stream to read from</param>
/// <param name="cancellationToken">A cancellation token that can be used to cancel the asynchronous operation.</param>
/// <returns>Task TPKT Instace</returns> /// <returns>Task TPKT Instace</returns>
public static async Task<TPKT> ReadAsync(Stream stream, CancellationToken cancellationToken) public static async Task<TPKT> ReadAsync(Stream stream, CancellationToken cancellationToken)
{ {

View File

@@ -76,6 +76,8 @@ namespace S7.Net.Types
/// Gets the size of the class in bytes. /// Gets the size of the class in bytes.
/// </summary> /// </summary>
/// <param name="instance">An instance of the class</param> /// <param name="instance">An instance of the class</param>
/// <param name="numBytes">The offset of the current field.</param>
/// <param name="isInnerProperty"><see langword="true" /> if this property belongs to a class being serialized as member of the class requested for serialization; otherwise, <see langword="false" />.</param>
/// <returns>the number of bytes</returns> /// <returns>the number of bytes</returns>
public static double GetClassSize(object instance, double numBytes = 0.0, bool isInnerProperty = false) public static double GetClassSize(object instance, double numBytes = 0.0, bool isInnerProperty = false)
{ {
@@ -213,6 +215,8 @@ namespace S7.Net.Types
/// </summary> /// </summary>
/// <param name="sourceClass">The object to fill in the given array of bytes</param> /// <param name="sourceClass">The object to fill in the given array of bytes</param>
/// <param name="bytes">The array of bytes</param> /// <param name="bytes">The array of bytes</param>
/// <param name="numBytes">The offset for the current field.</param>
/// <param name="isInnerClass"><see langword="true" /> if this class is the type of a member of the class to be serialized; otherwise, <see langword="false" />.</param>
public static double FromBytes(object sourceClass, byte[] bytes, double numBytes = 0, bool isInnerClass = false) public static double FromBytes(object sourceClass, byte[] bytes, double numBytes = 0, bool isInnerClass = false)
{ {
if (bytes == null) if (bytes == null)
@@ -320,7 +324,9 @@ namespace S7.Net.Types
/// <summary> /// <summary>
/// Creates a byte array depending on the struct type. /// Creates a byte array depending on the struct type.
/// </summary> /// </summary>
/// <param name="sourceClass">The struct object</param> /// <param name="sourceClass">The struct object.</param>
/// <param name="bytes">The target byte array.</param>
/// <param name="numBytes">The offset for the current field.</param>
/// <returns>A byte array or null if fails.</returns> /// <returns>A byte array or null if fails.</returns>
public static double ToBytes(object sourceClass, byte[] bytes, double numBytes = 0.0) public static double ToBytes(object sourceClass, byte[] bytes, double numBytes = 0.0)
{ {

View File

@@ -141,7 +141,7 @@ namespace S7.Net.Types
/// Converts an array of <see cref="T:System.DateTime"/> values to a byte array. /// Converts an array of <see cref="T:System.DateTime"/> values to a byte array.
/// </summary> /// </summary>
/// <param name="dateTimes">The DateTime values to convert.</param> /// <param name="dateTimes">The DateTime values to convert.</param>
/// <returns>A byte array containing the S7 date time representations of <paramref name="dateTime"/>.</returns> /// <returns>A byte array containing the S7 date time representations of <paramref name="dateTimes"/>.</returns>
/// <exception cref="ArgumentOutOfRangeException">Thrown when any value of /// <exception cref="ArgumentOutOfRangeException">Thrown when any value of
/// <paramref name="dateTimes"/> is before <see cref="P:SpecMinimumDateTime"/> /// <paramref name="dateTimes"/> is before <see cref="P:SpecMinimumDateTime"/>
/// or after <see cref="P:SpecMaximumDateTime"/>.</exception> /// or after <see cref="P:SpecMaximumDateTime"/>.</exception>