-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
29f10c4
commit cdd748e
Showing
14 changed files
with
274 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"sdk": { | ||
"version": "8.0.10", | ||
"rollForward": "latestMinor" | ||
"rollForward": "latestFeature" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright (c) Chris Pulman. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace S7PlcRx | ||
{ | ||
/// <summary> | ||
/// S71200. | ||
/// </summary> | ||
public static class S71200 | ||
{ | ||
/// <summary> | ||
/// Creates the specified ip. | ||
/// </summary> | ||
/// <param name="ip">The ip.</param> | ||
/// <param name="rack">The rack default 0.</param> | ||
/// <param name="watchDogAddress">The watch dog address.</param> | ||
/// <param name="interval">The interval.</param> | ||
/// <param name="watchDogValueToWrite">The watch dog value to write.</param> | ||
/// <param name="watchDogInterval">The watch dog interval.</param> | ||
/// <returns>A IRxS7 instance.</returns> | ||
public static IRxS7 Create(string ip, short rack = 0, string? watchDogAddress = null, double interval = 100, ushort watchDogValueToWrite = 4500, int watchDogInterval = 100) | ||
{ | ||
if (rack < 0 || rack > 7) | ||
{ | ||
throw new ArgumentOutOfRangeException(nameof(rack), "Rack must be between 0 and 7"); | ||
} | ||
|
||
return new RxS7(Enums.CpuType.S71200, ip, rack, 1, watchDogAddress, interval, watchDogValueToWrite, watchDogInterval); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright (c) Chris Pulman. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace S7PlcRx | ||
{ | ||
/// <summary> | ||
/// S71500. | ||
/// </summary> | ||
public static class S71500 | ||
{ | ||
/// <summary> | ||
/// Creates the specified ip. | ||
/// </summary> | ||
/// <param name="ip">The ip.</param> | ||
/// <param name="rack">The rack default 0.</param> | ||
/// <param name="slot">The slot default 1.</param> | ||
/// <param name="watchDogAddress">The watch dog address.</param> | ||
/// <param name="interval">The interval.</param> | ||
/// <param name="watchDogValueToWrite">The watch dog value to write.</param> | ||
/// <param name="watchDogInterval">The watch dog interval.</param> | ||
/// <returns>A IRxS7 instance.</returns> | ||
public static IRxS7 Create(string ip, short rack = 0, short slot = 1, string? watchDogAddress = null, double interval = 100, ushort watchDogValueToWrite = 4500, int watchDogInterval = 10) | ||
{ | ||
if (rack < 0 || rack > 7) | ||
{ | ||
throw new ArgumentOutOfRangeException(nameof(rack), "Rack must be between 0 and 7"); | ||
} | ||
|
||
if (slot < 1 || slot > 31) | ||
{ | ||
throw new ArgumentOutOfRangeException(nameof(slot), "Slot must be between 1 and 31"); | ||
} | ||
|
||
return new RxS7(Enums.CpuType.S71500, ip, rack, slot, watchDogAddress, interval, watchDogValueToWrite, watchDogInterval); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright (c) Chris Pulman. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace S7PlcRx | ||
{ | ||
/// <summary> | ||
/// S7200. | ||
/// </summary> | ||
public static class S7200 | ||
{ | ||
/// <summary> | ||
/// Creates the specified ip. | ||
/// </summary> | ||
/// <param name="ip">The ip.</param> | ||
/// <param name="rack">The rack.</param> | ||
/// <param name="slot">The slot.</param> | ||
/// <param name="watchDogAddress">The watch dog address.</param> | ||
/// <param name="interval">The interval.</param> | ||
/// <param name="watchDogValueToWrite">The watch dog value to write.</param> | ||
/// <param name="watchDogInterval">The watch dog interval.</param> | ||
/// <returns>A IRxS7 instance.</returns> | ||
public static IRxS7 Create(string ip, short rack, short slot, string? watchDogAddress = null, double interval = 100, ushort watchDogValueToWrite = 4500, int watchDogInterval = 100) => | ||
new RxS7(Enums.CpuType.S7200, ip, rack, slot, watchDogAddress, interval, watchDogValueToWrite, watchDogInterval); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright (c) Chris Pulman. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace S7PlcRx | ||
{ | ||
/// <summary> | ||
/// S7300. | ||
/// </summary> | ||
public static class S7300 | ||
{ | ||
/// <summary> | ||
/// Creates the specified ip. | ||
/// </summary> | ||
/// <param name="ip">The ip.</param> | ||
/// <param name="rack">The rack.</param> | ||
/// <param name="slot">The slot.</param> | ||
/// <param name="watchDogAddress">The watch dog address.</param> | ||
/// <param name="interval">The interval.</param> | ||
/// <param name="watchDogValueToWrite">The watch dog value to write.</param> | ||
/// <param name="watchDogInterval">The watch dog interval.</param> | ||
/// <returns>A IRxS7 instance.</returns> | ||
public static IRxS7 Create(string ip, short rack, short slot, string? watchDogAddress = null, double interval = 100, ushort watchDogValueToWrite = 4500, int watchDogInterval = 100) | ||
{ | ||
if (rack < 0 || rack > 7) | ||
{ | ||
throw new ArgumentOutOfRangeException(nameof(rack), "Rack must be between 0 and 7"); | ||
} | ||
|
||
if (slot < 1 || slot > 31) | ||
{ | ||
throw new ArgumentOutOfRangeException(nameof(slot), "Slot must be between 1 and 31"); | ||
} | ||
|
||
return new RxS7(Enums.CpuType.S7300, ip, rack, slot, watchDogAddress, interval, watchDogValueToWrite, watchDogInterval); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright (c) Chris Pulman. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace S7PlcRx | ||
{ | ||
/// <summary> | ||
/// S7400. | ||
/// </summary> | ||
public static class S7400 | ||
{ | ||
/// <summary> | ||
/// Creates the specified ip. | ||
/// </summary> | ||
/// <param name="ip">The ip.</param> | ||
/// <param name="rack">The rack.</param> | ||
/// <param name="slot">The slot.</param> | ||
/// <param name="watchDogAddress">The watch dog address.</param> | ||
/// <param name="interval">The interval.</param> | ||
/// <param name="watchDogValueToWrite">The watch dog value to write.</param> | ||
/// <param name="watchDogInterval">The watch dog interval.</param> | ||
/// <returns>A IRxS7 instance.</returns> | ||
public static IRxS7 Create(string ip, short rack, short slot, string? watchDogAddress = null, double interval = 100, ushort watchDogValueToWrite = 4500, int watchDogInterval = 100) | ||
{ | ||
if (rack < 0 || rack > 7) | ||
{ | ||
throw new ArgumentOutOfRangeException(nameof(rack), "Rack must be between 0 and 7"); | ||
} | ||
|
||
if (slot < 1 || slot > 31) | ||
{ | ||
throw new ArgumentOutOfRangeException(nameof(slot), "Slot must be between 1 and 31"); | ||
} | ||
|
||
return new RxS7(Enums.CpuType.S7400, ip, rack, slot, watchDogAddress, interval, watchDogValueToWrite, watchDogInterval); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters