-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Z003pktn/library update firmware v3 1 0 (#36)
Remove Unnecessary Usings Implement Cancellationtoken in ServiceFactory Implement Cancellationtoken in ApiHttpClientRequestHandler Implement Cancellationtoken in ApiBackupHandler Implement Cancellationtoken in DirectoryHandler, FileHandler Implement Cancellationtoken in WebAppDeployer, ResourceHandler Extend ApiHttpClientRequestHandler for new Methods with Firmware V3.1.0 Api.GetQuantityStructures Api.ChangePassword Api.GetPasswordPolicy Api.GetAuthenticationMode WebServer.SetDefaultPage WebServer.ReadDefaultPage PlcProgram.DownloadProfilingData PlcProgram.Browse with CodeBlocks support Plc.ReadModeSelectorState Plc.SetSystemTime Plc.SetTimeSettings Alarms.Browse Alarms.Acknowledge Syslog.Browse DiagnosticBuffer.Browse Modules.DownloadServiceData Project.ReadLanguages
- Loading branch information
Showing
218 changed files
with
9,254 additions
and
4,439 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright (c) 2023, Siemens AG | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
namespace Siemens.Simatic.S7.Webserver.API.Enums | ||
{ | ||
/// <summary> | ||
/// The acknowledgement state of the alarm | ||
/// </summary> | ||
public enum ApiAlarmAcknowledgementState | ||
{ | ||
/// <summary> | ||
/// Alarm is not acknowledged | ||
/// </summary> | ||
Not_Acknowledged = 0, | ||
/// <summary> | ||
/// Alarm is acknowledged | ||
/// </summary> | ||
Acknowledged = 1 | ||
} | ||
} |
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,53 @@ | ||
// Copyright (c) 2023, Siemens AG | ||
// | ||
// SPDX-License-Identifier: MIT | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
using System.Runtime.Serialization; | ||
|
||
namespace Siemens.Simatic.S7.Webserver.API.Enums | ||
{ | ||
/// <summary> | ||
/// Possible filters for ApiAlarmsBrowse request | ||
/// </summary> | ||
[JsonConverter(typeof(StringEnumConverter))] | ||
public enum ApiAlarmsBrowseFilterAttribute | ||
{ | ||
/// <summary> | ||
/// Filter for the alarm text. | ||
/// </summary> | ||
[EnumMember(Value = "alarm_text")] | ||
AlarmText = 1, | ||
/// <summary> | ||
/// Filter for the info text. | ||
/// </summary> | ||
[EnumMember(Value = "info_text")] | ||
InfoText = 2, | ||
/// <summary> | ||
/// Filter for the alarm status. The value will contain either "incoming" or "outgoing". | ||
/// </summary> | ||
[EnumMember(Value = "status")] | ||
Status = 3, | ||
/// <summary> | ||
/// Filter for the UTC timestamp on when the alarm went into incoming or outgoing state, provided as ISO 8601 string. <br/> | ||
/// This attribute does not consider the timestamp of acknowledgement. The precision will be in nanoseconds. | ||
/// </summary> | ||
[EnumMember(Value = "timestamp")] | ||
Timestamp = 4, | ||
/// <summary> | ||
/// Filter for the acknowledgement. The acknowledgement exist if the alarm is acknowledgeable. If the alarm was not configured as acknowledgeable alarm, then no acknowledgement will be returned regardless of this filter. | ||
/// </summary> | ||
[EnumMember(Value = "acknowledgement")] | ||
Acknowledgement = 5, | ||
/// <summary> | ||
/// Filter for the the alarm number. | ||
/// </summary> | ||
[EnumMember(Value = "alarm_number")] | ||
AlarmNumber = 6, | ||
/// <summary> | ||
/// Filter for the producer of the alarm. | ||
/// </summary> | ||
[EnumMember(Value = "producer")] | ||
Producer = 7 | ||
} | ||
} |
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) 2023, Siemens AG | ||
// | ||
// SPDX-License-Identifier: MIT | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
using Newtonsoft.Json.Serialization; | ||
|
||
namespace Siemens.Simatic.S7.Webserver.API.Enums | ||
{ | ||
/// <summary> | ||
/// User Authentication modes of the PLC.<br/> | ||
/// Depends on the configured user management which authentication modes will be supported by the PLC<br/> | ||
/// based on the authentication mode. | ||
/// </summary> | ||
[JsonConverter(typeof(StringEnumConverter), converterParameters: typeof(SnakeCaseNamingStrategy))] | ||
public enum ApiAuthenticationMode | ||
{ | ||
/// <summary> | ||
/// Legacy User Management | ||
/// </summary> | ||
Static, | ||
/// <summary> | ||
/// Only Anonymous user is available | ||
/// </summary> | ||
Disabled, | ||
/// <summary> | ||
/// The users are stored on the PLC | ||
/// </summary> | ||
Local | ||
} | ||
} |
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,27 @@ | ||
// Copyright (c) 2023, Siemens AG | ||
// | ||
// SPDX-License-Identifier: MIT | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
using System.Runtime.Serialization; | ||
|
||
namespace Siemens.Simatic.S7.Webserver.API.Enums | ||
{ | ||
/// <summary> | ||
/// The mode if the attributes shall either be included or excluded. | ||
/// </summary> | ||
[JsonConverter(typeof(StringEnumConverter))] | ||
public enum ApiBrowseFilterMode | ||
{ | ||
/// <summary> | ||
/// The response will include the listed attributes and exclude the others. | ||
/// </summary> | ||
[EnumMember(Value = "include")] | ||
Include = 0, | ||
/// <summary> | ||
/// The response will exclude the listed attributes and include the others. | ||
/// </summary> | ||
[EnumMember(Value = "exclude")] | ||
Exclude = 1, | ||
} | ||
} |
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,45 @@ | ||
// Copyright (c) 2023, Siemens AG | ||
// | ||
// SPDX-License-Identifier: MIT | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
using Newtonsoft.Json.Serialization; | ||
|
||
namespace Siemens.Simatic.S7.Webserver.API.Enums | ||
{ | ||
/// <summary> | ||
/// Represents the days of the week | ||
/// </summary> | ||
[JsonConverter(typeof(StringEnumConverter), converterParameters: typeof(SnakeCaseNamingStrategy))] | ||
public enum ApiDayOfWeek | ||
{ | ||
/// <summary> | ||
/// Sunday | ||
/// </summary> | ||
Sun = 1, | ||
/// <summary> | ||
/// Monday | ||
/// </summary> | ||
Mon = 2, | ||
/// <summary> | ||
/// Tuesday | ||
/// </summary> | ||
Tue = 3, | ||
/// <summary> | ||
/// Wednesday | ||
/// </summary> | ||
Wed = 4, | ||
/// <summary> | ||
/// Thursday | ||
/// </summary> | ||
Thu = 5, | ||
/// <summary> | ||
/// Friday | ||
/// </summary> | ||
Fri = 6, | ||
/// <summary> | ||
/// Saturday | ||
/// </summary> | ||
Sat = 7 | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
src/Webserver.API/Enums/ApiDiagnosticBufferBrowseFilterAttributes.cs
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,32 @@ | ||
// Copyright (c) 2023, Siemens AG | ||
// | ||
// SPDX-License-Identifier: MIT | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
using System.Runtime.Serialization; | ||
|
||
namespace Siemens.Simatic.S7.Webserver.API.Enums | ||
{ | ||
/// <summary> | ||
/// Possible filters for ApiDiagnosticBufferBrowse request | ||
/// </summary> | ||
[JsonConverter(typeof(StringEnumConverter))] | ||
public enum ApiDiagnosticBufferBrowseFilterAttributes | ||
{ | ||
/// <summary> | ||
/// Filter for the short diagnostic buffer text. | ||
/// </summary> | ||
[EnumMember(Value = "short_text")] | ||
ShortText = 1, | ||
/// <summary> | ||
/// Filter for the long diagnostic buffer text. | ||
/// </summary> | ||
[EnumMember(Value = "long_text")] | ||
LongText = 2, | ||
/// <summary> | ||
/// Filter for the help text message in case of an incoming event. | ||
/// </summary> | ||
[EnumMember(Value = "help_text")] | ||
HelpText = 3, | ||
} | ||
} |
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,25 @@ | ||
// Copyright (c) 2023, Siemens AG | ||
// | ||
// SPDX-License-Identifier: MIT | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
using Newtonsoft.Json.Serialization; | ||
|
||
namespace Siemens.Simatic.S7.Webserver.API.Enums | ||
{ | ||
/// <summary> | ||
/// The type defines if the requested hardware identifier represents either the safety PLC itself or another failsafe module. | ||
/// </summary> | ||
[JsonConverter(typeof(StringEnumConverter), converterParameters: typeof(SnakeCaseNamingStrategy))] | ||
public enum ApiFailsafeHardwareType | ||
{ | ||
/// <summary> | ||
/// The hw id is a CPU | ||
/// </summary> | ||
F_cpu, | ||
/// <summary> | ||
/// The hw id is a module | ||
/// </summary> | ||
F_module | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright (c) 2023, Siemens AG | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
namespace Siemens.Simatic.S7.Webserver.API.Enums | ||
{ | ||
/// <summary> | ||
/// The status of the entry. Either incoming or outgoing. | ||
/// </summary> | ||
public enum ApiObjectDirectoryStatus | ||
{ | ||
/// <summary> | ||
/// The entry is incoming | ||
/// </summary> | ||
Incoming = 1, | ||
/// <summary> | ||
/// The entry is outgoing | ||
/// </summary> | ||
Outgoing = 2 | ||
} | ||
} |
Oops, something went wrong.