Skip to content

Commit

Permalink
Merge pull request #23 from simatic-ax/chore/update_to_2405
Browse files Browse the repository at this point in the history
Chore/update_to_2405
  • Loading branch information
BeckerStS authored Jun 18, 2024
2 parents d4d5e32 + d799a4d commit 87d3f30
Show file tree
Hide file tree
Showing 8 changed files with 443 additions and 386 deletions.
763 changes: 387 additions & 376 deletions apax-lock.json

Large diffs are not rendered by default.

22 changes: 12 additions & 10 deletions apax.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,36 @@ version: 0.0.0-placeholder
author: Siemens AG
type: lib
# Description will be displayed in the apax extension
description: the windowtracking library supports you to track data of an item
which is transported on a conveyor belt for instance
description: The windowtracking library supports you to track data of an item which is transported on a conveyor belt for instance
#URL to the repository
repository:
type: git
url: https://github.com/simatic-ax/windowtracking
targets:
- "1500"
- llvm
# Registry information, where the package will be published
registries:
'@simatic-ax': 'https://npm.pkg.github.com/'
# Environment variables
variables:
APAX_BUILD_ARGS:
- '--debug'
# Install settings
installStrategy: strict
apaxVersion: 3.2.1
# Dependencies
devDependencies:
"@ax/sdk": 2311.0.1
"@simatic-ax/snippetscollection": 0.1.3
"@ax/sdk": 2405.0.0
"@simatic-ax/snippetscollection": 1.0.0
dependencies:
"@simatic-ax/simple-control-modules": 5.0.1
registries:
'@simatic-ax': 'https://npm.pkg.github.com/'
"@simatic-ax/simple-control-modules": 6.0.0
# Files which 'apax pack' will include
files:
- 'README.md'
- 'LICENSE.md'
- 'changelog.md'
- 'snippets'
- 'docs'
- 'src'
installStrategy: strict
apaxVersion: 3.1.0
- 'src' # ship library as src-files
# - 'bin' # ship library as bin-files
7 changes: 7 additions & 0 deletions test/ItemTest.st
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@ NAMESPACE Simatic.Ax.WindowTracking
CLASS ItemTest
VAR PROTECTED
i : ItemOneDestination;
iStateless : ItemOneDestination;
vt : VirtualTrigger;
ivt : IVirtualTrigger;
END_VAR

// This method will be called before each test method
{TestSetup}
METHOD PUBLIC MyTestSetup
i := iStateless;
END_METHOD

{Test}
METHOD PUBLIC Test_Count_with_no_deststination_expect_0
Equal(expected := i.DestinationCount(), actual := 0);
Expand Down
7 changes: 7 additions & 0 deletions test/TransportWindowTest.st
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,16 @@ NAMESPACE Simatic.Ax.WindowTracking

VAR PROTECTED
tw : TransportWindow;
twStateless : TransportWindow;
enc : EncoderMock;
END_VAR

// This method will be called before each test method
{TestSetup}
METHOD PUBLIC MyTestSetup
tw := twStateless;
END_METHOD

{Test}
METHOD PUBLIC Test_Encode_NULL_Expect_False
Equal(expected := FALSE, actual := tw.CalcPosition());
Expand Down
9 changes: 9 additions & 0 deletions test/TransportWindowsListTest.st
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ NAMESPACE Simatic.Ax.WindowTracking

VAR PROTECTED
tws : TransportWindowList;
twsStateless : TransportWindowList;
enc : EncoderMock;
encStateless : EncoderMock;
v1 : VirtualTrigger := (Position := 100, Id := UINT#1);
v2 : VirtualTrigger := (Position := 200, Id := UINT#2);
te1 : TriggerEventMock;
Expand All @@ -25,6 +27,13 @@ NAMESPACE Simatic.Ax.WindowTracking
tws.TriggerPointList := tl;
END_METHOD

// This method will be called before each test method
{TestSetup}
METHOD PUBLIC MyTestSetup
tws := twsStateless;
enc := encStateless;
END_METHOD

{Test}
METHOD PUBLIC Evaluate_a_empty_list_expect_False
Equal(expected := FALSE, actual := tws.Evaluate());
Expand Down
7 changes: 7 additions & 0 deletions test/VirtualTriggerListTest.st
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ NAMESPACE Simatic.Ax.WindowTracking
CLASS TestVirtualTriggerList
VAR PROTECTED
tl : VirtualTriggerList;
tlStateless : VirtualTriggerList;
trig1 : VirtualTrigger := (Id := UINT#1, Position := 1100);
trig2 : VirtualTrigger := (Id := UINT#2, Position := 1200);
trig3 : VirtualTrigger := (Id := UINT#3, Position := 1300);
Expand All @@ -26,6 +27,12 @@ NAMESPACE Simatic.Ax.WindowTracking
tl.Add(tp := trig4);
END_METHOD

// This method will be called before each test method
{TestSetup}
METHOD PUBLIC MyTestSetup
tl := tlStateless;
END_METHOD

{Test}
METHOD PUBLIC TestCount_elements_expect_4
THIS.SetupTriggerList();
Expand Down
7 changes: 7 additions & 0 deletions test/VirtualTriggerTest.st
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ NAMESPACE Simatic.Ax.WindowTracking
CLASS TestVirtualTrigger
VAR PROTECTED
vt : VirtualTrigger;
vtStateless : VirtualTrigger;
evt : TriggerEventMock;
tw : TransportWindow;
enc : EncoderMock;
Expand All @@ -15,6 +16,12 @@ NAMESPACE Simatic.Ax.WindowTracking
vt.Id := UINT#10;
END_METHOD

// This method will be called before each test method
{TestSetup}
METHOD PUBLIC MyTestSetup
vt := vtStateless;
END_METHOD

{Test}
METHOD PUBLIC Test_Activate_method_with_no_event_expect_NullReferecne
VAR_TEMP
Expand Down
7 changes: 7 additions & 0 deletions test/WindowingIntegrativeTest.st
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ NAMESPACE Simatic.Ax.WindowTracking
CLASS WindowingIntegraiveTest
VAR PROTECTED
twl : TransportWindowList;
twlStateless : TransportWindowList;
tpl : VirtualTriggerList;

tp1 : VirtualTrigger;
Expand All @@ -22,6 +23,12 @@ NAMESPACE Simatic.Ax.WindowTracking
tpl.Add(tp1);
END_METHOD

// This method will be called before each test method
{TestSetup}
METHOD PUBLIC MyTestSetup
twl := twlStateless;
END_METHOD

{Test}
METHOD PUBLIC Test_Crate3_Windows_with_distance_20
THIS.Setup();
Expand Down

0 comments on commit 87d3f30

Please sign in to comment.