Skip to content

Commit 13a5c69

Browse files
committed
Refactor WebApiConnector and update build scripts
- Filter writable primitives in WriteBatchAsync method. - Update expected Apax version from 3.5.0 to 4.0.0. - Change build command in delta and full download scripts.
1 parent 2faa15a commit 13a5c69

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/AXSharp.connectors/src/AXSharp.Connector.S71500.WebAPI/WebApiConnector.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,8 @@ public override async Task WriteBatchAsync(IEnumerable<ITwinPrimitive> primitive
475475
if (primitives == null || !primitives.Any()) return;
476476

477477
var responseData = new ApiBulkResponse();
478-
var twinPrimitives = primitives as ITwinPrimitive[] ?? primitives.ToArray();
478+
var writeEnabledPrimitives = primitives.Where(p => p.ReadWriteAccess == ReadWriteAccess.ReadWrite);
479+
var twinPrimitives = writeEnabledPrimitives as ITwinPrimitive[] ?? writeEnabledPrimitives.ToArray();
479480

480481
if (Logger.IsEnabled(LogEventLevel.Debug)) stopwatchWrite.Restart();
481482

src/scripts/check_requisites_apax.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apaxUrl="https://console.simatic-ax.siemens.io/"
2-
expectedApaxVersion="3.5.0"
2+
expectedApaxVersion="4.0.0"
33

44
export GREEN='\033[0;32m'
55
export RED='\033[0;31m'

src/scripts/sw_build_and_download_delta.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ if [ -z $PASSWORD ]; then
3939
exit 1
4040
fi
4141

42-
apax build --ignore-scripts
42+
apax build
4343
dotnet ixc
4444

4545
#sw_download_delta

src/scripts/sw_build_and_download_full.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ if [ -z $PASSWORD ]; then
3939
exit 1
4040
fi
4141

42-
apax build --ignore-scripts
42+
apax build
4343
dotnet ixc
4444

4545
#sw_download_full

0 commit comments

Comments
 (0)