diff --git a/.github/workflows/build-library.yml b/.github/workflows/build-library.yml index 51fa2e2..e2c2e29 100644 --- a/.github/workflows/build-library.yml +++ b/.github/workflows/build-library.yml @@ -7,4 +7,4 @@ jobs: APAX_TOKEN: ${{ secrets.APAX_TOKEN }} SIMATIC_AX_TOKEN: ${{ secrets.DEPLOY_KEY }} with: - LOGIN_SIMATIC_AX: true \ No newline at end of file + LOGIN_SIMATIC_AX: true diff --git a/README.md b/README.md index cad0287..aa9735a 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,14 @@ ## Description -This library provides some functions to convert Integer values to Strings and Strings to Integer values. +This library provides some functions to convert various data types and formats into other formats that are not covered by the built-in functionalities. -## Install this package tesxt +Currently, there are two categories: + +- Converting integer values to Strings and Strings to Integer values +- Converting time formats from different systems + +## Install this package Enter: @@ -20,15 +25,16 @@ apax add @simatic-ax/conversion Simatic.Ax.Conversion; Simatic.Ax.Conversion.Integer; Simatic.Ax.Conversion.Strings; +Simatic.Ax.Conversion.Times; ``` -## ConversionMode +## ConversionMode for strings ```iecst NAMESPACE Simatic.Ax.Conversion TYPE ConversionMode : WORD ( - NONE := WORD#16#0000, + NONE := WORD#16#0000, FORCE_SIGN := WORD#16#0001 END_TYPE END_NAMESPACE @@ -74,6 +80,14 @@ Strings.ToInt(str : STRING, value => ULINT) : BOOL; > Values > MAX ULINT will handled as MOD MAX_ULINT (MAX_ULINT = 18446744073709551615); +### Simotion Date and Time of Day <--> LDT + +```iecst + +LDateAndTimeToSimotionDateToD(SimaticTime : LDATE_AND_TIME, SimotionTime => DWORD, SimotionDate => DWORD); +SimotionDateToDToLDateAndTime(SimotionTime := DWORD, SimotionDate := DWORD) : LDATE_AND_TIME; +``` + ## Strings ### Strings.ToHex @@ -147,20 +161,41 @@ Convert a String "[123, 456, 789]" to an ARRAY[*] OF LINT and returns the number ## TRUNC -TRUNC() round a floating number no the next DINT value downwards zo zero +TRUNC() round a floating number no the next DINT value downwards to zero ```iecst TRUNC(value : LREAL) : DINT; TRUNC(value : REAL) : DINT; ``` +### Times + +Convert the date and time of a SIMOTION system into the data type LDATE_AND_TIME (LDT) and back. The SIMOTION format is a structured data type consisting of two 32-bit values. For the sake of simplicity, they are interpeted as DWORD. + +```iecst +NAMESPACE Simatic.Ax.Conversion.Times + TYPE + SimotionDateTime : STRUCT + SimotionTime : DWORD; + SimotionDate : DWORD; + END_STRUCT; + END_TYPE +END_NAMESPACE +``` + +||| +|-|-| +|SimotionTime : DWORD|Milliseconds that have passed on the current day| +|SimotionDate : DWORD|Days that have passed since 1992-01-01| +|SimaticTime : LDATE_AND_TIME|Nanoseconds that have passed since 1970-01-01-00:00:00.000| + ## Contribution Thanks for your interest in contributing. Anybody is free to report bugs, unclear documentation, and other problems regarding this repository in the Issues section or, even better, is free to propose any changes to this repository using Merge Requests. ## Markdownlint-cli -This workspace will be checked by the [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli) (there is also documented ho to install the tool) tool in the CI workflow automatically. +This workspace will be checked by the [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli) (there is also documented ho to install the tool) tool in the CI workflow automatically. To avoid, that the CI workflow fails because of the markdown linter, you can check all markdown files locally by running the markdownlint with: ```sh diff --git a/apax-lock.json b/apax-lock.json index 75fb503..8f75703 100644 --- a/apax-lock.json +++ b/apax-lock.json @@ -1,399 +1,705 @@ { - "@ax/apax-build": { - "version": "0.7.0", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/apax-build/-/apax-build-0.7.0.tgz", - "integrity": "sha512-OkmqLq6SI0gv9x/7FLFmABuJYylHHyOzZ4Kvmfys2RGiP06/WbOpycmuqYBneK1zAe3KoBu8ZmelPdXbxcK4+w==" - }, - "@ax/axunit": { - "version": "4.0.6", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunit/-/axunit-4.0.6.tgz", - "integrity": "sha512-zuXuKxqHeP0fdn2cG/CbpogjYAweIwBKpDwZzSrzTG9tCM/axK/c3MZ/+DUN8aINdcyy0NdWTX6Z7kaU68nQBA==", - "dependencies": { - "@ax/axunit-docs": "4.0.6", - "@ax/axunit-library": "4.0.6", - "@ax/axunit-llvm-runner-gen": "4.0.6", - "@ax/axunit-runner-llvm": "4.0.6", - "@ax/axunit-runner-mc7plus": "4.0.6", - "@ax/build-native": "10.1.1", - "@ax/target-axunit": "4.0.6" - } - }, - "@ax/axunit-docs": { - "version": "4.0.6", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunit-docs/-/axunit-docs-4.0.6.tgz", - "integrity": "sha512-IjZke615I44O7NzPO3nuMzPyaaw6lwZ0zxNjNiNqqegITz7BTxhYfRsNEK2EUISc4S3c9f1vY6oT9AuY/cqm6g==" - }, - "@ax/axunit-library": { - "version": "4.0.6", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunit-library/-/axunit-library-4.0.6.tgz", - "integrity": "sha512-sgg1SNngQ9lTP/v8e+AyZq6hCf+563P3S4xep6uCdHIZMmW9GYkvKTjh56+ZKQMpGFrcr9Sn0Aw6dE7mbINwXg==" - }, - "@ax/axunit-llvm-runner-gen": { - "version": "4.0.6", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunit-llvm-runner-gen/-/axunit-llvm-runner-gen-4.0.6.tgz", - "integrity": "sha512-yL9TSEvBX1Wu5ohFAm07XRQfOHPUmHm6D17CB09mVssYec2VcBl1ORmqomVxTQhGVO4Zxsv5t+qgtBMx+/aytQ==" - }, - "@ax/axunit-ls-contrib": { - "version": "4.0.6", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunit-ls-contrib/-/axunit-ls-contrib-4.0.6.tgz", - "integrity": "sha512-BNES+gbcdqEnkzyNeEBnl35Vx8ABkaZOoMdTiiK4ffFy5Y51lY7ZLy9YXQdrvCev8b5xhViWlQMljLSiMRtyZA==" - }, - "@ax/axunit-runner-llvm": { - "version": "4.0.6", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunit-runner-llvm/-/axunit-runner-llvm-4.0.6.tgz", - "integrity": "sha512-YMt1iet7rDxV0sDF0DDoLBmFZZ7O+qW3JhP4faUiOwJRy0GLkyrjYbVuMkOJAeScu4pykgjUe0yNjLZ9c/Nlxw==", - "dependencies": { - "@ax/axunit-runner-llvm-linux-x64": "4.0.6", - "@ax/axunit-runner-llvm-win-x64": "4.0.6" - } - }, - "@ax/axunit-runner-llvm-linux-x64": { - "version": "4.0.6", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunit-runner-llvm-linux-x64/-/axunit-runner-llvm-linux-x64-4.0.6.tgz", - "integrity": "sha512-Za0+ZaWLJDnSR+7Bsr1f1Chh55JvH1tdWtJNtIjNFfpI5dkhQJ60/WCffP7khyNpcRvi2u3wLd1gtbMnXGNJNA==", - "os": [ - "linux" - ], - "cpu": [ - "x64" - ] - }, - "@ax/axunit-runner-llvm-win-x64": { - "version": "4.0.6", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunit-runner-llvm-win-x64/-/axunit-runner-llvm-win-x64-4.0.6.tgz", - "integrity": "sha512-8TJ25XNcLvNLrc6U2r0lfd+CeAt+cMPFwShf3IlT21BS3KeZCmz8joG1YPTq5OyKChEjg5ez5mMg5BvleG7Ybg==", - "os": [ - "win32" - ], - "cpu": [ - "x64" - ] - }, - "@ax/axunit-runner-mc7plus": { - "version": "4.0.6", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunit-runner-mc7plus/-/axunit-runner-mc7plus-4.0.6.tgz", - "integrity": "sha512-TrXheqFtzGwUYXKLjaLINU0Gkl54Qp88OFjCnrmaF71z8vOP3xJ5wtGyzYx9b9bPlub7ZIcr7PvSakn2FA21PQ==", - "dependencies": { - "@ax/axunit-runner-mc7plus-win-x64": "4.0.6" - } - }, - "@ax/axunit-runner-mc7plus-win-x64": { - "version": "4.0.6", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunit-runner-mc7plus-win-x64/-/axunit-runner-mc7plus-win-x64-4.0.6.tgz", - "integrity": "sha512-2oavPsnLEtgOeMCUjtTJSDwgDZ7SMZ6FVko51K4vO+T/O0ZRyD7eEgOBjBY0BjBTYLXTu5DNFxVnJqCvstSHzg==", - "os": [ - "win32" - ], - "cpu": [ - "x64" - ] - }, - "@ax/build-native": { - "version": "10.1.1", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/build-native/-/build-native-10.1.1.tgz", - "integrity": "sha512-C1Pwo0dMa21gV1CbqT9umaurHPY4otd8dvlx7zVOlXfEmbgACort5u3K7TeWMNSLdsuBvfkivxrZNWsOkHTtAQ==", - "dependencies": { - "@ax/build-native-linux": "10.1.1", - "@ax/build-native-winx64": "10.1.1", - "@ax/third-party-licenses-build-native": "10.1.1" - } - }, - "@ax/build-native-linux": { - "version": "10.1.1", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/build-native-linux/-/build-native-linux-10.1.1.tgz", - "integrity": "sha512-dNNWZGLl8+CtHvojcU+7c3bLFKehkzulrpDdmxzRGq2cb1GwokoNPUBRqB0yQtbW0pTJkXvUAuI9qf8T48PTew==", - "os": [ - "linux" - ], - "cpu": [ - "x64" - ], - "dependencies": { - "@ax/third-party-licenses-build-native": "10.1.1" - } - }, - "@ax/build-native-winx64": { - "version": "10.1.1", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/build-native-winx64/-/build-native-winx64-10.1.1.tgz", - "integrity": "sha512-kZnFeTxt+GoVeo+IXTqlGMRLt5iwwtSdpXpyPdyM5DAOAafU2pyBrl7ZkR8SOtwbTG7eXxGrHo5w/rMmhHLZkA==", - "os": [ - "win32" - ], - "cpu": [ - "x64" - ], - "dependencies": { - "@ax/third-party-licenses-build-native": "10.1.1" - } - }, - "@ax/mod": { - "version": "0.19.6", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/mod/-/mod-0.19.6.tgz", - "integrity": "sha512-ox1VIJyq7UgI+73LIwzjCxLSfOLK1PTOveiW/JwqMJWhdpg0MK+UiV8N8LhTxdciXLb4KVB0TmsteEou12SfEQ==", - "dependencies": { - "@ax/mod-linux-x64": "0.19.6", - "@ax/mod-win-x64": "0.19.6" - } - }, - "@ax/mod-linux-x64": { - "version": "0.19.6", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/mod-linux-x64/-/mod-linux-x64-0.19.6.tgz", - "integrity": "sha512-n1TP1N+e1CHWIi1BT8h2wu6oQgny23COPqK1q34HduS7Ws3DkNUwmSwt/ypzZcUkrs/ZDLJVzrzyZ9s2TcrCmA==", - "os": [ - "linux" - ], - "cpu": [ - "x64" - ] - }, - "@ax/mod-win-x64": { - "version": "0.19.6", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/mod-win-x64/-/mod-win-x64-0.19.6.tgz", - "integrity": "sha512-RRo9oEoKL/XUxwHN3lPHgUDrAuDFQsN96ai9UnEuVrOV6ORNqV2UF3pEERT2Y9yPQBubwr94dPSbtZuGJLimkQ==", - "os": [ - "win32" - ], - "cpu": [ - "x64" - ] - }, - "@ax/mon": { - "version": "0.19.6", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/mon/-/mon-0.19.6.tgz", - "integrity": "sha512-1DzxTbM7hezqKfjWvFppoVURyglO/vDx8yY/ygtOHzp2vN/fgkDS5b0i1ZMYNb8Cqh5bmWiUxef1KCPPuqiLcg==", + "name": "@simatic-ax/conversion", + "version": "0.0.0-placeholder", + "lockFileVersion": "2", + "installStrategy": "strict", + "root": { + "name": "@simatic-ax/conversion", + "version": "0.0.0-placeholder", "dependencies": { - "@ax/mon-linux-x64": "0.19.6", - "@ax/mon-win-x64": "0.19.6" + "@ax/system-strings": "6.0.94", + "@ax/system-math": "6.0.94" + }, + "devDependencies": { + "@ax/sdk": "2311.0.1", + "@simatic-ax/snippetscollection": "0.1.3" } }, - "@ax/mon-linux-x64": { - "version": "0.19.6", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/mon-linux-x64/-/mon-linux-x64-0.19.6.tgz", - "integrity": "sha512-aruXr5+pkXulrf7+AOr6BbtaIUuS2BEmRmr0p5xfxLVfFmqSGspYQK1KCVh4k3lS6f87BQPMviAHXxWElmyvWA==", - "os": [ - "linux" - ], - "cpu": [ - "x64" - ] - }, - "@ax/mon-win-x64": { - "version": "0.19.6", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/mon-win-x64/-/mon-win-x64-0.19.6.tgz", - "integrity": "sha512-suwh5N+dFMNJIgukWp3pzw8QxRzD+ae+tIxZUzHKMV91QbPbcNKJztCqa9y1dRBZyeurz+De5VZUpxZMaRobvw==", - "os": [ - "win32" - ], - "cpu": [ - "x64" - ] - }, - "@ax/sdb": { - "version": "0.19.6", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/sdb/-/sdb-0.19.6.tgz", - "integrity": "sha512-1H2E6VcaYfhGtxnFC58pjekMp8c3ule/byEISTc5G1AWgHV7+ANZtGAgXWIPimYIF5+u6JL/qd4JT94gCweJrA==", - "dependencies": { - "@ax/sdb-linux-x64": "0.19.6", - "@ax/sdb-win-x64": "0.19.6" + "packages": { + "@ax/sdk": { + "name": "@ax/sdk", + "version": "2311.0.1", + "integrity": "sha512-uPAnfHnc9Tl7ugVFjA3Qc7K1CNwEF7CPfMRdZS/hO2aNeMXLlfxOc/Mm1R5hP8pF+XQgjhyvwm/Zy/e1rghKWQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/sdk/-/sdk-2311.0.1.tgz", + "dependencies": { + "@ax/axunitst": "4.1.8", + "@ax/axunitst-ls-contrib": "4.1.8", + "@ax/mod": "1.0.4", + "@ax/mon": "1.0.4", + "@ax/sdb": "1.0.4", + "@ax/sld": "2.0.5", + "@ax/st": "2311.0.1", + "@ax/target-llvm": "6.0.146", + "@ax/target-mc7plus": "6.0.146", + "@ax/simatic-pragma-stc-plugin": "2.0.12", + "@ax/trace": "2.7.0", + "@ax/diagnostic-buffer": "1.2.0", + "@ax/performance-info": "1.1.0", + "@ax/plc-info": "2.3.0", + "@ax/certificate-management": "1.1.0" + } + }, + "@simatic-ax/snippetscollection": { + "name": "@simatic-ax/snippetscollection", + "version": "0.1.3", + "integrity": "sha512-YcuBXUs4VeW60LLdJ/p7p2aCXWxhrzHg4YEmMKtDOLPjL7EWbQT+4RUNoE2PANv7VTX/hr9+iLjR5ahfKp2utA==", + "resolved": "https://npm.pkg.github.com/download/@simatic-ax/snippetscollection/0.1.3/e287ad803a10c04ed92a9b73eb1b735ca267212f", + "dependencies": {} + }, + "@ax/system-strings": { + "name": "@ax/system-strings", + "version": "6.0.94", + "integrity": "sha512-iGh5v//U+az23N1SG+rgPassm7mUV6MSdLnE+6a7g1u7e6lHbrsnAbfKqIk7UNHEFFfp52WK1k5B6Igo0s3/1A==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/system-strings/-/system-strings-6.0.94.tgz", + "dependencies": { + "@ax/system-math": "6.0.94", + "@ax/system-datetime": "6.0.94" + } + }, + "@ax/system-math": { + "name": "@ax/system-math", + "version": "6.0.94", + "integrity": "sha512-lmkqZnJRT6zjAaVEKgWDwB1J7st+rgj/lfJc+6PZ/zgiRxoJ/s7BSTl/6YQ6k12RskKrA4E5VvLiqJhaNd3ssw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/system-math/-/system-math-6.0.94.tgz", + "dependencies": {} + }, + "@ax/axunitst": { + "name": "@ax/axunitst", + "version": "4.1.8", + "integrity": "sha512-Ax4b503soS4RrfokQg5NbhqFOSJ7cKIzK8bNwtobWHy9asUPUbuwQhsILGETFh+T7cw8FGzFZ/VzKOL6tkhq8A==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst/-/axunitst-4.1.8.tgz", + "dependencies": { + "@ax/axunitst-library": "4.1.8", + "@ax/axunitst-runner": "4.1.8", + "@ax/axunitst-generator": "4.1.8", + "@ax/axunitst-llvm-runner-gen": "4.1.8", + "@ax/axunitst-docs": "4.1.8", + "@ax/build-native": "16.0.3" + } + }, + "@ax/axunitst-ls-contrib": { + "name": "@ax/axunitst-ls-contrib", + "version": "4.1.8", + "integrity": "sha512-dCrf/Ou/NT0zFh6wVXSxYphHOjLoUgOBJWDIBVzBpRDbhCebA/BuHLmVVGMllujkMreMlGRITjjquuqILquOAA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-ls-contrib/-/axunitst-ls-contrib-4.1.8.tgz", + "dependencies": {} + }, + "@ax/mod": { + "name": "@ax/mod", + "version": "1.0.4", + "integrity": "sha512-AU/OiEf3J9/wo+kSDYLjIRd19ajOpgASs5J2MHOVlP8eOaupZ1pAkIIUvXBcBuS8M42l5kXEw7G18dTcW9j1ng==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/mod/-/mod-1.0.4.tgz", + "dependencies": { + "@ax/mod-win-x64": "1.0.4", + "@ax/mod-linux-x64": "1.0.4" + } + }, + "@ax/mon": { + "name": "@ax/mon", + "version": "1.0.4", + "integrity": "sha512-HBFdgbTqHtXwq/42nyTnEupX3/WT+ltPFlumVhksd7+Oh9oR2HUSWf5t/GkfjR7LY7W32h5Gb7wpnHNU6Qm7cA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/mon/-/mon-1.0.4.tgz", + "dependencies": { + "@ax/mon-win-x64": "1.0.4", + "@ax/mon-linux-x64": "1.0.4" + } + }, + "@ax/sdb": { + "name": "@ax/sdb", + "version": "1.0.4", + "integrity": "sha512-9GZRZE5TX7wCJBzabtohFP+L9CzVgn+wIYRJyYhmuX1Y6dMF8+rgChTcc1vjq8bQHFx2ovkt57xvoFoEbs/Wag==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/sdb/-/sdb-1.0.4.tgz", + "dependencies": { + "@ax/sdb-win-x64": "1.0.4", + "@ax/sdb-linux-x64": "1.0.4" + } + }, + "@ax/sld": { + "name": "@ax/sld", + "version": "2.0.5", + "integrity": "sha512-upa0HyRVdYyzNu6j7E+gTAnpzP2mfZxvo+0jbm8H6Ci9ergL56SHaCVBC35PnociMZpdZ5d1/LTy6f8lwpDxXA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/sld/-/sld-2.0.5.tgz", + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/st": { + "name": "@ax/st", + "version": "2311.0.1", + "integrity": "sha512-n4Lqd2Gom1otRVGBu0hpYnT4dIvb0PVdcqo/3qVgMGKNjsMnKJAk9hKfnmcBhpHHt5U2IOIaiPgI3EuOEjL3LA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/st/-/st-2311.0.1.tgz", + "dependencies": { + "@ax/stc": "6.0.146", + "@ax/apax-build": "0.7.0", + "@ax/st-ls": "3.0.113" + } + }, + "@ax/target-llvm": { + "name": "@ax/target-llvm", + "version": "6.0.146", + "integrity": "sha512-HiaiuX/O6nOUOX+xTcaMIHGLdAY4+KQW7Xwj39XCKLC/M54bhqiz2XOpde0g3jeUVuBeimf8UdTD3+MTva6l0A==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-llvm/-/target-llvm-6.0.146.tgz", + "dependencies": { + "@ax/target-llvm-win-x64": "6.0.146", + "@ax/target-llvm-linux-x64": "6.0.146" + } + }, + "@ax/target-mc7plus": { + "name": "@ax/target-mc7plus", + "version": "6.0.146", + "integrity": "sha512-WTktM/4O5XbXU+5rfpee6d02gl6AcRadFCgtkrYYD9rA4MShhPrYRREFn1dC9SfifOmWPqLX6i/qrfGMCG0n2w==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-mc7plus/-/target-mc7plus-6.0.146.tgz", + "dependencies": { + "@ax/target-mc7plus-win-x64": "6.0.146", + "@ax/target-mc7plus-linux-x64": "6.0.146" + } + }, + "@ax/simatic-pragma-stc-plugin": { + "name": "@ax/simatic-pragma-stc-plugin", + "version": "2.0.12", + "integrity": "sha512-KLo6lEPU5NfahK6Rr9MBlItSMU4VO+vePUGhk5nooM/1TZYtekJnLE4xRoZLeiMk+MA6glodTw6YkPzl7p7z4A==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/simatic-pragma-stc-plugin/-/simatic-pragma-stc-plugin-2.0.12.tgz", + "dependencies": {} + }, + "@ax/trace": { + "name": "@ax/trace", + "version": "2.7.0", + "integrity": "sha512-yUmzjL5IKJ9NX5Q1THHN+LtW6llsZa+tw/jRZYQzKcxXTFJrGcCo5Qy45Dh0loxWGjZKmIe4YVG1ZwP3fdihJQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/trace/-/trace-2.7.0.tgz", + "dependencies": { + "@ax/trace-win-x64": "2.7.0", + "@ax/trace-linux-x64": "2.7.0" + } + }, + "@ax/diagnostic-buffer": { + "name": "@ax/diagnostic-buffer", + "version": "1.2.0", + "integrity": "sha512-Ka0t/mftRpSOMXob9/u9IDY1aSm1DyLe81vwNqJ6RzQY/h6CNpDjnRpx79pGzQiGWozlvtg/Sot0prGYPbthbg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/diagnostic-buffer/-/diagnostic-buffer-1.2.0.tgz", + "dependencies": { + "@ax/diagnostic-buffer-win-x64": "1.2.0", + "@ax/diagnostic-buffer-linux-x64": "1.2.0" + } + }, + "@ax/performance-info": { + "name": "@ax/performance-info", + "version": "1.1.0", + "integrity": "sha512-vIgAbV63H9rVPYkS/Kz3AF38pMlI55oh3yReOUzEoXg8QmniOw81Ba5z//IeFpoZZyQJJG1lxtbYpVWvhCEqkA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/performance-info/-/performance-info-1.1.0.tgz", + "dependencies": { + "@ax/performance-info-win-x64": "1.1.0", + "@ax/performance-info-linux-x64": "1.1.0" + } + }, + "@ax/plc-info": { + "name": "@ax/plc-info", + "version": "2.3.0", + "integrity": "sha512-k+iOi1eUpVW5xBXRvdqS6Qj+ju2wQMsZIAZDvz32NDSv6HoAUTwMIEB5BA6xv9plRr1zi3jn99plslUshCEFPQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/plc-info/-/plc-info-2.3.0.tgz", + "dependencies": { + "@ax/plc-info-linux-x64": "2.3.0", + "@ax/plc-info-win-x64": "2.3.0" + } + }, + "@ax/certificate-management": { + "name": "@ax/certificate-management", + "version": "1.1.0", + "integrity": "sha512-u3S1uF3EC/EsxxxR3aM79QRLoH5UR2iLoGwj7DCN8CMalEalI6zyjyumm09MQ0vQc+Zje/vlyltD7OllsAqOuA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/certificate-management/-/certificate-management-1.1.0.tgz", + "dependencies": { + "@ax/certificate-management-win-x64": "1.1.0", + "@ax/certificate-management-linux-x64": "1.1.0" + } + }, + "@ax/system-datetime": { + "name": "@ax/system-datetime", + "version": "6.0.94", + "integrity": "sha512-8xn57nA5NfZ6ImTxmFGvzFp7wLL38JdUgjsuEg+xbzs29e8ftvbTCNqaWMVdX05N4QNAqohq2BlEkIyFtDH8Qg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/system-datetime/-/system-datetime-6.0.94.tgz", + "dependencies": {} + }, + "@ax/axunitst-library": { + "name": "@ax/axunitst-library", + "version": "4.1.8", + "integrity": "sha512-ue0V/EFANdrUA3j7BGr9j6TU1OFfKQBe29HN54CAHXvD1fzvr9gd+qoEHRiC41/KYVZarxi0XYcrQg4sbhh7Ew==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-library/-/axunitst-library-4.1.8.tgz", + "dependencies": { + "@ax/system-strings": "6.0.94" + } + }, + "@ax/axunitst-runner": { + "name": "@ax/axunitst-runner", + "version": "4.1.8", + "integrity": "sha512-Z0jnRjEWYVnaBIwXVHUncqp0GvwjTGMHH9avcHP5IisI9ierKrHnaJV/93mgntqgJY7BHLG8hanIoROPGc4ELA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-runner/-/axunitst-runner-4.1.8.tgz", + "dependencies": { + "@ax/axunitst-runner-linux-x64": "4.1.8", + "@ax/axunitst-runner-win-x64": "4.1.8" + } + }, + "@ax/axunitst-generator": { + "name": "@ax/axunitst-generator", + "version": "4.1.8", + "integrity": "sha512-AGzftAlftnpyZ52uQOYTK06Yu6ptKh2m1uvGRCRdDz16CCAM1FIKZZsppl6fnMmZkf6MZbkTx3nbZ74Zk5c1rw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-generator/-/axunitst-generator-4.1.8.tgz", + "dependencies": { + "@ax/axunitst-generator-linux-x64": "4.1.8", + "@ax/axunitst-generator-win-x64": "4.1.8" + } + }, + "@ax/axunitst-llvm-runner-gen": { + "name": "@ax/axunitst-llvm-runner-gen", + "version": "4.1.8", + "integrity": "sha512-XMmU+Qr1ElNFLJAnQ3JKh9QHr3/IPJo+KoR8C8sZqoIy/IzRCKY3IubvJ4KPGnBZzz+DI5UxIuH9bwvq5YWqIw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-llvm-runner-gen/-/axunitst-llvm-runner-gen-4.1.8.tgz", + "dependencies": {} + }, + "@ax/axunitst-docs": { + "name": "@ax/axunitst-docs", + "version": "4.1.8", + "integrity": "sha512-g4XsjaqZoJvYcz58ghirISMS/SfFl9UGNFJGr0afhLmYkqEyoLi6p9+zuLk4+SWtbMj3FNu/cc1ReSSS/GACEQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-docs/-/axunitst-docs-4.1.8.tgz", + "dependencies": {} + }, + "@ax/build-native": { + "name": "@ax/build-native", + "version": "16.0.3", + "integrity": "sha512-d7I0ICUaIwW/8v030Xw8H6fMMOD2FB9ON7pmq+XV+YXCPorTUJ7rCvq4+710B78QJn2ac+xJgpb1EhI1fiK40w==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/build-native/-/build-native-16.0.3.tgz", + "dependencies": { + "@ax/build-native-winx64": "16.0.3", + "@ax/build-native-linux": "16.0.3" + } + }, + "@ax/mod-win-x64": { + "name": "@ax/mod-win-x64", + "version": "1.0.4", + "integrity": "sha512-AQ9NUSaICMN/qPeX95SzZUj1/m4xULIltZ4V2JcMdi0VW9aoTZVPnVFHdE2gb+HwApyvrq73v9/Vcyq8cBkuKQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/mod-win-x64/-/mod-win-x64-1.0.4.tgz", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/mod-linux-x64": { + "name": "@ax/mod-linux-x64", + "version": "1.0.4", + "integrity": "sha512-Bs+MBPyKpPJiJ3m8PvQ/DgCsH2I2YG4Vcm1Q6DfCzozpSp2RrRO6a+5vxLrpCzgQhzSjS+2PWvgXoikMPV7v1Q==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/mod-linux-x64/-/mod-linux-x64-1.0.4.tgz", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/mon-win-x64": { + "name": "@ax/mon-win-x64", + "version": "1.0.4", + "integrity": "sha512-YT5sAL/40uPQV5KXCbddHChKY9obwBlesqWkJJwCQjvY+cSHMLort+VPaKdrNJdb1Z07zH7vnizIkgeYRpu0tw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/mon-win-x64/-/mon-win-x64-1.0.4.tgz", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/mon-linux-x64": { + "name": "@ax/mon-linux-x64", + "version": "1.0.4", + "integrity": "sha512-KHwaqwdFffRF4jK2v3AZJh92Fl6ZKwGdw/wK8Xgy/FzIi/JbRHN7q20gTdafHqBUJa8GPDWMSgMmTXd+S2usyQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/mon-linux-x64/-/mon-linux-x64-1.0.4.tgz", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/sdb-win-x64": { + "name": "@ax/sdb-win-x64", + "version": "1.0.4", + "integrity": "sha512-w3LFsmmAESRCjphKgjLGT+m4Ac9xWQnXjntM35pbQ0Tof/emgLFpi6LS/UBjexyCkxCts1rOKTMWKM1rXMStwg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/sdb-win-x64/-/sdb-win-x64-1.0.4.tgz", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/sdb-linux-x64": { + "name": "@ax/sdb-linux-x64", + "version": "1.0.4", + "integrity": "sha512-du8fDAPlfMH4bmleJatxusTkMCmWAJh/9hNZUi7XOweWf2v4/aXx0gcddSS9HPnLfpGCgVIP/YYDhcr+j7PqpQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/sdb-linux-x64/-/sdb-linux-x64-1.0.4.tgz", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/stc": { + "name": "@ax/stc", + "version": "6.0.146", + "integrity": "sha512-eYeRbTi6UsM3Np3rWJYfZ4p5m/5Md4AcarrvALXzaG5hP2a/08L306gYQhadsOEOVsBpMHlT9GtvV1vovjjctA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/stc/-/stc-6.0.146.tgz", + "dependencies": { + "@ax/stc-win-x64": "6.0.146", + "@ax/stc-linux-x64": "6.0.146" + } + }, + "@ax/apax-build": { + "name": "@ax/apax-build", + "version": "0.7.0", + "integrity": "sha512-OkmqLq6SI0gv9x/7FLFmABuJYylHHyOzZ4Kvmfys2RGiP06/WbOpycmuqYBneK1zAe3KoBu8ZmelPdXbxcK4+w==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/apax-build/-/apax-build-0.7.0.tgz", + "dependencies": {} + }, + "@ax/st-ls": { + "name": "@ax/st-ls", + "version": "3.0.113", + "integrity": "sha512-NhPfgwF8MQiUoyAr5rZm6cb5UhAHQ3sVvpFZ3+FdXMAMxxPe9i9/NQijKqSga9JJ4HHpUcizYVoOWc2XXA++zw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/st-ls/-/st-ls-3.0.113.tgz", + "dependencies": { + "@ax/st-ls-win-x64": "3.0.113", + "@ax/st-ls-linux-x64": "3.0.113" + } + }, + "@ax/target-llvm-win-x64": { + "name": "@ax/target-llvm-win-x64", + "version": "6.0.146", + "integrity": "sha512-V6h9Gtricl+K8M+gYF0EtWhBcoMeLgfFqARCO6nATelKkTdnJmvzsrr3CYe6nk6KQSk2r2l2U7yiVwyXHs4mOQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-llvm-win-x64/-/target-llvm-win-x64-6.0.146.tgz", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/target-llvm-linux-x64": { + "name": "@ax/target-llvm-linux-x64", + "version": "6.0.146", + "integrity": "sha512-8WMgh5PeM+Uof7nXQsqk3JEPdXOlK1ljtyNOcOfxlZAcDlHiKTKADMLzO3VFTJkxp6txsRXnSpLlVLsZxknl9g==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-llvm-linux-x64/-/target-llvm-linux-x64-6.0.146.tgz", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/target-mc7plus-win-x64": { + "name": "@ax/target-mc7plus-win-x64", + "version": "6.0.146", + "integrity": "sha512-06rOSJS1OI6+ApsFoe3sK0jjq3ZTt96sewg7GvEXztGTE/GTINWbbHqzr4TMCV9Fixk8hYWIiW5OAFG/kKDzfA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-mc7plus-win-x64/-/target-mc7plus-win-x64-6.0.146.tgz", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/target-mc7plus-linux-x64": { + "name": "@ax/target-mc7plus-linux-x64", + "version": "6.0.146", + "integrity": "sha512-CGmwLBrT1ZRw9f6L1FylbVHV7l2BP8drp/NJKRAApNBtYuVE5U4H2kndizUKYLR4wbidt6Amu602ncvcJBUKNw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-mc7plus-linux-x64/-/target-mc7plus-linux-x64-6.0.146.tgz", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/trace-win-x64": { + "name": "@ax/trace-win-x64", + "version": "2.7.0", + "integrity": "sha512-hQeCiax20UPrSQIOMqSJg6OWdavunL9h6Irnlrgk4ht4hMZrDEWPnuIBfPNG2tAp3780GtefEl8b8QSk5h7jxQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/trace-win-x64/-/trace-win-x64-2.7.0.tgz", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/trace-linux-x64": { + "name": "@ax/trace-linux-x64", + "version": "2.7.0", + "integrity": "sha512-LPfdNIbp9+7BuMFL/TtpQXGHrUx/+C1tTFC3YSWscP7TcHzDLWF3yBjqXHaNN01SmCi44S4AwJ9Q2E66QJ0Rtg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/trace-linux-x64/-/trace-linux-x64-2.7.0.tgz", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/diagnostic-buffer-win-x64": { + "name": "@ax/diagnostic-buffer-win-x64", + "version": "1.2.0", + "integrity": "sha512-s5TfWFlmB7ibgm9L5TRN7k1hJCkzCNBlNh08GT3uWtmq8pFg5BrYsYVWZe+GRUT1YEcP+0f9oA8Nnj5n1vM+sg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/diagnostic-buffer-win-x64/-/diagnostic-buffer-win-x64-1.2.0.tgz", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/diagnostic-buffer-linux-x64": { + "name": "@ax/diagnostic-buffer-linux-x64", + "version": "1.2.0", + "integrity": "sha512-aRm3Qvy4eBwSFBk5990uBfFRVa9E+fKGDJ69ufPL8U4Vw1/ma/cyFHVc8Zqv4ITO8673IClurfWsVIh6Gk4KCw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/diagnostic-buffer-linux-x64/-/diagnostic-buffer-linux-x64-1.2.0.tgz", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/performance-info-win-x64": { + "name": "@ax/performance-info-win-x64", + "version": "1.1.0", + "integrity": "sha512-yMfgZm2erMxxU3LJytyJKWWA9PN/vIXhZjXPhEpUXn+M+ojg+pXiRy+oLj5Z0Xo8NYd/bz780m/buAaIPMe2Iw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/performance-info-win-x64/-/performance-info-win-x64-1.1.0.tgz", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/performance-info-linux-x64": { + "name": "@ax/performance-info-linux-x64", + "version": "1.1.0", + "integrity": "sha512-5rFgfDdfijFVIFRfoQXv4MS/jgrk3Oe8sKJVRFluTs8hkMLg0AlWvVe171YbFOO1D3VI8O1yG8KFu3AKwF3bjw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/performance-info-linux-x64/-/performance-info-linux-x64-1.1.0.tgz", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/plc-info-linux-x64": { + "name": "@ax/plc-info-linux-x64", + "version": "2.3.0", + "integrity": "sha512-EUD170olqPo0aSOx/5auP8inlKNON0bstMSjtQDc/bqjXcKRxL6K6sg/JnierRO7OiJ5iXcTLIGO3cOBeXeAAw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/plc-info-linux-x64/-/plc-info-linux-x64-2.3.0.tgz", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/plc-info-win-x64": { + "name": "@ax/plc-info-win-x64", + "version": "2.3.0", + "integrity": "sha512-10M6F6HQV/nMk9n9pR17xvkx93O1ALOQTlLl3IMFzH9O/DXPSVzb4r3Q7KuVXd7OBpoWzt8Ab/ZvFzp98VXTGw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/plc-info-win-x64/-/plc-info-win-x64-2.3.0.tgz", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/certificate-management-win-x64": { + "name": "@ax/certificate-management-win-x64", + "version": "1.1.0", + "integrity": "sha512-iOQqNG3LHJ2m7WVgxFYhHThFJ5UblUGhcDKKxCJqAuGl9v+BPXq3v/8hWKzTqoeQanHNPCSG3+YCKivPFRDEMA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/certificate-management-win-x64/-/certificate-management-win-x64-1.1.0.tgz", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/certificate-management-linux-x64": { + "name": "@ax/certificate-management-linux-x64", + "version": "1.1.0", + "integrity": "sha512-U+ZfWotWeBjRRfHab2VgeRWtIvm5uh/IGtAkV1ZBebmjejuwgGwZdlfWa6g0pIccX330V6Jl2y+6jCUHjW1wUQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/certificate-management-linux-x64/-/certificate-management-linux-x64-1.1.0.tgz", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/axunitst-runner-linux-x64": { + "name": "@ax/axunitst-runner-linux-x64", + "version": "4.1.8", + "integrity": "sha512-lGNvjBfJeKxmj+uChBH6W4OMSd5Ek515q0WImnd/qiJ4eAsOUMikynFfq9ToY49upVZGOvrkiGFrT9zBTJA8tQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-runner-linux-x64/-/axunitst-runner-linux-x64-4.1.8.tgz", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/axunitst-runner-win-x64": { + "name": "@ax/axunitst-runner-win-x64", + "version": "4.1.8", + "integrity": "sha512-W7Q9o75ALr3yXCbzMv89vSxQgo8EVnRO8TsNkCetkcf8op/ib2W+4Xh+m/P5X2JgIyVTDmqOPnYu5kHnAXhCzA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-runner-win-x64/-/axunitst-runner-win-x64-4.1.8.tgz", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/axunitst-generator-linux-x64": { + "name": "@ax/axunitst-generator-linux-x64", + "version": "4.1.8", + "integrity": "sha512-pJyNwfYK1LljgFrXD21iGExOhvp4LkBSPKbakLVQGzZFmHpERNrxe3vcsQRZJQip2gGXNTMdnyWRWLQXJ80c2w==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-generator-linux-x64/-/axunitst-generator-linux-x64-4.1.8.tgz", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/axunitst-generator-win-x64": { + "name": "@ax/axunitst-generator-win-x64", + "version": "4.1.8", + "integrity": "sha512-IFDotU7DIugAxkkyQPBK7SJAFGfNMHxXHK7QWIKZ3z4a3qLSVzTBZkOWJqo0xPy/3vaPjh/PjfFJs85M0iqOgg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-generator-win-x64/-/axunitst-generator-win-x64-4.1.8.tgz", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/build-native-winx64": { + "name": "@ax/build-native-winx64", + "version": "16.0.3", + "integrity": "sha512-M1qk2yNNsGzz6NXKB0miyfOO4bpYkVcfnGhkHirXcJSLFnWDSx7hnRi0yhLp6jny99RkXEcRn9Cwx8lqynmUDg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/build-native-winx64/-/build-native-winx64-16.0.3.tgz", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/build-native-linux": { + "name": "@ax/build-native-linux", + "version": "16.0.3", + "integrity": "sha512-CfqbzR+wPnocP0+pDpb3cYBxdefkS6WvHbGaDNGAoCkK3Y8WnNfWbxXr37e5XIi7iPMZ8BONWaRFIN5h4RMeOA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/build-native-linux/-/build-native-linux-16.0.3.tgz", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/stc-win-x64": { + "name": "@ax/stc-win-x64", + "version": "6.0.146", + "integrity": "sha512-4hTgmIG54MaWhgxBV8gygU19yilVLfieizhUb08aRXz2o1+YKqd6ifgz1NBAT9RVOgnMj0IJcUynuLo998i1zg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/stc-win-x64/-/stc-win-x64-6.0.146.tgz", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "dependencies": { + "@ax/st-docs": "6.0.146" + } + }, + "@ax/stc-linux-x64": { + "name": "@ax/stc-linux-x64", + "version": "6.0.146", + "integrity": "sha512-Cy8psrCe2TB+bCZrCzU4qtPxf0UWzCpdmxOCBC4fEVKnKW6MaBOBt85PAbz6MtAriH4boJY9gMMuPspWlKavPA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/stc-linux-x64/-/stc-linux-x64-6.0.146.tgz", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "dependencies": { + "@ax/st-docs": "6.0.146" + } + }, + "@ax/st-ls-win-x64": { + "name": "@ax/st-ls-win-x64", + "version": "3.0.113", + "integrity": "sha512-dPj6b2aRhnelCe0BpIcLMLvHbUj2zhfQOtu4jzdZFDPhKICdB9+fTebuYRmP2vna4ogTke22e6f2buwR6VO1Vw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/st-ls-win-x64/-/st-ls-win-x64-3.0.113.tgz", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/st-ls-linux-x64": { + "name": "@ax/st-ls-linux-x64", + "version": "3.0.113", + "integrity": "sha512-/QUsNMJrMPRVcCrCD7gkw/xl0VvZ8YEJXxQMWGwkWol3JgxiPjWW/fb7EqpzDU+ij45xy85rBdx29MMHQ3Of9Q==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/st-ls-linux-x64/-/st-ls-linux-x64-3.0.113.tgz", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/st-docs": { + "name": "@ax/st-docs", + "version": "6.0.146", + "integrity": "sha512-KUs6JC/dWedgnaxH7UrqAOuJm6rKS4gzXTLguqXbtWHKdDKOceIw1yODyjty4iuOm6TkDm2UX4ya6QFC84eBHA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/st-docs/-/st-docs-6.0.146.tgz", + "dependencies": {} } }, - "@ax/sdb-linux-x64": { - "version": "0.19.6", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/sdb-linux-x64/-/sdb-linux-x64-0.19.6.tgz", - "integrity": "sha512-7oVkmc8nCXIj7dPRHxwUipRVvxQpyYpCNpseWYYsgKyfzaeRKeZpwF3zuSe5I9NSsWenGT1HtvJhyfSJ2Dyebg==", - "os": [ - "linux" - ], - "cpu": [ - "x64" - ] - }, - "@ax/sdb-win-x64": { - "version": "0.19.6", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/sdb-win-x64/-/sdb-win-x64-0.19.6.tgz", - "integrity": "sha512-Rkeb7x1I1t3tKpop+xYbNhWw4Qk0u7tU+maj8JsidQyuSEs/dcgOE95nCb32JhaMKRykwZ6uQ0SVsnrqtCvwrA==", - "os": [ - "win32" - ], - "cpu": [ - "x64" - ] - }, - "@ax/sdk": { - "version": "4.0.12", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/sdk/-/sdk-4.0.12.tgz", - "integrity": "sha512-EXB8J2voETlwzYWe7GPt25NA/FM+qskre83oahARvS7/7hIoEhinfx7AhZqj63hUruAr9P1XcMZL8cTyQhOYgQ==", - "dependencies": { - "@ax/axunit": "4.0.6", - "@ax/axunit-ls-contrib": "4.0.6", - "@ax/mod": "0.19.6", - "@ax/mon": "0.19.6", - "@ax/sdb": "0.19.6", - "@ax/simatic-pragma-stc-plugin": "1.0.26", - "@ax/sld": "1.0.11", - "@ax/st": "4.0.12", - "@ax/target-llvm": "5.4.89", - "@ax/target-mc7plus": "5.4.89" - } - }, - "@ax/simatic-pragma-stc-plugin": { - "version": "1.0.26", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/simatic-pragma-stc-plugin/-/simatic-pragma-stc-plugin-1.0.26.tgz", - "integrity": "sha512-2Pj/Encd6bUgsRfXyj3rA4YOUpRroqwzODKU37T95dMNle+BpFXYS3V88FYJyTdOgSrJik4VVdV1AFzH7NUQ8g==" - }, - "@ax/sld": { - "version": "1.0.11", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/sld/-/sld-1.0.11.tgz", - "integrity": "sha512-l+sJGBl604kyWrq5/dtsYc96MX5UbwGBTfrDXmbIrnPuuCpS+pJ4/B4CEunskb2r6qfgQ2j4cXu5b5h06pd0jw==", - "cpu": [ - "x64" - ] - }, - "@ax/st": { - "version": "4.0.12", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/st/-/st-4.0.12.tgz", - "integrity": "sha512-Y/SZG+Y7Cf9C+kuFBpU0zunU0Jkr7PQaybnlPAnoSt3Vl9XIk1JWIlHi7axKz62TRzlqi2MyBFuAVZKXtSLkIg==", - "dependencies": { - "@ax/apax-build": "0.7.0", - "@ax/stc": "5.4.89" - } - }, - "@ax/st-docs": { - "version": "5.4.89", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/st-docs/-/st-docs-5.4.89.tgz", - "integrity": "sha512-TogaSV69nQtoPVUFMna4rZOz64SEa5m8mfEjoXcYABI1GgDhqz9ptzzCLbpcz7l6+zimdv1erV36WxRYoX9guQ==" - }, - "@ax/stc": { - "version": "5.4.89", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/stc/-/stc-5.4.89.tgz", - "integrity": "sha512-PylnoEsIPZj8IK2XwSnjHlDK66CJ7ABaZ9UqBLGP281JI5XLwP88+e9Xjb7RjZbyomeg+1lcvHT1juXZSyc8Ig==", - "dependencies": { - "@ax/stc-linux-x64": "5.4.89", - "@ax/stc-win-x64": "5.4.89" - } - }, - "@ax/stc-linux-x64": { - "version": "5.4.89", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/stc-linux-x64/-/stc-linux-x64-5.4.89.tgz", - "integrity": "sha512-WFNqenCSEs+Qy1ZzSEEmmg7eOxUggPyVqJ+ZQjwR+LqAmVYJRm0yFzOFQvTghVO/znvSgGeKywK8W9OjFu2BEw==", - "os": [ - "linux" - ], - "cpu": [ - "x64" - ], - "dependencies": { - "@ax/st-docs": "5.4.89" - } - }, - "@ax/stc-win-x64": { - "version": "5.4.89", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/stc-win-x64/-/stc-win-x64-5.4.89.tgz", - "integrity": "sha512-ysCVJdJ3Gk7p+FzHhntapHYhvKkyHVU0HV36pMBrpYVTCgTOoHlFkeDeTy+JU6cfx7x4LVuIFTzQusJrFPUs8g==", - "os": [ - "win32" - ], - "cpu": [ - "x64" - ], - "dependencies": { - "@ax/st-docs": "5.4.89" - } - }, - "@ax/system-datetime": { - "version": "5.0.60", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/system-datetime/-/system-datetime-5.0.60.tgz", - "integrity": "sha512-j+zwPGrGzm0ztm24BwbahtXPXQq48i85gRgBtEI6eiBy9AvaSFey8L9SkCgOwF3T2vHFRueIwJqZfAR4s77aPQ==" - }, - "@ax/system-math": { - "version": "5.0.60", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/system-math/-/system-math-5.0.60.tgz", - "integrity": "sha512-6fluLzozqbosz156Ta6VWqdlK2epFrVz3/kNSPNmAWDHXBGFnNVph5EBb3pVvlu6YgYKnRHNj8ndIx9VnegZyA==" - }, - "@ax/system-strings": { - "version": "5.0.60", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/system-strings/-/system-strings-5.0.60.tgz", - "integrity": "sha512-tccjGWs22qsx4CxHAC00Dx67sl86Qo3ZFghP++6AXDzyBDOLaNijcLjJEAAPZyx125ZGQzDrurqb4W5uPf+4ow==", - "dependencies": { - "@ax/system-datetime": "5.0.60", - "@ax/system-math": "5.0.60" - } - }, - "@ax/target-axunit": { - "version": "4.0.6", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-axunit/-/target-axunit-4.0.6.tgz", - "integrity": "sha512-JSxQsnT/1PjaPLVmv7mORqjhmE5weMUEZ8/xKDdKnH+UxRH8FkCuLMsKgsq+UCQUazdbePm9vFlZ6E4HhI5OGA==" - }, - "@ax/target-llvm": { - "version": "5.4.89", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-llvm/-/target-llvm-5.4.89.tgz", - "integrity": "sha512-gKooU/g7iFjalErbbmfBwwcYwBbH9GQeeICilgUK+0FFxyGLn28ML9ky4MrL6e3Yq/mWrHPnqZlKK4ZIZsMEDA==", - "dependencies": { - "@ax/target-llvm-linux-x64": "5.4.89", - "@ax/target-llvm-win-x64": "5.4.89" - } - }, - "@ax/target-llvm-linux-x64": { - "version": "5.4.89", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-llvm-linux-x64/-/target-llvm-linux-x64-5.4.89.tgz", - "integrity": "sha512-xOFn1jGf3EPCSSOu88lcdPlwW46n59xdiJT19WxBvaOowAzEoCAYQCTXfh3si/XiAix0vLWsnDY9DYRPMhx5qA==", - "os": [ - "linux" - ], - "cpu": [ - "x64" - ] - }, - "@ax/target-llvm-win-x64": { - "version": "5.4.89", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-llvm-win-x64/-/target-llvm-win-x64-5.4.89.tgz", - "integrity": "sha512-pQdi7/dtf4Hz10yMikkxcOKqDwPzsQTD/d8vG7rfHYLyGHezBslVNHnoVGufaSAbQkU9zwvZJ7EUT89oRrU2lg==", - "os": [ - "win32" - ], - "cpu": [ - "x64" - ] - }, - "@ax/target-mc7plus": { - "version": "5.4.89", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-mc7plus/-/target-mc7plus-5.4.89.tgz", - "integrity": "sha512-5W0MHwuBiAzcs/4SGKKd91ZtM3Dr4RFixU/3bXHdTpyEDHT6S3fGGPjhDO58Cnd9WORleOozFg95zoZgEodcBw==", - "dependencies": { - "@ax/target-mc7plus-linux-x64": "5.4.89", - "@ax/target-mc7plus-win-x64": "5.4.89" - } - }, - "@ax/target-mc7plus-linux-x64": { - "version": "5.4.89", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-mc7plus-linux-x64/-/target-mc7plus-linux-x64-5.4.89.tgz", - "integrity": "sha512-WPSfNJI4Ar4DuAH6WZLfoVPU9whR+1arPfvWvmJ3w5Ag38PpfZU8BNfJ8krGbLzZXm/nMvydnE4oyfz4mRgbwg==", - "os": [ - "linux" - ], - "cpu": [ - "x64" - ] - }, - "@ax/target-mc7plus-win-x64": { - "version": "5.4.89", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-mc7plus-win-x64/-/target-mc7plus-win-x64-5.4.89.tgz", - "integrity": "sha512-vnlDcCvwLzj06oQKR0sbrEfRf/s/RWKsnfqbhfNzKRt5T3mW+46dmcuR90SSNrYpHi4Szx/mwRl+O1BmxSJI8g==", - "os": [ - "win32" - ], - "cpu": [ - "x64" - ] - }, - "@ax/third-party-licenses-build-native": { - "version": "10.1.1", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/third-party-licenses-build-native/-/third-party-licenses-build-native-10.1.1.tgz", - "integrity": "sha512-Da+AT0KujH3K9bKf4K4rqPA3Z+a/WDkw9p6328AlrSqgBIUFyUZzOM3eVOwhhjKCnmNAVSmtSp0r7crDFGICTw==" - }, - "@simatic-ax/snippetscollection": { - "version": "0.1.3", - "resolved": "https://npm.pkg.github.com/download/@simatic-ax/snippetscollection/0.1.3/e287ad803a10c04ed92a9b73eb1b735ca267212f", - "integrity": "sha512-YcuBXUs4VeW60LLdJ/p7p2aCXWxhrzHg4YEmMKtDOLPjL7EWbQT+4RUNoE2PANv7VTX/hr9+iLjR5ahfKp2utA==" - } + "workspaces": {} } diff --git a/apax.yml b/apax.yml index 92d3c67..9811e1c 100644 --- a/apax.yml +++ b/apax.yml @@ -14,14 +14,15 @@ variables: APAX_BUILD_ARGS: - '--debug' targets: - - 'axunit-llvm' + - '1500' + - 'llvm' # Dependencies devDependencies: - "@ax/sdk": 4.0.12 + "@ax/sdk": 2311.0.1 "@simatic-ax/snippetscollection": 0.1.3 dependencies: - "@ax/system-strings": 5.0.60 - "@ax/system-math": 5.0.60 + "@ax/system-strings": 6.0.94 + "@ax/system-math": 6.0.94 # Registry information, where the package will be published registries: '@simatic-ax': 'https://npm.pkg.github.com/' @@ -33,3 +34,5 @@ files: - 'snippets' - 'doc' - 'src' # ship library with source +installStrategy: strict +apaxVersion: 3.0.0 diff --git a/src/AnyIntToString.st b/src/strings/AnyIntToString.st similarity index 100% rename from src/AnyIntToString.st rename to src/strings/AnyIntToString.st diff --git a/src/ArrayToString.st b/src/strings/ArrayToString.st similarity index 100% rename from src/ArrayToString.st rename to src/strings/ArrayToString.st diff --git a/src/ConversionMode.st b/src/strings/ConversionMode.st similarity index 100% rename from src/ConversionMode.st rename to src/strings/ConversionMode.st diff --git a/src/CountDigits.st b/src/strings/CountDigits.st similarity index 100% rename from src/CountDigits.st rename to src/strings/CountDigits.st diff --git a/src/HexToString.st b/src/strings/HexToString.st similarity index 100% rename from src/HexToString.st rename to src/strings/HexToString.st diff --git a/src/IntToString.st b/src/strings/IntToString.st similarity index 100% rename from src/IntToString.st rename to src/strings/IntToString.st diff --git a/src/StringToAnyInt.st b/src/strings/StringToAnyInt.st similarity index 100% rename from src/StringToAnyInt.st rename to src/strings/StringToAnyInt.st diff --git a/src/StringToArrayOfCharCount.st b/src/strings/StringToArrayOfCharCount.st similarity index 100% rename from src/StringToArrayOfCharCount.st rename to src/strings/StringToArrayOfCharCount.st diff --git a/src/StringToArrayOfLint.st b/src/strings/StringToArrayOfLint.st similarity index 100% rename from src/StringToArrayOfLint.st rename to src/strings/StringToArrayOfLint.st diff --git a/src/StringToArrayOfLintCount.st b/src/strings/StringToArrayOfLintCount.st similarity index 100% rename from src/StringToArrayOfLintCount.st rename to src/strings/StringToArrayOfLintCount.st diff --git a/src/StringToBool.st b/src/strings/StringToBool.st similarity index 100% rename from src/StringToBool.st rename to src/strings/StringToBool.st diff --git a/src/ToHex/GetHexValueOfChar.st b/src/strings/ToHex/GetHexValueOfChar.st similarity index 100% rename from src/ToHex/GetHexValueOfChar.st rename to src/strings/ToHex/GetHexValueOfChar.st diff --git a/src/ToHex/StringToHex.st b/src/strings/ToHex/StringToHex.st similarity index 100% rename from src/ToHex/StringToHex.st rename to src/strings/ToHex/StringToHex.st diff --git a/src/ToInt.st b/src/strings/ToInt.st similarity index 100% rename from src/ToInt.st rename to src/strings/ToInt.st diff --git a/src/times/ToLDateAndTime.st b/src/times/ToLDateAndTime.st new file mode 100644 index 0000000..96b6ca4 --- /dev/null +++ b/src/times/ToLDateAndTime.st @@ -0,0 +1,131 @@ +USING System.DateTime; +NAMESPACE Simatic.Ax.Conversion.Times + + FUNCTION ToLDateAndTime : LDATE_AND_TIME + + VAR_INPUT + SimotionDateTime : SimotionDateTime; + END_VAR + + VAR_TEMP + u32Date : UDINT; + u32Year : UDInt; + u32Month : UDInt; + u32Days : UDInt; + b32AuxHours : UDInt; + boDateReady : Bool; + HOUR : UDINT; + MINUTE : UDINT; + SECOND : UDINT; + NANOSECOND : UDINT; + END_VAR + + u32Date := TO_UDINT(SimotionDateTime.SimotionDate);// + UDINT#1; + + // calculation of hours + HOUR := TO_UDINT(SimotionDateTime.SimotionTime) / UDINT#3600000; + b32AuxHours := TO_UDINT(SimotionDateTime.SimotionTime) - HOUR * UDINT#3600000; + + // calculation of minutes + MINUTE := b32AuxHours / UDINT#60000; + + // calculation of seconds + SECOND := (b32AuxHours - MINUTE * UDINT#60000) / UDINT#1000; + + // calculation of mseconds + NANOSECOND := ( TO_UDINT(SimotionDateTime.SimotionTime) - (HOUR * UDINT#3600000) - (MINUTE * UDINT#60000) - (SECOND * UDINT#1000)) * UDINT#1000000; + + //Reset values to calculate actual year + u32Year := UDINT#1991; + u32Days := UDINT#0; + + //Detect actual year by adding the days since 01.01.1992 + REPEAT + //Increase number of years + u32Year := u32Year + UDINT#1; + //If year is a leap-year + IF (u32Year MOD UDINT#4 = UDINT#0) AND (u32Year <> UDINT#2100) THEN //only 2100 is not a leap-year between 1992-2200 + u32Days := u32Days + UDINT#366; + ELSE + u32Days := u32Days + UDINT#365; + END_IF; + //Number of days is greater or equals number of days of SIMOTION system + UNTIL u32Days >= u32Date + END_REPEAT; + + u32Days := u32Days; + + //Decrease number of days by number of days of one year + //If year is a leap-year + IF (u32Year MOD UDINT#4 = UDINT#0) AND (u32Year <> UDINT#2100) THEN //only 2100 is not a leap-year between 1992-2200 + u32Date := u32Date - (u32Days - UDINT#366); + ELSE + u32Date := u32Date - (u32Days - UDINT#365); + END_IF; + + //Reset values to calculate actual month and day + u32Month := UDINT#1; + boDateReady := FALSE; + + //Start CASE with value "1" (-> january) + REPEAT + CASE u32Month OF + // for months with 31 days + UDINT#1, UDINT#3, UDINT#5, UDINT#7, UDINT#8, UDINT#10: + IF (u32Date <= UDINT#31) THEN + u32Days := u32Date; + boDateReady := TRUE; + ELSE + u32Month := u32Month + UDINT#1; + u32Date := u32Date - UDINT#31; + END_IF; + //for february + UDINT#2: + IF (u32Year MOD UDINT#4 = UDINT#0) AND (u32Year <> UDINT#2100) THEN //only 2100 is not a leap-year between 1992-2200 + IF (u32Date <= UDINT#29) THEN + u32Days := u32Date; + boDateReady := TRUE; + ELSE + u32Month := u32Month + UDINT#1; + u32Date := u32Date - UDINT#29; + END_IF; + ELSE + IF (u32Date <= UDINT#28) THEN + u32Days := u32Date; + boDateReady := TRUE; + ELSE + u32Month := u32Month + UDINT#1; + u32Date := u32Date - UDINT#28; + END_IF; + END_IF; + //for months with 30 days + UDINT#4, UDINT#6, UDINT#9, UDINT#11: + IF (u32Date <= UDINT#30) THEN + u32Days := u32Date; + boDateReady := TRUE; + ELSE + u32Month := u32Month + UDINT#1; + u32Date := u32Date - UDINT#30; + END_IF; + //for december + UDINT#12: + u32Days := u32Date; + boDateReady := TRUE; + END_CASE; + //Correct month and day found + UNTIL boDateReady = TRUE + END_REPEAT; + + NewDateAndTime( + year := to_int(u32Year), + month := to_int(u32Month), + day := to_int(u32Days), + hour := to_int(hour), + minute := to_int(MINUTE), + second := to_int(second), + millisecond := to_int(NANOSECOND/UDINT#1000000), + value => ToLDateAndTime); + + END_FUNCTION + +END_NAMESPACE diff --git a/src/times/ToSimotionDateTime.st b/src/times/ToSimotionDateTime.st new file mode 100644 index 0000000..ac3ca3b --- /dev/null +++ b/src/times/ToSimotionDateTime.st @@ -0,0 +1,87 @@ +USING System.DateTime; +NAMESPACE Simatic.Ax.Conversion.Times + FUNCTION ToSimotionDateTime : SimotionDateTime + VAR_INPUT + SimaticTime : LDATE_AND_TIME; + END_VAR + + VAR_TEMP + actDays : INT; + actMonth : INT; + actYear : INT; + actHour : INT; + actMinute : INT; + actSecond : INT; + actMillisecond : INT; + elapsedYears : INT; + elapsedDays : DINT; + loop : DINT; + END_VAR + + //we ignore microseconds and nanoseconds, since they are supported by the destination data type + SplitDateAndTime(value := SimaticTime, + year => actYear, + month => actMonth, + day => actDays, + hour => actHour, + minute => actMinute, + second => actSecond, + millisecond => actMillisecond); + + //add number of days from full years, subtracting the current year + FOR loop := 1992 TO (actYear - 1) DO + IF loop MOD 4 = 0 AND loop <> 2100 THEN + elapsedDays := elapsedDays + 366; + ELSE + elapsedDays := elapsedDays + 365; + END_IF; + END_FOR; + + //add days from full months of the current year + IF actMonth > 1 THEN + elapsedDays := elapsedDays + 31; + END_IF; + IF actMonth > 2 THEN + IF actYear MOD 4 = 0 AND NOT (actYear = 2100) THEN + elapsedDays := elapsedDays + 29; + ELSE + elapsedDays := elapsedDays + 28; + END_IF; + END_IF; + IF actMonth > 3 THEN + elapsedDays := elapsedDays + 31; + END_IF; + IF actMonth > 4 THEN + elapsedDays := elapsedDays + 30; + END_IF; + IF actMonth > 5 THEN + elapsedDays := elapsedDays + 31; + END_IF; + IF actMonth > 6 THEN + elapsedDays := elapsedDays + 30; + END_IF; + IF actMonth > 7 THEN + elapsedDays := elapsedDays + 31; + END_IF; + IF actMonth > 8 THEN + elapsedDays := elapsedDays + 31; + END_IF; + IF actMonth > 9 THEN + elapsedDays := elapsedDays + 30; + END_IF; + IF actMonth > 10 THEN + elapsedDays := elapsedDays + 31; + END_IF; + IF actMonth > 11 THEN + elapsedDays := elapsedDays + 30; + END_IF; + + //add days from current month + elapsedDays := elapsedDays + actDays; + + ToSimotionDateTime.SimotionDate := TO_DWORD(elapsedDays); + ToSimotionDateTime.SimotionTime := TO_DWORD (TO_UDINT(actMillisecond) + UDINT#1000 * (TO_UDINT(actSecond) + UDINT#60 * (TO_UDINT(actMinute + 60 * ( actHour))))); + + END_FUNCTION + +END_NAMESPACE diff --git a/src/times/types.st b/src/times/types.st new file mode 100644 index 0000000..0314e62 --- /dev/null +++ b/src/times/types.st @@ -0,0 +1,10 @@ +NAMESPACE Simatic.Ax.Conversion.Times + + TYPE + SimotionDateTime : STRUCT + SimotionDate : DWORD; + SimotionTime : DWORD; + END_STRUCT; + END_TYPE + +END_NAMESPACE diff --git a/test/ArrayToStringTest.st b/test/strings/ArrayToStringTest.st similarity index 94% rename from test/ArrayToStringTest.st rename to test/strings/ArrayToStringTest.st index b9372e3..09cfe26 100644 --- a/test/ArrayToStringTest.st +++ b/test/strings/ArrayToStringTest.st @@ -47,15 +47,17 @@ NAMESPACE Simatic.Ax.Conversion METHOD PUBLIC Test_Array_ToString_without_indices_and_expect_full_string VAR_TEMP _str : STRING; + array_0_9_test : string := '0123456789'; + array_1_10_test : string := '1234567890'; END_VAR _str := Arrays.ToString(arr := array_0_9); Equal(expected := 10, actual := LengthOf(_str)); - Equal(expected := exp_0_9, actual := _str); + Equal(expected := TRUE, actual := _str = array_0_9_test); _str := Arrays.ToString(arr := array_1_10); Equal(expected := 10, actual := LengthOf(_str)); - Equal(expected := exp_1_10, actual := _str); + Equal(expected := TRUE, actual := _str = array_1_10_test); ; END_METHOD diff --git a/test/strings/Asserts.st b/test/strings/Asserts.st new file mode 100644 index 0000000..4e75591 --- /dev/null +++ b/test/strings/Asserts.st @@ -0,0 +1,12 @@ +NAMESPACE AxUnit.Assert + + FUNCTION Equal + VAR_INPUT + expected : STRING; + actual : STRING; + END_VAR + Equal(expected := TRUE, actual := expected = actual); + ; + END_FUNCTION + +END_NAMESPACE \ No newline at end of file diff --git a/test/CountDigitsTest.st b/test/strings/CountDigitsTest.st similarity index 100% rename from test/CountDigitsTest.st rename to test/strings/CountDigitsTest.st diff --git a/test/HexToString.st b/test/strings/HexToString.st similarity index 100% rename from test/HexToString.st rename to test/strings/HexToString.st diff --git a/test/ItemTest.st b/test/strings/ItemTest.st similarity index 100% rename from test/ItemTest.st rename to test/strings/ItemTest.st diff --git a/test/StringToAnyTest.st b/test/strings/StringToAnyTest.st similarity index 100% rename from test/StringToAnyTest.st rename to test/strings/StringToAnyTest.st diff --git a/test/StringToArrayOfLintCountTest.st b/test/strings/StringToArrayOfLintCountTest.st similarity index 100% rename from test/StringToArrayOfLintCountTest.st rename to test/strings/StringToArrayOfLintCountTest.st diff --git a/test/StringToArrayOfLintTest.st b/test/strings/StringToArrayOfLintTest.st similarity index 100% rename from test/StringToArrayOfLintTest.st rename to test/strings/StringToArrayOfLintTest.st diff --git a/test/StringToArrayTest.st b/test/strings/StringToArrayTest.st similarity index 100% rename from test/StringToArrayTest.st rename to test/strings/StringToArrayTest.st diff --git a/test/StringToBoolTest.st b/test/strings/StringToBoolTest.st similarity index 100% rename from test/StringToBoolTest.st rename to test/strings/StringToBoolTest.st diff --git a/test/TestDifferentTypeConversions.st b/test/strings/TestDifferentTypeConversions.st similarity index 100% rename from test/TestDifferentTypeConversions.st rename to test/strings/TestDifferentTypeConversions.st diff --git a/test/TestDifferentTypeConversionsToInt.st b/test/strings/TestDifferentTypeConversionsToInt.st similarity index 100% rename from test/TestDifferentTypeConversionsToInt.st rename to test/strings/TestDifferentTypeConversionsToInt.st diff --git a/test/TestGetHexValueOfChar.st b/test/strings/TestGetHexValueOfChar.st similarity index 100% rename from test/TestGetHexValueOfChar.st rename to test/strings/TestGetHexValueOfChar.st diff --git a/test/TestStringToHex.st b/test/strings/TestStringToHex.st similarity index 100% rename from test/TestStringToHex.st rename to test/strings/TestStringToHex.st diff --git a/test/ToStringTest.st b/test/strings/ToStringTest.st similarity index 100% rename from test/ToStringTest.st rename to test/strings/ToStringTest.st diff --git a/test/times/ToLDateAndTime.st b/test/times/ToLDateAndTime.st new file mode 100644 index 0000000..93c37a6 --- /dev/null +++ b/test/times/ToLDateAndTime.st @@ -0,0 +1,35 @@ +NAMESPACE Simatic.Ax.Conversion.Times + + {TestFixture} + CLASS TestSimotionDateTimeToLDateAndTime + + {Test} + METHOD PUBLIC CheckStartTime + //test with 1ms added from initial time + VAR_TEMP + timestamp : LDATE_AND_TIME; + SimotionDateTime : SimotionDateTime; + END_VAR + SimotionDateTime.SimotionDate := DWORD#1; + SimotionDateTime.SimotionTime := DWORD#1; + timestamp := ToLDateAndTime(SimotionDateTime); + AxUnit.Assert.Equal(timestamp = LDATE_AND_TIME#1992-01-01-00:00:00.001, TRUE); + END_METHOD + + {Test} + METHOD PUBLIC CheckCurrentTime + VAR_TEMP + timestamp : LDATE_AND_TIME; + SimotionDateTime : SimotionDateTime; + END_VAR + SimotionDateTime.SimotionDate := DWORD#11627; + SimotionDateTime.SimotionTime := DWORD#57423483; + timestamp := ToLDateAndTime(SimotionDateTime); + //the values have been read from a simotion plc and converted, so they proven to be valid + AxUnit.Assert.Equal(timestamp = LDT#2023-10-31-15:57:03.483, TRUE); + + END_METHOD + + END_CLASS + +END_NAMESPACE diff --git a/test/times/ToSimotionDateTime.st b/test/times/ToSimotionDateTime.st new file mode 100644 index 0000000..0a23dc0 --- /dev/null +++ b/test/times/ToSimotionDateTime.st @@ -0,0 +1,36 @@ +NAMESPACE Simatic.Ax.Conversion.Times + + {TestFixture} + CLASS TestLDateAndTimeToSimotionDateTime + + {Test} + METHOD PUBLIC CheckStartTime + //test with 1ms added from initial time + VAR_TEMP + inputTimestamp : LDATE_AND_TIME := LDT#1992-01-01-00:00:00.001; + retval : SimotionDateTime; + simotionDate : DWORD; + simotionTime : DWORD; + END_VAR + retval := ToSimotionDateTime(inputTimestamp); + AxUnit.Assert.Equal(retval.simotionTime , DWORD#1); + AxUnit.Assert.Equal(retval.simotionDate , DWORD#1); + END_METHOD + + {Test} + METHOD PUBLIC CheckCurrentTime + VAR_TEMP + inputTimestamp : LDATE_AND_TIME := LDT#2023-10-31-15:57:03.483; + retval : SimotionDateTime; + END_VAR + + retval := ToSimotionDateTime(inputTimestamp); + //the values have been read from a simotion plc and converted, so they proven to be valid + AxUnit.Assert.Equal(retval.SimotionTime , DWORD#57423483); + AxUnit.Assert.Equal(retval.SimotionDate , DWORD#11627); + + END_METHOD + + END_CLASS + +END_NAMESPACE