├── .clang-format ├── .clang-format-ignore ├── .dockerignore ├── .github ├── CMakeLists.txt ├── ciPatches │ └── libressl-no_postfix.patch ├── dependabot.yml ├── linters │ ├── .clang-format │ ├── .clang-format-ignore │ ├── .jscpd.json │ ├── .yaml-lint.yml │ └── cmake-format.yaml ├── renovate.json └── workflows │ ├── build.yml │ ├── codeql-analysis.yml │ ├── delete-images.yml │ ├── linter.yml │ └── rebase.yml ├── .gitignore ├── .gitmodules ├── .gitpod.Dockerfile ├── .gitpod.yml ├── .whitesource ├── AdditiveManufacturing ├── BasicAMMachine.cpp ├── BasicAMMachine.hpp ├── InstantiatedAMMachine.cpp ├── InstantiatedAMMachine.hpp ├── ShowcaseAMMachine.cpp └── ShowcaseAMMachine.hpp ├── CMakeLists.txt ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Configuration ├── Configuration.cpp ├── Configuration.hpp ├── Configuration_json.cpp └── Configuration_json.hpp ├── Dockerfile ├── Exceptions └── NodeNotFound.hpp ├── GMS ├── BasicGMS.cpp ├── BasicGMS.hpp ├── FullGMS.cpp ├── FullGMS.hpp ├── HexagonGlobal.cpp ├── HexagonGlobal.hpp ├── HexagonSim.cpp ├── HexagonSim.hpp ├── InstantiatedGMS.cpp ├── InstantiatedGMS.hpp ├── OGPSmartScopeCNC500.cpp ├── OGPSmartScopeCNC500.hpp ├── WenzelLH.cpp └── WenzelLH.hpp ├── LICENSE ├── MachineTools ├── BasicMachineTool.cpp ├── BasicMachineTool.hpp ├── CNShowcaseMachineTool.cpp ├── CNShowcaseMachineTool.hpp ├── FullMachineTool.cpp ├── FullMachineTool.hpp ├── FullMachineToolDynamic.cpp ├── FullMachineToolDynamic.hpp ├── InstantiatedMachineTool.cpp ├── InstantiatedMachineTool.hpp ├── MRMachineTool.cpp ├── MRMachineTool.hpp ├── ShowcaseMachineTool.cpp ├── ShowcaseMachineTool.hpp ├── SimulatedInstance.cpp └── SimulatedInstance.hpp ├── OpcUaTypes ├── Attributes.hpp ├── ConstNodeId.cpp ├── ConstNodeId.hpp ├── DateTime.hpp ├── EUInformation.cpp ├── EUInformation.hpp ├── LocalizedText.cpp ├── LocalizedText.hpp ├── ReflectionHelper.hpp └── StatusCode.hpp ├── README.md ├── Robotics ├── BasicRobot.cpp ├── BasicRobot.hpp ├── InstantiatedRobot.cpp └── InstantiatedRobot.hpp ├── SampleServer.cpp ├── TypeDefinition ├── AdditiveManufacturing │ ├── AdditiveManufacturing.hpp │ ├── Constants.hpp │ ├── Consumable.hpp │ ├── ConsumableList.hpp │ ├── EquipmentAM.hpp │ ├── MachineIdentificationAM.hpp │ ├── Material.hpp │ └── MaterialList.hpp ├── DI │ ├── Component.hpp │ ├── Constants.hpp │ ├── ITagNameplate.hpp │ ├── IVendorNameplate.hpp │ └── TopologyElement.hpp ├── GMS │ ├── CalibrationPrognosisType.hpp │ ├── Constants.hpp │ ├── CorrectionType.hpp │ ├── GMSEquipmentType.hpp │ ├── GMSIdentificationType.hpp │ ├── GMSNotification.hpp │ ├── GMSPrognosisList.hpp │ ├── GMSResultManagementType.hpp │ ├── GMSSensor.hpp │ ├── GMSToolList.hpp │ ├── GMSType.hpp │ └── WorkspaceType.hpp ├── IA │ ├── BasicStacklight.hpp │ ├── Constants.hpp │ ├── StackElement.hpp │ └── StackElementLight.hpp ├── MachineTool │ ├── Alert.hpp │ ├── BaseTool.hpp │ ├── ChannelMonitoring.hpp │ ├── Constants.hpp │ ├── EDMGeneratorMonitoring.hpp │ ├── ElementMonitoring.hpp │ ├── Equipment.hpp │ ├── LaserMonitoring.hpp │ ├── MachineOperationMonitoring.hpp │ ├── MachineTool.hpp │ ├── MachineToolIdentification.hpp │ ├── MaintenancePrognosis.hpp │ ├── ManualActivityPrognosis.hpp │ ├── Monitoring.hpp │ ├── MultiTool.hpp │ ├── Notification.hpp │ ├── NotificationEvent.hpp │ ├── PartLoadPrognosis.hpp │ ├── PartUnLoadPrognosis.hpp │ ├── ProcessChangeoverPrognosis.hpp │ ├── Production.hpp │ ├── ProductionActiveProgram.hpp │ ├── ProductionJob.hpp │ ├── ProductionJobEndPrognosis.hpp │ ├── ProductionJobList.hpp │ ├── ProductionJobTransitionEvent.hpp │ ├── ProductionPart.hpp │ ├── ProductionPartSet.hpp │ ├── ProductionProgram.hpp │ ├── ProductionStateMachine.hpp │ ├── Prognosis.hpp │ ├── PrognosisList.hpp │ ├── SoftwareIdentification.hpp │ ├── SpindleMonitoring.hpp │ ├── Tool.hpp │ ├── ToolChangePrognosis.hpp │ ├── ToolLife.hpp │ ├── ToolList.hpp │ ├── ToolLoadPrognosis.hpp │ ├── ToolUnloadPrognosis.hpp │ ├── UtilityChangePrognosis.hpp │ └── WorkingUnitMonitoring.hpp ├── Machinery │ ├── Constants.hpp │ ├── IMachineTagNameplate.hpp │ ├── IMachineryItemVendorNameplateType.hpp │ └── MachineIdentification.hpp ├── MachineryResult │ ├── Constants.hpp │ ├── ResultDataType.hpp │ ├── ResultManagementType.hpp │ ├── ResultMetaDataType.hpp │ └── ResultVariableType.hpp ├── Robotics │ ├── Constants.hpp │ └── MotionDevice.hpp ├── TypeDefinition.hpp ├── Woodworking │ ├── Constants.hpp │ ├── IWwBaseState.hpp │ ├── IWwEventMessage.hpp │ ├── IWwState.hpp │ ├── IWwSubUnits.hpp │ ├── IWwUnitFlags.hpp │ ├── IWwUnitOverview.hpp │ ├── IWwUnitValues.hpp │ ├── MachineIdentification.hpp │ ├── ManufacturerSpecific.hpp │ ├── WwBaseEvent.hpp │ ├── WwEventsDispatcher.hpp │ └── WwMachine.hpp └── ns0 │ ├── AcknowledgeableCondition.hpp │ ├── AlarmCondition.hpp │ ├── AnalogItem.hpp │ ├── AnalogUnitRange.hpp │ ├── AnalogUnitType.hpp │ ├── BaseEvent.hpp │ ├── BaseModelChangeEvent.hpp │ ├── BaseObject.hpp │ ├── Condition.hpp │ ├── ConditionVariable.hpp │ ├── Constants.hpp │ ├── DataItem.hpp │ ├── DiscreteItem.hpp │ ├── FiniteStateMachine.hpp │ ├── FiniteStateVariable.hpp │ ├── FiniteTransitionVariable.hpp │ ├── Folder.hpp │ ├── GeneralModelChangeEvent.hpp │ ├── IOrderedObject.hpp │ ├── MultiStateDiscreteType.hpp │ ├── OrderedList.hpp │ ├── StateVariable.hpp │ ├── TransitionEvent.hpp │ ├── TransitionVariable.hpp │ └── TwoStateVariable.hpp ├── UmatiServerLib ├── BindHelper.cpp ├── BindHelper.hpp ├── BindRefl.hpp ├── BindVariable.hpp ├── BindableMember.hpp ├── BindableMemberPlaceholder.hpp ├── BindableMemberValue.hpp ├── ConvertSimpleValue.cpp ├── ConvertSimpleValue.hpp ├── ConvertStructValue.cpp ├── ConvertStructValue.hpp ├── Instantiation.cpp ├── Instantiation.hpp ├── NodeValue.cpp ├── NodeValue.hpp ├── NodesMaster.cpp ├── NodesMaster.hpp ├── OpcUaCondition.hpp ├── OpcUaEvent.hpp ├── OpcUaKeys.cpp ├── OpcUaKeys.hpp ├── ServerHelper.cpp ├── ServerHelper.hpp ├── StateMachine.cpp ├── StateMachine.hpp ├── StateMachineInstance.hpp ├── TypeToUaDatatype.hpp ├── UaTypeHelper.hpp ├── UnbindRefl.hpp ├── Util.cpp ├── Util.hpp └── ValueDecorator.hpp ├── Woodworking ├── BasicWoodworking.cpp ├── BasicWoodworking.hpp ├── FullWoodworking.cpp ├── FullWoodworking.hpp ├── InstantiatedWoodworking.cpp └── InstantiatedWoodworking.hpp ├── arch └── gmtime.hpp ├── cmake ├── FindReflCpp.cmake └── empty.bsd.template ├── configuration.docker.json ├── configuration.template.json ├── doc ├── .vscode │ ├── build_on_windows.md │ ├── image-2.png │ ├── image-3.png │ ├── launch.json │ └── settings.json ├── Compile.md ├── Usage.md └── assets │ ├── AddServer.png │ ├── ConnectAndBrowse.png │ ├── RunAppImg.png │ └── sample-server.jpg ├── initialbuild.sh ├── model ├── AdditiveManufacturing │ ├── Opc.Ua.AdditiveManufacturing.NodeSet2.bsd │ ├── Opc.Ua.AdditiveManufacturing.NodeSet2.csv │ ├── Opc.Ua.AdditiveManufacturing.NodeSet2.xml │ └── Opc.Ua.Machinery.ProcessValues.xml ├── MachineryResult │ └── Opc.Ua.Machinery.Result.NodeSet2.bsd └── Woodworking │ ├── Opc.Ua.Woodworking.NodeIds.csv │ ├── Opc.Ua.Woodworking.NodeSet2.bsd │ └── Opc.Ua.Woodworking.NodeSet2.xml ├── tests ├── CMakeLists.txt ├── Test_BindNodeId.cpp ├── Test_BindStruct.cpp ├── Test_BindWrongDatatype.cpp ├── Test_MTEvent.cpp ├── Test_TranslateBrowse.cpp ├── readCertClient │ └── ReadCertClient.cpp └── util │ ├── MTServer_Test.hpp │ ├── UAClient.cpp │ ├── UAClient.hpp │ └── UAServer_Test.hpp └── tools └── certGen ├── .gitignore ├── README.md ├── createCertificate.py ├── openssl.cnf.jinja2 ├── requirements.txt └── settings.template.json /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | BasedOnStyle: Google 3 | IndentWidth: 2 4 | --- 5 | Language: Cpp 6 | ColumnLimit: 160 7 | BinPackParameters: false 8 | BinPackArguments: false 9 | AlignAfterOpenBracket: AlwaysBreak 10 | ContinuationIndentWidth: 2 11 | ConstructorInitializerIndentWidth: 2 12 | ... 13 | -------------------------------------------------------------------------------- /.clang-format-ignore: -------------------------------------------------------------------------------- 1 | 2 | ./build/* 3 | ./deps/* 4 | ./src_generated/* 5 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | **/.git 2 | Dockerfile 3 | .dockerignore 4 | -------------------------------------------------------------------------------- /.github/ciPatches/libressl-no_postfix.patch: -------------------------------------------------------------------------------- 1 | diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt 2 | --- a/crypto/CMakeLists.txt 3 | +++ b/crypto/CMakeLists.txt 4 | @@ -992,7 +992,7 @@ target_include_directories(crypto 5 | export_symbol(crypto ${CMAKE_CURRENT_BINARY_DIR}/crypto_p.sym) 6 | target_link_libraries(crypto ${PLATFORM_LIBS}) 7 | if (WIN32) 8 | - set(CRYPTO_POSTFIX -${CRYPTO_MAJOR_VERSION} PARENT_SCOPE) 9 | + set(CRYPTO_POSTFIX "" PARENT_SCOPE) 10 | endif() 11 | set_target_properties(crypto PROPERTIES 12 | OUTPUT_NAME crypto${CRYPTO_POSTFIX} 13 | diff --git a/ssl/CMakeLists.txt b/ssl/CMakeLists.txt 14 | --- a/ssl/CMakeLists.txt 15 | +++ b/ssl/CMakeLists.txt 16 | @@ -90,7 +90,7 @@ target_include_directories(ssl 17 | export_symbol(ssl ${CMAKE_CURRENT_SOURCE_DIR}/ssl.sym) 18 | target_link_libraries(ssl crypto ${PLATFORM_LIBS}) 19 | if (WIN32) 20 | - set(SSL_POSTFIX -${SSL_MAJOR_VERSION} PARENT_SCOPE) 21 | + set(SSL_POSTFIX "" PARENT_SCOPE) 22 | endif() 23 | set_target_properties(ssl PROPERTIES 24 | OUTPUT_NAME ssl${SSL_POSTFIX} 25 | diff --git a/tls/CMakeLists.txt b/tls/CMakeLists.txt 26 | --- a/tls/CMakeLists.txt 27 | +++ b/tls/CMakeLists.txt 28 | @@ -59,7 +59,7 @@ target_include_directories(tls 29 | export_symbol(tls ${CMAKE_CURRENT_BINARY_DIR}/tls.sym) 30 | target_link_libraries(tls ${PLATFORM_LIBS}) 31 | if (WIN32) 32 | - set(TLS_POSTFIX -${TLS_MAJOR_VERSION} PARENT_SCOPE) 33 | + set(TLS_POSTFIX "") 34 | endif() 35 | set_target_properties(tls PROPERTIES 36 | OUTPUT_NAME tls${TLS_POSTFIX} 37 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # To get started with Dependabot version updates, you'll need to specify which 3 | # package ecosystems to update and where the package manifests are located. 4 | # Please see the documentation for all configuration options: 5 | # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 6 | 7 | version: 2 8 | updates: 9 | 10 | - package-ecosystem: "gitsubmodule" 11 | directory: "/" 12 | target-branch: "develop" 13 | schedule: 14 | interval: "daily" 15 | open-pull-requests-limit: 0 16 | 17 | - package-ecosystem: "github-actions" 18 | directory: "/" 19 | target-branch: "develop" 20 | schedule: 21 | interval: "daily" 22 | open-pull-requests-limit: 0 23 | 24 | - package-ecosystem: "docker" 25 | directory: "/" 26 | target-branch: "develop" 27 | schedule: 28 | interval: "weekly" 29 | open-pull-requests-limit: 0 30 | 31 | - package-ecosystem: "pip" 32 | directory: "/tools/certGen/" 33 | target-branch: "develop" 34 | schedule: 35 | interval: "weekly" 36 | open-pull-requests-limit: 0 37 | -------------------------------------------------------------------------------- /.github/linters/.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | BasedOnStyle: Google 3 | IndentWidth: 2 4 | --- 5 | Language: Cpp 6 | ColumnLimit: 160 7 | BinPackParameters: false 8 | BinPackArguments: false 9 | AlignAfterOpenBracket: AlwaysBreak 10 | ContinuationIndentWidth: 2 11 | ConstructorInitializerIndentWidth: 2 12 | ... 13 | -------------------------------------------------------------------------------- /.github/linters/.clang-format-ignore: -------------------------------------------------------------------------------- 1 | 2 | ./build/* 3 | ./deps/* 4 | ./src_generated/* 5 | -------------------------------------------------------------------------------- /.github/linters/.jscpd.json: -------------------------------------------------------------------------------- 1 | { 2 | "threshold": 12, 3 | "reporters": [ 4 | "consoleFull" 5 | ], 6 | "ignore": [ 7 | "**/__snapshots__/**", 8 | "**/build/**", 9 | "**/deps/**", 10 | "**/_build/**", 11 | "**/_install/**", 12 | "**/.venv/**", 13 | "**/.venv2/**" 14 | 15 | ], 16 | "absolute": true 17 | } -------------------------------------------------------------------------------- /.github/linters/.yaml-lint.yml: -------------------------------------------------------------------------------- 1 | --- 2 | ########################################### 3 | # These are the rules used for # 4 | # linting all the yaml files in the stack # 5 | # NOTE: # 6 | # You can disable line with: # 7 | # # yamllint disable-line # 8 | ########################################### 9 | rules: 10 | braces: 11 | level: warning 12 | min-spaces-inside: 0 13 | max-spaces-inside: 0 14 | min-spaces-inside-empty: 1 15 | max-spaces-inside-empty: 5 16 | brackets: 17 | level: warning 18 | min-spaces-inside: 0 19 | max-spaces-inside: 0 20 | min-spaces-inside-empty: 1 21 | max-spaces-inside-empty: 5 22 | colons: 23 | level: warning 24 | max-spaces-before: 0 25 | max-spaces-after: 1 26 | commas: 27 | level: warning 28 | max-spaces-before: 0 29 | min-spaces-after: 1 30 | max-spaces-after: 1 31 | comments: disable 32 | comments-indentation: disable 33 | document-end: disable 34 | document-start: 35 | level: warning 36 | present: true 37 | empty-lines: 38 | level: warning 39 | max: 2 40 | max-start: 0 41 | max-end: 0 42 | hyphens: 43 | level: warning 44 | max-spaces-after: 1 45 | indentation: 46 | level: warning 47 | spaces: consistent 48 | indent-sequences: true 49 | check-multi-line-strings: false 50 | key-duplicates: enable 51 | line-length: 52 | level: warning 53 | max: 80 54 | allow-non-breakable-words: true 55 | allow-non-breakable-inline-mappings: true 56 | new-line-at-end-of-file: disable 57 | new-lines: 58 | type: unix 59 | trailing-spaces: disable -------------------------------------------------------------------------------- /.github/linters/cmake-format.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | additional_commands: 3 | ua_generate_nodeset_and_datatypes: 4 | flags: 5 | - INTERNAL 6 | kwargs: 7 | NAME: '1' 8 | FILE_NS: '1' 9 | FILE_CSV: '1' 10 | FILE_BSD: '1' 11 | OUTPUT_DIR: '1' 12 | TARGET_PREFIX: '1' 13 | BLACKLIST: '1' 14 | NAMESPACE_MAP: '+' 15 | IMPORT_BSD: '+' 16 | DEPENDS: '+' 17 | always_wrap: [target_sources] 18 | command_case: lower 19 | dangle_parens: true 20 | enable_markup: true 21 | first_comment_is_literal: true 22 | keyword_case: upper 23 | line_ending: unix 24 | line_width: 120 25 | literal_comment_pattern: null 26 | separate_ctrl_name_with_space: false 27 | separate_fn_name_with_space: false 28 | tab_size: 4 29 | autosort: true 30 | -------------------------------------------------------------------------------- /.github/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["config:recommended"], 3 | "rebaseWhen": "behind-base-branch", 4 | "dependencyDashboard": true, 5 | "git-submodules": {"enabled": true}, 6 | "customManagers": [ 7 | { 8 | "customType": "regex", 9 | "fileMatch": ["^Dockerfile$"], 10 | "matchStringsStrategy": "any", 11 | "matchStrings": [ 12 | "\\s\\s(?[a-z0-9][a-z0-9-_]+)=(?[a-z0-9-_.]+)\\s+" 13 | ], 14 | "versioningTemplate": "loose", 15 | "datasourceTemplate": "repology", 16 | "depNameTemplate": "alpine_3_21/{{package}}" 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /.github/workflows/delete-images.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Clean up docker images 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | # * is a special character in YAML so you have to quote this string 7 | - cron: '0 0 1 * *' 8 | 9 | permissions: 10 | contents: read 11 | packages: write 12 | 13 | jobs: 14 | build: 15 | runs-on: ubuntu-latest 16 | 17 | steps: 18 | - uses: actions/github-script@v7.0.1 19 | env: 20 | PACKAGE_NAME: sample-server 21 | PER_PAGE: 100 22 | with: 23 | github-token: ${{ secrets.DELETE_PACKAGES_TOKEN }} 24 | # yamllint disable rule:line-length 25 | script: | 26 | const response = await github.request("GET /orgs/${{ github.repository_owner }}/packages/container/${{ env.PACKAGE_NAME }}/versions", 27 | { per_page: ${{ env.PER_PAGE }} 28 | }); 29 | for(version of response.data) { 30 | if (version.metadata.container.tags.length == 0) { 31 | console.log("delete " + version.id) 32 | const deleteResponse = await github.request("DELETE /orgs/${{ github.repository_owner }}/packages/container/${{ env.PACKAGE_NAME }}/versions/" + version.id, { }); 33 | console.log("status " + deleteResponse.status) 34 | } 35 | } 36 | # yamllint enable rule:line-length 37 | -------------------------------------------------------------------------------- /.github/workflows/rebase.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Automatic Rebase 3 | on: 4 | issue_comment: 5 | types: [created] 6 | 7 | permissions: 8 | contents: read 9 | pull-requests: write 10 | 11 | jobs: 12 | rebase: 13 | name: Rebase 14 | if: github.event.issue.pull_request != '' && 15 | contains(github.event.comment.body, '/rebase') && 16 | github.event.comment.author_association == 'MEMBER' 17 | runs-on: ubuntu-latest 18 | steps: 19 | - name: Checkout the latest code 20 | uses: actions/checkout@v4 21 | with: 22 | token: ${{ secrets.REBASE_PAT }} 23 | fetch-depth: 0 # otherwise, you will fail to push refs to dest repo 24 | - name: Automatic Rebase 25 | uses: cirrus-actions/rebase@1.8 26 | env: 27 | GITHUB_TOKEN: ${{ secrets.REBASE_PAT }} 28 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | src_generated/ 2 | build-auto/ 3 | install/ 4 | package*.json 5 | node_modules 6 | /.vscode 7 | build/ 8 | _build/ 9 | _install/ 10 | buildDeps/ 11 | super-linter-output/ 12 | super-linter.log 13 | github_conf/ -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "deps/open62541"] 2 | path = deps/open62541 3 | url = https://github.com/open62541/open62541.git 4 | branch = 1.4 5 | [submodule "deps/googletest"] 6 | path = deps/googletest 7 | url = https://github.com/google/googletest.git 8 | [submodule "deps/open62541Cpp"] 9 | path = deps/open62541Cpp 10 | url = https://github.com/umati/open62541Cpp.git 11 | [submodule "deps/refl-cpp"] 12 | path = deps/refl-cpp 13 | url = https://github.com/veselink1/refl-cpp.git 14 | [submodule "deps/json"] 15 | path = deps/json 16 | url = https://github.com/nlohmann/json.git 17 | -------------------------------------------------------------------------------- /.gitpod.Dockerfile: -------------------------------------------------------------------------------- 1 | # MIT License 2 | # 3 | # Copyright 2018 (c) TypeFox GmbH 4 | # Copyright 2021 (c) Götz Görisch, VDW - Verein Deutscher Werkzeugmaschinenfabriken e.V. 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy 7 | # of this software and associated documentation files (the "Software"), to deal 8 | # in the Software without restriction, including without limitation the rights 9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | # copies of the Software, and to permit persons to whom the Software is 11 | # furnished to do so, subject to the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included in all 14 | # copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | # SOFTWARE. 23 | # hadolint ignore=DL3007 24 | FROM gitpod/workspace-full:2023-03-24-22-45-37 25 | 26 | # Install custom tools, runtimes, etc. 27 | # For example "bastet", a command-line tetris clone: 28 | # RUN brew install bastet 29 | # 30 | # More information: https://www.gitpod.io/docs/config-docker/ -------------------------------------------------------------------------------- /.gitpod.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # MIT License 3 | # 4 | # Copyright (c) 2018 TypeFox GmbH 5 | # Copyright (c) 2021-2022 Götz Görisch, VDW - Verein Deutscher Werkzeugmaschinenfabriken e.V. 6 | # 7 | # Permission is hereby granted, free of charge, to any person obtaining a copy 8 | # of this software and associated documentation files (the "Software"), to deal 9 | # in the Software without restriction, including without limitation the rights 10 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | # copies of the Software, and to permit persons to whom the Software is 12 | # furnished to do so, subject to the following conditions: 13 | # 14 | # The above copyright notice and this permission notice shall be included in all 15 | # copies or substantial portions of the Software. 16 | # 17 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | # SOFTWARE. 24 | # hadolint ignore=DL3007 25 | image: gitpod/workspace-full:latest 26 | 27 | tasks: 28 | - init: | 29 | npm install --location=global opcua-commander renovate && \ 30 | sudo apt update && sudo apt -yy install yamllint && pip install cmakelang 31 | command: bash ./initialbuild.sh 32 | -------------------------------------------------------------------------------- /.whitesource: -------------------------------------------------------------------------------- 1 | { 2 | "scanSettings": { 3 | "baseBranches": [] 4 | }, 5 | "checkRunSettings": { 6 | "vulnerableCheckRunConclusionLevel": "failure", 7 | "displayMode": "diff", 8 | "useMendCheckNames": true 9 | }, 10 | "issueSettings": { 11 | "minSeverityLevel": "LOW", 12 | "issueType": "DEPENDENCY" 13 | } 14 | } -------------------------------------------------------------------------------- /AdditiveManufacturing/BasicAMMachine.cpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Patrick Moeller, 3Yourmind GmbH 6 | * Copyright 2022 (c) Dennis Hezel, 3Yourmind GmbH 7 | */ 8 | 9 | #include "BasicAMMachine.hpp" 10 | 11 | BasicAMMachine::BasicAMMachine(UA_Server *pServer) : InstantiatedAMMachine(pServer) { 12 | MachineName = "BasicAMMachine"; 13 | CreateObject(); 14 | } 15 | 16 | void BasicAMMachine::Simulate() { 17 | ++m_simStep; 18 | if ((m_simStep % 2) == 1) { 19 | SimulateStacklight(); 20 | } 21 | 22 | mt.Monitoring->MachineTool->PowerOnDuration = m_simStep / 3600; 23 | } -------------------------------------------------------------------------------- /AdditiveManufacturing/BasicAMMachine.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Patrick Moeller, 3Yourmind GmbH 6 | * Copyright 2022 (c) Dennis Hezel, 3Yourmind GmbH 7 | */ 8 | 9 | #pragma once 10 | #include "../AdditiveManufacturing/InstantiatedAMMachine.hpp" 11 | 12 | class BasicAMMachine : public InstantiatedAMMachine { 13 | public: 14 | BasicAMMachine(UA_Server *pServer); 15 | 16 | void Simulate() override; 17 | virtual ~BasicAMMachine() = default; 18 | 19 | protected: 20 | int m_simStep = 0; 21 | }; -------------------------------------------------------------------------------- /AdditiveManufacturing/InstantiatedAMMachine.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Patrick Moeller, 3Yourmind GmbH 6 | * Copyright 2022 (c) Dennis Hezel, 3Yourmind GmbH 7 | */ 8 | 9 | #pragma once 10 | #include 11 | 12 | #include 13 | #include 14 | 15 | #include "../MachineTools/SimulatedInstance.hpp" 16 | #include "../TypeDefinition/AdditiveManufacturing/AdditiveManufacturing.hpp" 17 | #include "../UmatiServerLib/NodesMaster.hpp" 18 | 19 | class InstantiatedAMMachine : public SimulatedInstance { 20 | public: 21 | InstantiatedAMMachine(UA_Server *pServer); 22 | 23 | const std::uint16_t &NsIndex; 24 | 25 | protected: 26 | virtual void CreateObject(); 27 | 28 | virtual void InstantiateIdentification(); 29 | virtual void InstantiateMonitoringStacklight(std::list stacklightColors); 30 | virtual void InstantiateMonitoring(); 31 | virtual void InstantiateProduction(); 32 | virtual void SimulateStacklight(); 33 | 34 | std::string MachineName; 35 | std::uint16_t m_nsIndex; 36 | AdditiveManufacturing::AM_t mt; 37 | UA_Server *m_pServer; 38 | open62541Cpp::UA_NodeId m_nodeId = open62541Cpp::UA_NodeId((std::uint16_t)0, 0); 39 | NodesMaster n; 40 | }; -------------------------------------------------------------------------------- /AdditiveManufacturing/ShowcaseAMMachine.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Patrick Moeller, 3Yourmind GmbH 6 | * Copyright 2022 (c) Dennis Hezel, 3Yourmind GmbH 7 | */ 8 | 9 | #pragma once 10 | #include "../AdditiveManufacturing/InstantiatedAMMachine.hpp" 11 | 12 | class ShowcaseAMMachine : public InstantiatedAMMachine { 13 | public: 14 | ShowcaseAMMachine(UA_Server *pServer); 15 | 16 | void Simulate() override; 17 | virtual ~ShowcaseAMMachine() = default; 18 | 19 | protected: 20 | void CreateObject() override; 21 | 22 | void InstantiateEquipment(); 23 | void InstantiateTools(); 24 | int m_simStep = 0; 25 | }; 26 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to umati 2 | 3 | Contributions to umati include code, documentation, answering user questions, running the project's infrastructure, and advocating for all types of umati users. 4 | By submitting code as an individual or an entity you agree to the [umati contributor license agreement](https://gist.github.com/GoetzGoerisch/8abc140a24985e52f6d40a2b1d2d4c2b). 5 | 6 | The umati project welcomes all contributions from anyone willing to work in good faith with other contributors and the community. No contribution is too 7 | small and all contributions are valued. 8 | 9 | This guide explains the process for contributing to the umati project's core repository and describes what to expect at each step. Thank you for considering these point. 10 | 11 | Your friendly umati community! 12 | 13 | ## Code of Conduct 14 | 15 | The umati project has a [Code of Conduct](CODE_OF_CONDUCT.md) that *all* contributors are expected to follow. This code describes the *minimum* behavior expectations for all contributors. 16 | 17 | [TODO] 18 | -------------------------------------------------------------------------------- /Configuration/Configuration.cpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2022 (c) Alen Galinec 7 | */ 8 | 9 | #include "Configuration.hpp" 10 | 11 | namespace Configuration { 12 | Configuration DefaultConfiguration() { 13 | Configuration ret; 14 | ret.Hostname = "localhost"; 15 | ret.Port = 4840; 16 | Encryption_t enc; 17 | enc.ServerKey = "Server_key.pem"; 18 | enc.ServerCert = "Server_cert.pem"; 19 | ret.Encryption = enc; 20 | return ret; 21 | } 22 | } // namespace Configuration 23 | -------------------------------------------------------------------------------- /Configuration/Configuration.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright (c) 2021,2023 Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright (c) 2022 Alen Galinec 7 | */ 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | namespace Configuration { 15 | struct Encryption_t { 16 | std::string ServerCert; 17 | std::string ServerKey; 18 | std::vector TrustedClients; 19 | std::vector IssuerCerts; 20 | std::vector Revocation; 21 | /** 22 | std::string TrustedClientsDir; 23 | std::string IssuerDir; 24 | std::string RevocationDir; 25 | */ 26 | }; 27 | 28 | struct UserPassAuthentication_t { 29 | std::string Username; 30 | std::string Password; 31 | }; 32 | 33 | struct Configuration { 34 | std::optional Hostname; 35 | std::optional Port; 36 | std::optional> UserPassAuthentication; 37 | std::optional Encryption; 38 | }; 39 | 40 | Configuration DefaultConfiguration(); 41 | 42 | } // namespace Configuration 43 | -------------------------------------------------------------------------------- /Configuration/Configuration_json.cpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2022 (c) Alen Galinec 7 | */ 8 | 9 | #include "Configuration_json.hpp" 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | namespace Configuration { 16 | NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Encryption_t, ServerCert, ServerKey, TrustedClients, IssuerCerts, Revocation); 17 | NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(UserPassAuthentication_t, Username, Password); 18 | 19 | void from_json(const nlohmann::json &j, Configuration &p) { 20 | // if we also allow "null" values, then we need to add an "is_string()" 21 | // check 22 | if (j.count("Hostname") != 0) { 23 | p.Hostname = j.at("Hostname").get(); 24 | } 25 | 26 | if (j.count("Port") != 0) { 27 | p.Port = j.at("Port").get(); 28 | } 29 | 30 | if (j.count("Encryption") != 0) { 31 | p.Encryption = j.at("Encryption").get(); 32 | } 33 | 34 | if (j.count("UserPassAuthentication") != 0) { 35 | p.UserPassAuthentication = j.at("UserPassAuthentication").get(); 36 | } 37 | } 38 | 39 | Configuration FromJsonFile(std::string filename) { 40 | std::ifstream ifs(filename); 41 | if (!ifs.good()) { 42 | std::stringstream ss; 43 | ss << "File not found: '" << filename << "'"; 44 | throw std::runtime_error("File not found."); 45 | } 46 | nlohmann::json j; 47 | ifs >> j; 48 | return j.get(); 49 | } 50 | } // namespace Configuration 51 | -------------------------------------------------------------------------------- /Configuration/Configuration_json.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #include "Configuration.hpp" 9 | 10 | namespace Configuration { 11 | Configuration FromJsonFile(std::string filename); 12 | } 13 | -------------------------------------------------------------------------------- /Exceptions/NodeNotFound.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include 10 | 11 | namespace UmatiServerLib::Exceptions { 12 | 13 | class NodeNotFound : public std::runtime_error { 14 | public: 15 | using std::runtime_error::runtime_error; 16 | }; 17 | 18 | } // namespace UmatiServerLib::Exceptions 19 | -------------------------------------------------------------------------------- /GMS/BasicGMS.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Sebastian Friedl, ISW University of Stuttgart (for VDMA e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../MachineTools/InstantiatedMachineTool.hpp" 10 | #include "../TypeDefinition/GMS/GMSType.hpp" 11 | 12 | class BasicGMS : public InstantiatedMachineTool { 13 | public: 14 | BasicGMS(UA_Server *pServer); 15 | 16 | void Simulate() override; 17 | virtual ~BasicGMS() = default; 18 | 19 | protected: 20 | void CreateObject() override; 21 | 22 | GMS::GMS_t mt; 23 | UA_String m_resulturi[1]; 24 | void InstantiateIdentification(); 25 | void InstantiateMonitoring(); 26 | void InstantiateProduction(); 27 | void InstantiateTools(); 28 | int m_simStep = 0; 29 | 30 | void initCorrection(GMS::CorrectionType_t &corr, std::string Identifier, std::string CharacteristicIdentifier, double value); 31 | 32 | void InstantiateResultManagement(); 33 | }; 34 | -------------------------------------------------------------------------------- /GMS/FullGMS.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Alen Galinec 6 | */ 7 | 8 | #pragma once 9 | 10 | #include "../TypeDefinition/GMS/GMSType.hpp" 11 | #include "InstantiatedGMS.hpp" 12 | 13 | class FullGMS : public InstantiatedGMS { 14 | public: 15 | FullGMS(UA_Server *pServer); 16 | 17 | virtual ~FullGMS() = default; 18 | 19 | protected: 20 | void CreateObject() override; 21 | 22 | void InstantiateIdentification() override; 23 | void InstantiateMonitoring() override; 24 | void InstantiateProduction() override; 25 | void InstantiateEquipment() override; 26 | void InstantiateNotification() override; 27 | }; 28 | -------------------------------------------------------------------------------- /GMS/HexagonGlobal.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Sebastian Friedl, ISW University of Stuttgart (for VDMA e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../MachineTools/InstantiatedMachineTool.hpp" 10 | #include "../TypeDefinition/GMS/GMSType.hpp" 11 | 12 | class HexagonGlobal : public InstantiatedMachineTool { 13 | public: 14 | HexagonGlobal(UA_Server *pServer); 15 | 16 | void Simulate() override; 17 | virtual ~HexagonGlobal() = default; 18 | 19 | protected: 20 | void CreateObject() override; 21 | 22 | GMS::GMS_t mt; 23 | UA_String m_resulturi[1]; 24 | void InstantiateIdentification(); 25 | void InstantiateMonitoring(); 26 | void InstantiateProduction(); 27 | void InstantiateTools(); 28 | int m_simStep = 0; 29 | 30 | void initCorrection(GMS::CorrectionType_t &corr, std::string Identifier, std::string CharacteristicIdentifier, double value); 31 | 32 | void InstantiateResultManagement(); 33 | }; 34 | -------------------------------------------------------------------------------- /GMS/HexagonSim.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Sebastian Friedl, ISW University of Stuttgart (for VDMA e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../MachineTools/InstantiatedMachineTool.hpp" 10 | #include "../TypeDefinition/GMS/GMSType.hpp" 11 | 12 | class HexagonSim : public InstantiatedMachineTool { 13 | public: 14 | HexagonSim(UA_Server *pServer); 15 | 16 | void Simulate() override; 17 | virtual ~HexagonSim() = default; 18 | 19 | protected: 20 | void CreateObject() override; 21 | 22 | GMS::GMS_t mt; 23 | UA_String m_resulturi[1]; 24 | void InstantiateIdentification(); 25 | void InstantiateMonitoring(); 26 | void InstantiateProduction(); 27 | void InstantiateTools(); 28 | int m_simStep = 0; 29 | 30 | void initCorrection(GMS::CorrectionType_t &corr, std::string Identifier, std::string CharacteristicIdentifier, double value); 31 | 32 | void InstantiateResultManagement(); 33 | }; 34 | -------------------------------------------------------------------------------- /GMS/InstantiatedGMS.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Alen Galinec 6 | */ 7 | 8 | #pragma once 9 | #include 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../MachineTools/SimulatedInstance.hpp" 16 | #include "../TypeDefinition/GMS/GMSType.hpp" 17 | #include "../UmatiServerLib/NodesMaster.hpp" 18 | 19 | class InstantiatedGMS : public SimulatedInstance { 20 | public: 21 | InstantiatedGMS(UA_Server *pServer); 22 | 23 | const std::uint16_t &NsIndex; 24 | 25 | protected: 26 | virtual void CreateObject(); 27 | 28 | virtual void Simulate() override; 29 | 30 | virtual void InstantiateEquipment(); 31 | virtual void InstantiateIdentification(); 32 | virtual void InstantiateNotification(); 33 | virtual void InstantiateProduction(); 34 | virtual void InstantiateResultManagement(); 35 | virtual void InstantiateMonitoring(); 36 | 37 | // TODO: Take care of subcomponents later 38 | // virtual void InstantiateNotificationCalibration(); 39 | // virtual void InstantiatePrognosesCalibration(); 40 | 41 | protected: 42 | static const std::unordered_map CLASS_MAP; 43 | GMS::GMSSensor_t &InstantiateSensor(std::string const &sensorName); 44 | 45 | protected: 46 | std::string MachineName; 47 | std::uint16_t m_nsIndex; 48 | GMS::GMS_t gms; 49 | UA_Server *m_pServer; 50 | open62541Cpp::UA_NodeId m_nodeId = open62541Cpp::UA_NodeId((std::uint16_t)0, 0); 51 | NodesMaster n; 52 | }; 53 | -------------------------------------------------------------------------------- /GMS/OGPSmartScopeCNC500.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Sebastian Friedl, ISW University of Stuttgart (for VDMA e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../MachineTools/InstantiatedMachineTool.hpp" 10 | #include "../TypeDefinition/GMS/GMSType.hpp" 11 | 12 | class OGPSmartScopeCNC500 : public InstantiatedMachineTool { 13 | public: 14 | OGPSmartScopeCNC500(UA_Server *pServer); 15 | 16 | void Simulate() override; 17 | virtual ~OGPSmartScopeCNC500() = default; 18 | 19 | protected: 20 | void CreateObject() override; 21 | 22 | GMS::GMS_t mt; 23 | UA_String m_resulturi[1]; 24 | void InstantiateIdentification(); 25 | void InstantiateMonitoring(); 26 | void InstantiateProduction(); 27 | void InstantiateTools(); 28 | int m_simStep = 0; 29 | 30 | void initCorrection(GMS::CorrectionType_t &corr, std::string Identifier, std::string CharacteristicIdentifier, double value); 31 | 32 | void InstantiateResultManagement(); 33 | }; 34 | -------------------------------------------------------------------------------- /GMS/WenzelLH.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Sebastian Friedl, ISW University of Stuttgart (for VDMA e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../MachineTools/InstantiatedMachineTool.hpp" 10 | #include "../TypeDefinition/GMS/GMSType.hpp" 11 | 12 | class WenzelLH : public InstantiatedMachineTool { 13 | public: 14 | WenzelLH(UA_Server *pServer); 15 | 16 | void Simulate() override; 17 | virtual ~WenzelLH() = default; 18 | 19 | protected: 20 | void CreateObject() override; 21 | 22 | GMS::GMS_t mt; 23 | UA_String m_resulturi[1]; 24 | void InstantiateIdentification(); 25 | void InstantiateMonitoring(); 26 | void InstantiateProduction(); 27 | void InstantiateTools(); 28 | int m_simStep = 0; 29 | 30 | void initCorrection(GMS::CorrectionType_t &corr, std::string Identifier, std::string CharacteristicIdentifier, double value); 31 | 32 | void InstantiateResultManagement(); 33 | }; 34 | -------------------------------------------------------------------------------- /MachineTools/BasicMachineTool.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "InstantiatedMachineTool.hpp" 11 | 12 | class BasicMachineTool : public InstantiatedMachineTool { 13 | public: 14 | BasicMachineTool(UA_Server *pServer); 15 | 16 | void Simulate() override; 17 | virtual ~BasicMachineTool() = default; 18 | 19 | protected: 20 | void CreateObject() override; 21 | 22 | void InstantiateIdentification(); 23 | void InstantiateMonitoring(); 24 | void InstantiateProduction(); 25 | int m_simStep = 0; 26 | }; 27 | -------------------------------------------------------------------------------- /MachineTools/CNShowcaseMachineTool.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | * Copyright 2021 (c) Götz Görisch, VDW - Verein Deutscher Werkzeugmaschinenfabriken e.V. 8 | */ 9 | 10 | #pragma once 11 | #include "InstantiatedMachineTool.hpp" 12 | 13 | class CNShowcaseMachineTool : public InstantiatedMachineTool { 14 | public: 15 | CNShowcaseMachineTool(UA_Server *pServer); 16 | 17 | void Simulate() override; 18 | virtual ~CNShowcaseMachineTool() = default; 19 | 20 | protected: 21 | void CreateObject() override; 22 | 23 | void InstantiateIdentification(); 24 | void InstantiateMonitoring(); 25 | void InstantiateTools(); 26 | void InstantiateProduction(); 27 | int m_simStep = 0; 28 | }; 29 | -------------------------------------------------------------------------------- /MachineTools/FullMachineTool.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | 10 | #include 11 | 12 | #include "../TypeDefinition/MachineTool/Alert.hpp" 13 | #include "../UmatiServerLib/OpcUaCondition.hpp" 14 | #include "../UmatiServerLib/StateMachineInstance.hpp" 15 | #include "InstantiatedMachineTool.hpp" 16 | 17 | class FullMachineTool : public InstantiatedMachineTool { 18 | public: 19 | FullMachineTool(UA_Server *pServer); 20 | 21 | void Simulate() override; 22 | 23 | protected: 24 | // Allow skipping initialization in subclasses 25 | FullMachineTool(UA_Server *pServer, bool initialize); 26 | void CreateObject() override; 27 | 28 | void InstantiateIdentification(); 29 | void InstantiateMonitoring(); 30 | void InstantiateTools(); 31 | void InstantiatePrognosis(); 32 | void InstantiateProduction(); 33 | int m_simStep = 0; 34 | std::shared_ptr> m_pAlert; 35 | UmatiServerLib::StateMachineInstance JobStateMachine; 36 | }; 37 | -------------------------------------------------------------------------------- /MachineTools/FullMachineToolDynamic.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "FullMachineTool.hpp" 10 | 11 | // Chang address space during runtime 12 | class FullMachineToolDynamic : public FullMachineTool { 13 | public: 14 | FullMachineToolDynamic(UA_Server *pServer); 15 | 16 | void Simulate() override; 17 | 18 | protected: 19 | // Allow skipping initialization in subclasses 20 | FullMachineToolDynamic(UA_Server *pServer, bool initialize); 21 | }; 22 | -------------------------------------------------------------------------------- /MachineTools/InstantiatedMachineTool.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include 10 | 11 | #include 12 | #include 13 | 14 | #include "../TypeDefinition/MachineTool/MachineTool.hpp" 15 | #include "../UmatiServerLib/NodesMaster.hpp" 16 | #include "SimulatedInstance.hpp" 17 | 18 | class InstantiatedMachineTool : public SimulatedInstance { 19 | public: 20 | InstantiatedMachineTool(UA_Server *pServer); 21 | 22 | const std::uint16_t &NsIndex; 23 | 24 | protected: 25 | virtual void CreateObject(); 26 | 27 | virtual void InstantiateIdentification(); 28 | virtual void InstantiateMonitoringMT(); 29 | virtual void InstantiateMonitoringStacklight(std::list stacklightColors); 30 | virtual void InstantiateMonitoringChannel(int numChannels); 31 | virtual void SimulateStacklight(); 32 | 33 | std::string MachineName; 34 | std::uint16_t m_nsIndex; 35 | machineTool::MachineTool_t mt; 36 | UA_Server *m_pServer; 37 | open62541Cpp::UA_NodeId m_nodeId = open62541Cpp::UA_NodeId((std::uint16_t)0, 0); 38 | NodesMaster n; 39 | }; 40 | -------------------------------------------------------------------------------- /MachineTools/MRMachineTool.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright (c) 2020-2022 Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright (c) 2020 Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | 11 | #include 12 | 13 | #include "../TypeDefinition/MachineTool/Alert.hpp" 14 | #include "../UmatiServerLib/OpcUaCondition.hpp" 15 | #include "../UmatiServerLib/StateMachineInstance.hpp" 16 | #include "InstantiatedMachineTool.hpp" 17 | 18 | class MRMachineTool : public InstantiatedMachineTool { 19 | public: 20 | MRMachineTool(UA_Server *pServer); 21 | 22 | void Simulate() override; 23 | 24 | protected: 25 | void CreateObject() override; 26 | 27 | void InstantiateIdentification(); 28 | void InstantiateMonitoring(); 29 | void InstantiateTools(); 30 | void InstantiateProduction(); 31 | int m_simStep = 0; 32 | int isOnFor; 33 | void SwitchOnStacklightColor(UA_SignalColor color); 34 | std::shared_ptr> m_pAlert; 35 | std::shared_ptr> ActiveProgramStateMachine; 36 | std::shared_ptr> VdJobStateMachine; 37 | std::shared_ptr> VdJobProgramStateMachine; 38 | }; 39 | -------------------------------------------------------------------------------- /MachineTools/ShowcaseMachineTool.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020-2021 (c) Götz Görisch, VDW - Verein Deutscher Werkzeugmaschinenfabriken e.V. 7 | */ 8 | #pragma once 9 | #include "InstantiatedMachineTool.hpp" 10 | 11 | class ShowcaseMachineTool : public InstantiatedMachineTool { 12 | public: 13 | ShowcaseMachineTool(UA_Server *pServer); 14 | 15 | void Simulate() override; 16 | virtual ~ShowcaseMachineTool() = default; 17 | 18 | protected: 19 | void CreateObject() override; 20 | 21 | void InstantiateIdentification(); 22 | void InstantiateMonitoring(); 23 | void InstantiateTools(); 24 | void InstantiateProduction(); 25 | int m_simStep = 0; 26 | }; 27 | -------------------------------------------------------------------------------- /MachineTools/SimulatedInstance.cpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #include "SimulatedInstance.hpp" 9 | 10 | #include 11 | 12 | SimulatedInstance::SimulatedInstance() { rnd.seed(static_cast(reinterpret_cast(this))); } 13 | 14 | SimulatedInstance::~SimulatedInstance() {} 15 | -------------------------------------------------------------------------------- /MachineTools/SimulatedInstance.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include 10 | 11 | class SimulatedInstance { 12 | public: 13 | SimulatedInstance(); 14 | // Should be called every second 15 | virtual void Simulate() = 0; 16 | virtual ~SimulatedInstance() = 0; 17 | 18 | protected: 19 | // Seeded random generator 20 | std::mt19937 rnd; 21 | }; 22 | -------------------------------------------------------------------------------- /OpcUaTypes/ConstNodeId.cpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #include "ConstNodeId.hpp" 9 | 10 | #include 11 | 12 | #include "../UmatiServerLib/Util.hpp" 13 | 14 | namespace UmatiServerLib::constexp { 15 | 16 | open62541Cpp::UA_NodeId NodeId::UANodeId(UA_Server *pServer) const { 17 | if (NsUri == nullptr) { 18 | return open62541Cpp::UA_NodeId(); 19 | } 20 | UA_UInt16 nsIndex = nsFromUri(pServer, NsUri); 21 | switch (IdentifierType) { 22 | case ::UA_NodeIdType::UA_NODEIDTYPE_NUMERIC: { 23 | return open62541Cpp::UA_NodeId(nsIndex, Identifier.numeric); 24 | break; 25 | } 26 | case ::UA_NodeIdType::UA_NODEIDTYPE_STRING: { 27 | return open62541Cpp::UA_NodeId(nsIndex, Identifier.string); 28 | break; 29 | } 30 | case ::UA_NodeIdType::UA_NODEIDTYPE_GUID: { 31 | throw std::runtime_error("GUID NodeId not implemented."); 32 | break; 33 | } 34 | case ::UA_NodeIdType::UA_NODEIDTYPE_BYTESTRING: { 35 | throw std::runtime_error("Bytestring NodeId not implemented."); 36 | break; 37 | } 38 | default: 39 | throw std::runtime_error("Unknown NodeId type."); 40 | } 41 | } 42 | 43 | } // namespace UmatiServerLib::constexp 44 | -------------------------------------------------------------------------------- /OpcUaTypes/ConstNodeId.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include 10 | #include 11 | 12 | #include 13 | 14 | namespace UmatiServerLib::constexp { 15 | 16 | class NodeId { 17 | public: 18 | const char *NsUri = nullptr; 19 | ::UA_NodeIdType IdentifierType = ::UA_NodeIdType::UA_NODEIDTYPE_NUMERIC; 20 | union { 21 | UA_UInt32 numeric; 22 | const char *string; 23 | UA_Guid guid; 24 | const char *byteString; 25 | } Identifier = {.numeric = 0}; 26 | 27 | constexpr NodeId() = default; 28 | inline constexpr NodeId(const char *nsUri, UA_UInt32 numeric) 29 | : NsUri(nsUri), IdentifierType(::UA_NodeIdType::UA_NODEIDTYPE_NUMERIC), Identifier{.numeric = numeric} {} 30 | inline constexpr NodeId(const char *nsUri, UA_Guid guid) : NsUri(nsUri), IdentifierType(::UA_NodeIdType::UA_NODEIDTYPE_GUID), Identifier{.guid = guid} {} 31 | 32 | inline constexpr NodeId(const char *nsUri, ::UA_NodeIdType identifierType, const char *string) 33 | : NsUri(nsUri), IdentifierType(identifierType), Identifier{.string = string} {} 34 | 35 | open62541Cpp::UA_NodeId UANodeId(UA_Server *pServer) const; 36 | }; 37 | 38 | } // namespace UmatiServerLib::constexp 39 | -------------------------------------------------------------------------------- /OpcUaTypes/DateTime.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #include 9 | 10 | namespace UmatiServerLib { 11 | typedef std::chrono::time_point DateTime_t; 12 | } 13 | -------------------------------------------------------------------------------- /OpcUaTypes/EUInformation.cpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #include "EUInformation.hpp" 9 | 10 | #include "LocalizedText.hpp" 11 | 12 | namespace UmatiServerLib { 13 | 14 | EUInformation_t EUInformation_t::fromUa(const ::UA_EUInformation &other) { 15 | EUInformation_t ret{ 16 | .NamespaceUri = std::string((const char *)other.namespaceUri.data, other.namespaceUri.length), 17 | .UnitId = other.unitId, 18 | .DisplayName = LocalizedText_t::fromUa(other.displayName), 19 | .Description = LocalizedText_t::fromUa(other.description), 20 | }; 21 | return ret; 22 | } 23 | 24 | bool EUInformation_t::operator==(const EUInformation_t &other) const { 25 | return this->NamespaceUri == other.NamespaceUri && this->UnitId == other.UnitId && this->Description == other.Description && 26 | this->DisplayName == other.DisplayName; 27 | } 28 | 29 | } // namespace UmatiServerLib 30 | -------------------------------------------------------------------------------- /OpcUaTypes/EUInformation.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include 10 | 11 | #include "LocalizedText.hpp" 12 | 13 | namespace UmatiServerLib { 14 | struct EUInformation_t { 15 | std::string NamespaceUri; 16 | UA_Int32 UnitId; 17 | LocalizedText_t DisplayName; 18 | LocalizedText_t Description; 19 | 20 | static EUInformation_t fromUa(const ::UA_EUInformation &other); 21 | bool operator==(const EUInformation_t &other) const; 22 | }; 23 | 24 | } // namespace UmatiServerLib 25 | 26 | REFL_TYPE(UmatiServerLib::EUInformation_t, UmatiServerLib::attribute::UaDataType(&UA_TYPES[UA_TYPES_EUINFORMATION])) 27 | REFL_FIELD(NamespaceUri) 28 | REFL_FIELD(UnitId) 29 | REFL_FIELD(DisplayName) 30 | REFL_FIELD(Description) 31 | REFL_END 32 | -------------------------------------------------------------------------------- /OpcUaTypes/LocalizedText.cpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #include "LocalizedText.hpp" 9 | 10 | namespace UmatiServerLib { 11 | 12 | LocalizedText_t LocalizedText_t::fromUa(const ::UA_LocalizedText &other) { 13 | LocalizedText_t ret{ 14 | .locale = std::string((const char *)other.locale.data, other.locale.length), .text = std::string((const char *)other.text.data, other.text.length)}; 15 | return ret; 16 | } 17 | 18 | bool LocalizedText_t::operator==(const LocalizedText_t &other) const { return this->locale == other.locale && this->text == other.text; } 19 | 20 | } // namespace UmatiServerLib 21 | -------------------------------------------------------------------------------- /OpcUaTypes/ReflectionHelper.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | 10 | #include 11 | 12 | #include 13 | 14 | #define UMATISERVERLIB_PADDING(TYPE, MEMBER, PREVMEMBER) (offsetof(TYPE, MEMBER) - offsetof(TYPE, PREVMEMBER) - sizeof(TYPE::MEMBER)) 15 | 16 | namespace UmatiServerLib::attribute { 17 | struct UaDataType : refl::attr::usage::type { 18 | // public: 19 | const UA_DataType *pDataType; 20 | constexpr UaDataType(const UA_DataType *pdataType) : pDataType(pdataType) {} 21 | }; 22 | } // namespace UmatiServerLib::attribute 23 | -------------------------------------------------------------------------------- /OpcUaTypes/StatusCode.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include 10 | 11 | namespace UmatiServerLib { 12 | struct StatusCode_t { 13 | UA_StatusCode code; 14 | }; 15 | 16 | } // namespace UmatiServerLib 17 | -------------------------------------------------------------------------------- /Robotics/BasicRobot.cpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #include "BasicRobot.hpp" 9 | 10 | BasicRobot::BasicRobot(UA_Server *pServer) : BasicRobot(pServer, true) {} 11 | 12 | BasicRobot::BasicRobot(UA_Server *pServer, bool initialize) : InstantiatedRobot(pServer) { 13 | if (initialize) { 14 | Name = "BasicRobot"; 15 | CreateObject(); 16 | AddIdentificationAddin(); 17 | } 18 | } 19 | 20 | void BasicRobot::Simulate() { ++m_simStep; } 21 | -------------------------------------------------------------------------------- /Robotics/BasicRobot.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #include "InstantiatedRobot.hpp" 9 | 10 | class BasicRobot : public InstantiatedRobot { 11 | public: 12 | BasicRobot(UA_Server *pServer); 13 | 14 | protected: 15 | BasicRobot(UA_Server *pServer, bool initialize); 16 | void Simulate() override; 17 | int m_simStep = 0; 18 | }; 19 | -------------------------------------------------------------------------------- /Robotics/InstantiatedRobot.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #include 9 | 10 | #include 11 | 12 | #include "../MachineTools/SimulatedInstance.hpp" 13 | #include "../TypeDefinition/Robotics/MotionDevice.hpp" 14 | #include "../UmatiServerLib/NodesMaster.hpp" 15 | 16 | class InstantiatedRobot : public SimulatedInstance { 17 | private: 18 | public: 19 | InstantiatedRobot(UA_Server *pServer); 20 | ~InstantiatedRobot(); 21 | const std::uint16_t &NsIndex; 22 | 23 | protected: 24 | virtual void CreateObject(); 25 | virtual void AddIdentificationAddin(); 26 | std::string Name; 27 | std::uint16_t m_nsIndex = 0; 28 | robotics::MotionDevice_t rb; 29 | UA_Server *m_pServer; 30 | open62541Cpp::UA_NodeId m_nodeId = open62541Cpp::UA_NodeId((std::uint16_t)0, 0); 31 | NodesMaster n; 32 | }; 33 | -------------------------------------------------------------------------------- /TypeDefinition/AdditiveManufacturing/AdditiveManufacturing.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Patrick Moeller, 3Yourmind GmbH 6 | * Copyright 2022 (c) Dennis Hezel, 3Yourmind GmbH 7 | */ 8 | 9 | #pragma once 10 | #include "../../UmatiServerLib/BindableMember.hpp" 11 | #include "../MachineTool/MachineTool.hpp" 12 | #include "../TypeDefinition.hpp" 13 | #include "Constants.hpp" 14 | #include "EquipmentAM.hpp" 15 | #include "MachineIdentificationAM.hpp" 16 | 17 | namespace AdditiveManufacturing { 18 | struct AM_t : public machineTool::MachineTool_t { 19 | BindableMember Equipment; 20 | BindableMember Identification; 21 | }; 22 | } // namespace AdditiveManufacturing 23 | 24 | REFL_TYPE( 25 | AdditiveManufacturing::AM_t, 26 | Bases(), 27 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsAMUri, UA_ADDITIVEMANUFACTURINGID_ADDITIVEMANUFACTURINGTYPE))) 28 | REFL_FIELD(Equipment, UmatiServerLib::attribute::UaBrowseName(constants::NsMachineToolUri)) 29 | REFL_FIELD(Identification, UmatiServerLib::attribute::UaBrowseName(constants::NsDIUri)) 30 | REFL_END 31 | -------------------------------------------------------------------------------- /TypeDefinition/AdditiveManufacturing/Constants.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Patrick Moeller, 3Yourmind GmbH 6 | * Copyright 2022 (c) Dennis Hezel, 3Yourmind GmbH 7 | */ 8 | 9 | #pragma once 10 | #include "../../src_generated/additivemanufacturing_nodeids.h" 11 | #include "../../src_generated/types_additivemanufacturing_generated.h" 12 | 13 | namespace constants { 14 | constexpr const char *NsAMUri = "http://opcfoundation.org/UA/AdditiveManufacturing/NodeSet2/"; 15 | } 16 | -------------------------------------------------------------------------------- /TypeDefinition/AdditiveManufacturing/ConsumableList.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Patrick Moeller, 3Yourmind GmbH 6 | * Copyright 2022 (c) Dennis Hezel, 3Yourmind GmbH 7 | */ 8 | 9 | #pragma once 10 | #include "../../UmatiServerLib/BindableMember.hpp" 11 | #include "../../UmatiServerLib/BindableMemberPlaceholder.hpp" 12 | #include "../TypeDefinition.hpp" 13 | #include "../ns0/Constants.hpp" 14 | #include "Constants.hpp" 15 | #include "Consumable.hpp" 16 | 17 | namespace AdditiveManufacturing { 18 | 19 | struct ConsumableList_t { 20 | BindableMemberPlaceholder Consumable; 21 | }; 22 | 23 | } // namespace AdditiveManufacturing 24 | 25 | REFL_TYPE( 26 | AdditiveManufacturing::ConsumableList_t, 27 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsAMUri, UA_ADDITIVEMANUFACTURINGID_CONSUMABLELISTTYPE))) 28 | REFL_FIELD( 29 | Consumable, 30 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsAMUri, UA_ADDITIVEMANUFACTURINGID_CONSUMABLELISTTYPE_CONSUMABLE)), 31 | UmatiServerLib::attribute::PlaceholderOptional()) 32 | REFL_END 33 | -------------------------------------------------------------------------------- /TypeDefinition/AdditiveManufacturing/EquipmentAM.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Patrick Moeller, 3Yourmind GmbH 6 | * Copyright 2022 (c) Dennis Hezel, 3Yourmind GmbH 7 | */ 8 | 9 | #pragma once 10 | #include "../MachineTool/Equipment.hpp" 11 | #include "../TypeDefinition.hpp" 12 | #include "Constants.hpp" 13 | #include "ConsumableList.hpp" 14 | #include "MaterialList.hpp" 15 | 16 | namespace AdditiveManufacturing { 17 | 18 | struct EquipmentAM_t : public machineTool::Equipment_t { 19 | BindableMember Consumables; 20 | BindableMember Materials; 21 | }; 22 | 23 | } // namespace AdditiveManufacturing 24 | 25 | REFL_TYPE( 26 | AdditiveManufacturing::EquipmentAM_t, 27 | Bases(), 28 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsAMUri, UA_ADDITIVEMANUFACTURINGID_EQUIPMENTAMTYPE))) 29 | REFL_FIELD( 30 | Consumables, 31 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsAMUri, UA_ADDITIVEMANUFACTURINGID_EQUIPMENTAMTYPE_CONSUMABLES)), 32 | UmatiServerLib::attribute::PlaceholderOptional()) 33 | REFL_FIELD( 34 | Materials, 35 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsAMUri, UA_ADDITIVEMANUFACTURINGID_EQUIPMENTAMTYPE_MATERIALS)), 36 | UmatiServerLib::attribute::PlaceholderOptional()) 37 | REFL_END -------------------------------------------------------------------------------- /TypeDefinition/AdditiveManufacturing/MachineIdentificationAM.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Patrick Moeller, 3Yourmind GmbH 6 | * Copyright 2022 (c) Dennis Hezel, 3Yourmind GmbH 7 | */ 8 | 9 | #pragma once 10 | #include 11 | 12 | #include "../../UmatiServerLib/BindableMemberValue.hpp" 13 | #include "../MachineTool/MachineToolIdentification.hpp" 14 | #include "Constants.hpp" 15 | 16 | namespace AdditiveManufacturing { 17 | 18 | struct MachineIdentificationAM_t : public machineTool::MachineToolIdentification_t { 19 | BindableMemberValue AMTechnologyIdentifier; 20 | }; 21 | 22 | } // namespace AdditiveManufacturing 23 | 24 | REFL_TYPE( 25 | AdditiveManufacturing::MachineIdentificationAM_t, 26 | Bases(), 27 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsAMUri, UA_ADDITIVEMANUFACTURINGID_MACHINEIDENTIFICATIONAMTYPE))) 28 | REFL_FIELD( 29 | AMTechnologyIdentifier, 30 | UmatiServerLib::attribute::MemberInTypeNodeId( 31 | UmatiServerLib::constexp::NodeId(constants::NsAMUri, UA_ADDITIVEMANUFACTURINGID_MACHINEIDENTIFICATIONAMTYPE_AMTECHNOLOGYIDENTIFIER)), 32 | UmatiServerLib::attribute::PlaceholderOptional()) 33 | REFL_END 34 | -------------------------------------------------------------------------------- /TypeDefinition/AdditiveManufacturing/MaterialList.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Patrick Moeller, 3Yourmind GmbH 6 | * Copyright 2022 (c) Dennis Hezel, 3Yourmind GmbH 7 | */ 8 | 9 | #pragma once 10 | #include "../../UmatiServerLib/BindableMember.hpp" 11 | #include "../../UmatiServerLib/BindableMemberPlaceholder.hpp" 12 | #include "../TypeDefinition.hpp" 13 | #include "../ns0/Constants.hpp" 14 | #include "Constants.hpp" 15 | #include "Material.hpp" 16 | 17 | namespace AdditiveManufacturing { 18 | 19 | struct MaterialList_t { 20 | BindableMemberPlaceholder Material; 21 | }; 22 | 23 | } // namespace AdditiveManufacturing 24 | 25 | REFL_TYPE( 26 | AdditiveManufacturing::MaterialList_t, 27 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsAMUri, UA_ADDITIVEMANUFACTURINGID_MATERIALLISTTYPE))) 28 | REFL_FIELD( 29 | Material, 30 | UmatiServerLib::attribute::MemberInTypeNodeId( 31 | UmatiServerLib::constexp::NodeId(constants::NsAMUri, UA_ADDITIVEMANUFACTURINGID_EQUIPMENTAMTYPE_MATERIALS_MATERIAL)), 32 | UmatiServerLib::attribute::PlaceholderOptional()) 33 | REFL_END -------------------------------------------------------------------------------- /TypeDefinition/DI/Constants.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../../src_generated/di_nodeids.h" 10 | 11 | namespace constants { 12 | constexpr const char *NsDIUri = "http://opcfoundation.org/UA/DI/"; 13 | } 14 | -------------------------------------------------------------------------------- /TypeDefinition/DI/ITagNameplate.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../TypeDefinition.hpp" 11 | #include "Constants.hpp" 12 | 13 | namespace di { 14 | 15 | struct ITagNameplate_t { 16 | BindableMemberValue AssetId; 17 | BindableMemberValue ComponentName; 18 | }; 19 | 20 | } // namespace di 21 | 22 | REFL_TYPE(di::ITagNameplate_t, UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsDIUri, UA_DIID_ITAGNAMEPLATETYPE))) 23 | REFL_FIELD( 24 | AssetId, 25 | UmatiServerLib::attribute::PlaceholderOptional(), 26 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsDIUri, UA_DIID_ITAGNAMEPLATETYPE_ASSETID))) 27 | REFL_FIELD( 28 | ComponentName, 29 | UmatiServerLib::attribute::PlaceholderOptional(), 30 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsDIUri, UA_DIID_ITAGNAMEPLATETYPE_COMPONENTNAME))) 31 | REFL_END 32 | -------------------------------------------------------------------------------- /TypeDefinition/DI/TopologyElement.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../TypeDefinition.hpp" 10 | #include "Constants.hpp" 11 | 12 | namespace di { 13 | 14 | struct TopologyElement_t {}; 15 | 16 | } // namespace di 17 | 18 | REFL_TYPE(di::TopologyElement_t, UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsDIUri, UA_DIID_TOPOLOGYELEMENTTYPE))) 19 | REFL_END 20 | -------------------------------------------------------------------------------- /TypeDefinition/GMS/Constants.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Sebastian Friedl, ISW University of Stuttgart (for VDMA e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../../src_generated/gms_nodeids.h" 10 | #include "../../src_generated/types_gms_generated.h" 11 | 12 | namespace constants { 13 | constexpr const char *NsGMSUri = "http://opcfoundation.org/UA/GMS/"; 14 | } 15 | -------------------------------------------------------------------------------- /TypeDefinition/GMS/GMSEquipmentType.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2022 (c) Sebastian Friedl, ISW University of Stuttgart (for umati and VDMA e.V.), 7 | * Copyright 2022 (c) Alen Galinec 8 | */ 9 | 10 | #pragma once 11 | #include "../MachineTool/Equipment.hpp" 12 | #include "../MachineTool/ToolList.hpp" 13 | #include "../TypeDefinition.hpp" 14 | #include "Constants.hpp" 15 | #include "GMSToolList.hpp" 16 | 17 | namespace GMS { 18 | 19 | struct GMSEquipment_t : public machineTool::Equipment_t { 20 | BindableMember Tools; 21 | }; 22 | 23 | } // namespace GMS 24 | 25 | REFL_TYPE( 26 | GMS::GMSEquipment_t, 27 | Bases(), 28 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsGMSUri, UA_GMSID_GMSEQUIPMENTTYPE))) 29 | REFL_FIELD( 30 | Tools, 31 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsGMSUri, UA_GMSID_GMSEQUIPMENTTYPE_TOOLS)), 32 | UmatiServerLib::attribute::PlaceholderOptional()) 33 | REFL_END 34 | -------------------------------------------------------------------------------- /TypeDefinition/GMS/GMSIdentificationType.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Sebastian Friedl, ISW University of Stuttgart (for VDMA e.V.) 6 | * Copyright 2022 (c) Alen Galinec 7 | */ 8 | 9 | #pragma once 10 | #include 11 | 12 | #include "../../UmatiServerLib/BindableMemberPlaceholder.hpp" 13 | #include "../MachineTool/MachineToolIdentification.hpp" 14 | #include "../Machinery/IMachineTagNameplate.hpp" 15 | #include "../Machinery/IMachineryItemVendorNameplateType.hpp" 16 | #include "../TypeDefinition.hpp" 17 | #include "../ns0/Constants.hpp" 18 | #include "Constants.hpp" 19 | #include "WorkspaceType.hpp" 20 | 21 | namespace GMS { 22 | 23 | struct GMSIdentification_t : public machineTool::MachineToolIdentification_t { 24 | BindableMemberValue SubDeviceClass; 25 | BindableMemberValue Workspace; 26 | }; 27 | 28 | } // namespace GMS 29 | 30 | REFL_TYPE( 31 | GMS::GMSIdentification_t, 32 | Bases(), 33 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsGMSUri, UA_GMSID_GMSIDENTIFICATIONTYPE))) 34 | REFL_FIELD( 35 | SubDeviceClass, 36 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsGMSUri, UA_GMSID_GMSIDENTIFICATIONTYPE_SUBDEVICECLASS)), 37 | UmatiServerLib::attribute::PlaceholderOptional()) 38 | REFL_FIELD( 39 | Workspace, 40 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsGMSUri, UA_GMSID_GMSIDENTIFICATIONTYPE_WORKSPACE)), 41 | UmatiServerLib::attribute::PlaceholderOptional()) 42 | REFL_END 43 | -------------------------------------------------------------------------------- /TypeDefinition/GMS/GMSNotification.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Sebastian Friedl, ISW University of Stuttgart (for umati and VDMA e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../MachineTool/Notification.hpp" 10 | #include "../MachineTool/PrognosisList.hpp" 11 | #include "../TypeDefinition.hpp" 12 | #include "../ns0/BaseObject.hpp" 13 | #include "Constants.hpp" 14 | #include "GMSPrognosisList.hpp" 15 | 16 | namespace GMS { 17 | 18 | struct GMSNotification_t : public machineTool::Notification_t { 19 | BindableMember Prognoses; 20 | BindableMember Messages; 21 | }; 22 | 23 | } // namespace GMS 24 | 25 | REFL_TYPE( 26 | GMS::GMSNotification_t, 27 | Bases(), 28 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_NOTIFICATIONTYPE))) 29 | REFL_FIELD( 30 | Prognoses, 31 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_NOTIFICATIONTYPE_PROGNOSES)), 32 | UmatiServerLib::attribute::PlaceholderOptional()) 33 | REFL_FIELD( 34 | Messages, 35 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_NOTIFICATIONTYPE_MESSAGES)), 36 | UmatiServerLib::attribute::PlaceholderOptional()) 37 | REFL_END -------------------------------------------------------------------------------- /TypeDefinition/GMS/GMSPrognosisList.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Sebastian Friedl, ISW University of Stuttgart (for umati and VDMA e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../MachineTool/MaintenancePrognosis.hpp" 10 | #include "../MachineTool/ManualActivityPrognosis.hpp" 11 | #include "../MachineTool/PartLoadPrognosis.hpp" 12 | #include "../MachineTool/PartUnLoadPrognosis.hpp" 13 | #include "../MachineTool/ProcessChangeoverPrognosis.hpp" 14 | #include "../MachineTool/ProductionJobEndPrognosis.hpp" 15 | #include "../MachineTool/PrognosisList.hpp" 16 | #include "../MachineTool/ToolChangePrognosis.hpp" 17 | #include "../MachineTool/ToolLoadPrognosis.hpp" 18 | #include "../MachineTool/ToolUnloadPrognosis.hpp" 19 | #include "../MachineTool/UtilityChangePrognosis.hpp" 20 | #include "../TypeDefinition.hpp" 21 | #include "CalibrationPrognosisType.hpp" 22 | #include "Constants.hpp" 23 | 24 | namespace GMS { 25 | 26 | struct GMSPrognosisList_t : public machineTool::PrognosisList_t { 27 | BindableMember Calibration; 28 | }; 29 | 30 | } // namespace GMS 31 | 32 | REFL_TYPE( 33 | GMS::GMSPrognosisList_t, 34 | Bases(), 35 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_PROGNOSISLISTTYPE))) 36 | REFL_FIELD( 37 | Calibration, 38 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsGMSUri, UA_GMSID_GMSTYPE_NOTIFICATION_PROGNOSES_CALIBRATION)), 39 | UmatiServerLib::attribute::PlaceholderOptional()) 40 | REFL_END 41 | -------------------------------------------------------------------------------- /TypeDefinition/GMS/GMSResultManagementType.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Sebastian Friedl, ISW University of Stuttgart (for VDMA e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../MachineryResult/ResultManagementType.hpp" 10 | #include "../TypeDefinition.hpp" 11 | #include "Constants.hpp" 12 | #include "CorrectionType.hpp" 13 | 14 | namespace GMS { 15 | 16 | struct GMSResultManagementType_CorrectionsFolder_t { 17 | BindableMemberPlaceholder Corrections; 18 | }; 19 | 20 | struct GMSResultManagementType_t : public machinery_result::ResultManagementType_t { 21 | BindableMember CorrectionsFolder; 22 | }; 23 | } // namespace GMS 24 | 25 | REFL_TYPE( 26 | GMS::GMSResultManagementType_CorrectionsFolder_t, 27 | UmatiServerLib::attribute::UaObjectType( // TODO handle correctly when this is pointing to an object instead of an object type 28 | UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_FOLDERTYPE))) 29 | REFL_FIELD( 30 | Corrections, 31 | UmatiServerLib::attribute::PlaceholderOptional(), 32 | UmatiServerLib::attribute::MemberInTypeNodeId( 33 | UmatiServerLib::constexp::NodeId(constants::NsGMSUri, UA_GMSID_GMSRESULTMANAGEMENTTYPE_CORRECTIONSFOLDER_CORRECTIONS))) 34 | REFL_END 35 | 36 | REFL_TYPE( 37 | GMS::GMSResultManagementType_t, 38 | Bases(), 39 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsGMSUri, UA_GMSID_GMSRESULTMANAGEMENTTYPE))) 40 | REFL_FIELD( 41 | CorrectionsFolder, 42 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsGMSUri, UA_GMSID_GMSRESULTMANAGEMENTTYPE_CORRECTIONSFOLDER)), 43 | UmatiServerLib::attribute::PlaceholderOptional()) 44 | REFL_END 45 | -------------------------------------------------------------------------------- /TypeDefinition/GMS/GMSToolList.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Alen Galinec 6 | */ 7 | 8 | #pragma once 9 | 10 | #include "../../UmatiServerLib/BindableMemberPlaceholder.hpp" 11 | #include "../MachineTool/ToolList.hpp" 12 | #include "../TypeDefinition.hpp" 13 | #include "Constants.hpp" 14 | #include "GMSSensor.hpp" 15 | 16 | namespace GMS { 17 | 18 | struct GMSToolList_t : public machineTool::ToolList_t { 19 | BindableMemberPlaceholder> Tool; 20 | }; 21 | 22 | } // namespace GMS 23 | 24 | REFL_TYPE( 25 | GMS::GMSToolList_t, 26 | Bases(), 27 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_TOOLLISTTYPE))) 28 | REFL_FIELD( 29 | Tool, 30 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_TOOLLISTTYPE_TOOL)), 31 | UmatiServerLib::attribute::PlaceholderOptional()) 32 | REFL_END 33 | -------------------------------------------------------------------------------- /TypeDefinition/GMS/GMSType.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Sebastian Friedl, ISW University of Stuttgart (for VDMA e.V.) 6 | * Copyright 2022 (c) Alen Galinec 7 | */ 8 | 9 | #pragma once 10 | #include "../MachineTool/MachineTool.hpp" 11 | #include "../MachineTool/Monitoring.hpp" 12 | #include "../MachineTool/Production.hpp" 13 | #include "../TypeDefinition.hpp" 14 | #include "Constants.hpp" 15 | #include "GMSEquipmentType.hpp" 16 | #include "GMSIdentificationType.hpp" 17 | #include "GMSNotification.hpp" 18 | #include "GMSResultManagementType.hpp" 19 | 20 | namespace GMS { 21 | struct GMS_t : public machineTool::MachineTool_t { 22 | BindableMember Equipment; 23 | BindableMember Notification; 24 | BindableMember Identification; 25 | BindableMember ResultManagement; 26 | }; 27 | } // namespace GMS 28 | 29 | REFL_TYPE( 30 | GMS::GMS_t, 31 | Bases(), 32 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsGMSUri, UA_GMSID_GMSTYPE))) 33 | REFL_FIELD(ResultManagement) 34 | REFL_FIELD(Equipment, UmatiServerLib::attribute::UaBrowseName(constants::NsMachineToolUri)) 35 | REFL_FIELD(Notification, UmatiServerLib::attribute::UaBrowseName(constants::NsMachineToolUri)) 36 | REFL_FIELD(Identification, UmatiServerLib::attribute::UaBrowseName(constants::NsDIUri)) 37 | REFL_END 38 | -------------------------------------------------------------------------------- /TypeDefinition/IA/BasicStacklight.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../TypeDefinition.hpp" 11 | #include "../ns0/OrderedList.hpp" 12 | #include "Constants.hpp" 13 | #include "StackElementLight.hpp" 14 | 15 | namespace ia { 16 | 17 | struct BasicStacklight_t : public ns0::OrderedList_t { 18 | BindableMemberValue StacklightMode; 19 | }; 20 | 21 | } // namespace ia 22 | 23 | REFL_TYPE( 24 | ia::BasicStacklight_t, 25 | Bases>(), 26 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsIAUri, UA_IAID_BASICSTACKLIGHTTYPE))) 27 | REFL_FIELD(StacklightMode) 28 | REFL_END 29 | -------------------------------------------------------------------------------- /TypeDefinition/IA/Constants.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../../src_generated/ia_nodeids.h" 10 | 11 | namespace constants { 12 | constexpr const char *NsIAUri = "http://opcfoundation.org/UA/IA/"; 13 | } 14 | -------------------------------------------------------------------------------- /TypeDefinition/IA/StackElement.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include 11 | 12 | #include "../TypeDefinition.hpp" 13 | #include "../ns0/IOrderedObject.hpp" 14 | #include "Constants.hpp" 15 | 16 | namespace ia { 17 | 18 | struct StackElement_t : public ns0::IOrderedObject_t { 19 | BindableMemberValue IsPartOfBase; 20 | BindableMemberValue SignalOn; 21 | }; 22 | 23 | } // namespace ia 24 | 25 | REFL_TYPE( 26 | ia::StackElement_t, 27 | Bases>(), 28 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsIAUri, UA_IAID_STACKELEMENTTYPE))) 29 | 30 | REFL_FIELD( 31 | IsPartOfBase, 32 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsIAUri, UA_IAID_STACKELEMENTTYPE_ISPARTOFBASE)), 33 | UmatiServerLib::attribute::PlaceholderOptional()) 34 | REFL_FIELD( 35 | SignalOn, 36 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsIAUri, UA_IAID_STACKELEMENTTYPE_SIGNALON)), 37 | UmatiServerLib::attribute::PlaceholderOptional()) 38 | REFL_END 39 | -------------------------------------------------------------------------------- /TypeDefinition/IA/StackElementLight.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../../src_generated/types_ia_generated.h" 11 | #include "../TypeDefinition.hpp" 12 | #include "../ns0/AnalogItem.hpp" 13 | #include "Constants.hpp" 14 | #include "StackElement.hpp" 15 | 16 | namespace ia { 17 | 18 | struct StackElementLight_t : public StackElement_t { 19 | BindableMember> Intensity; 20 | BindableMemberValue SignalColor; 21 | BindableMemberValue SignalMode; 22 | }; 23 | 24 | } // namespace ia 25 | 26 | REFL_TYPE( 27 | ia::StackElementLight_t, 28 | Bases(), 29 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsIAUri, UA_IAID_STACKELEMENTLIGHTTYPE))) 30 | REFL_FIELD( 31 | Intensity, 32 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsIAUri, UA_IAID_STACKELEMENTLIGHTTYPE_INTENSITY)), 33 | UmatiServerLib::attribute::PlaceholderOptional()) 34 | REFL_FIELD( 35 | SignalColor, 36 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsIAUri, UA_IAID_STACKELEMENTLIGHTTYPE_SIGNALCOLOR)), 37 | UmatiServerLib::attribute::PlaceholderOptional()) 38 | REFL_FIELD( 39 | SignalMode, 40 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsIAUri, UA_IAID_STACKELEMENTLIGHTTYPE_SIGNALMODE)), 41 | UmatiServerLib::attribute::PlaceholderOptional()) 42 | REFL_END 43 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/Alert.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../TypeDefinition.hpp" 11 | #include "../ns0/AlarmCondition.hpp" 12 | #include "Constants.hpp" 13 | 14 | namespace machineTool { 15 | 16 | struct Alert_t : public ns0::AlarmCondition_t { 17 | std::string ErrorCode; 18 | }; 19 | 20 | } // namespace machineTool 21 | 22 | REFL_TYPE( 23 | machineTool::Alert_t, 24 | Bases(), 25 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_ALERTTYPE))) 26 | REFL_FIELD(ErrorCode) 27 | REFL_END 28 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/BaseTool.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../TypeDefinition.hpp" 11 | #include "Constants.hpp" 12 | 13 | namespace machineTool { 14 | 15 | struct BaseTool_t { 16 | BindableMemberValue Identifier; 17 | BindableMemberValue Name; 18 | }; 19 | 20 | } // namespace machineTool 21 | 22 | REFL_TYPE( 23 | machineTool::BaseTool_t, 24 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_BASETOOLTYPE))) 25 | REFL_FIELD( 26 | Identifier, 27 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_BASETOOLTYPE_IDENTIFIER)), 28 | UmatiServerLib::attribute::PlaceholderOptional()) 29 | REFL_FIELD( 30 | Name, 31 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_BASETOOLTYPE_NAME)), 32 | UmatiServerLib::attribute::PlaceholderOptional()) 33 | REFL_END 34 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/ChannelMonitoring.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../../src_generated/types_machinetool_generated.h" 11 | #include "../TypeDefinition.hpp" 12 | #include "../ns0/AnalogUnitRange.hpp" 13 | #include "Constants.hpp" 14 | #include "ElementMonitoring.hpp" 15 | 16 | namespace machineTool { 17 | 18 | struct ChannelMonitoring_t : public ElementMonitoring_t { 19 | BindableMemberValue ChannelState; 20 | BindableMember> FeedOverride; 21 | BindableMember> RapidOverride; 22 | BindableMemberValue ChannelMode; 23 | }; 24 | 25 | } // namespace machineTool 26 | 27 | REFL_TYPE( 28 | machineTool::ChannelMonitoring_t, 29 | Bases(), 30 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_CHANNELMONITORINGTYPE))) 31 | REFL_FIELD(ChannelState) 32 | REFL_FIELD(FeedOverride) 33 | REFL_FIELD(ChannelMode) 34 | REFL_FIELD( 35 | RapidOverride, 36 | UmatiServerLib::attribute::MemberInTypeNodeId( 37 | UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_CHANNELMONITORINGTYPE_RAPIDOVERRIDE)), 38 | UmatiServerLib::attribute::PlaceholderOptional()) 39 | REFL_END 40 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/Constants.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../../src_generated/machinetool_nodeids.h" 10 | 11 | namespace constants { 12 | constexpr const char *NsMachineToolUri = "http://opcfoundation.org/UA/MachineTool/"; 13 | } 14 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/EDMGeneratorMonitoring.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../../src_generated/types_machinetool_generated.h" 11 | #include "../TypeDefinition.hpp" 12 | #include "Constants.hpp" 13 | #include "WorkingUnitMonitoring.hpp" 14 | 15 | namespace machineTool { 16 | struct EDMGeneratorMonitoring_t : public WorkingUnitMonitoring_t { 17 | BindableMemberValue EDMGeneratorState; 18 | BindableMemberValue IsOn; 19 | }; 20 | } // namespace machineTool 21 | 22 | REFL_TYPE( 23 | machineTool::EDMGeneratorMonitoring_t, 24 | Bases(), 25 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_EDMGENERATORMONITORINGTYPE))) 26 | REFL_FIELD(EDMGeneratorState) 27 | REFL_FIELD(IsOn) 28 | REFL_END 29 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/ElementMonitoring.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../TypeDefinition.hpp" 11 | #include "Constants.hpp" 12 | 13 | namespace machineTool { 14 | struct ElementMonitoring_t { 15 | BindableMemberValue Name; 16 | }; 17 | } // namespace machineTool 18 | 19 | REFL_TYPE( 20 | machineTool::ElementMonitoring_t, 21 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_ELEMENTMONITORINGTYPE))) 22 | REFL_FIELD(Name) 23 | REFL_END 24 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/Equipment.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../TypeDefinition.hpp" 11 | #include "Constants.hpp" 12 | #include "ToolList.hpp" 13 | 14 | namespace machineTool { 15 | 16 | struct Equipment_t { 17 | BindableMember Tools; 18 | }; 19 | 20 | } // namespace machineTool 21 | 22 | REFL_TYPE( 23 | machineTool::Equipment_t, 24 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_EQUIPMENTTYPE))) 25 | REFL_FIELD( 26 | Tools, 27 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_EQUIPMENTTYPE_TOOLS)), 28 | UmatiServerLib::attribute::PlaceholderOptional()) 29 | REFL_END 30 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/LaserMonitoring.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../../src_generated/types_machinetool_generated.h" 11 | #include "../TypeDefinition.hpp" 12 | #include "Constants.hpp" 13 | #include "WorkingUnitMonitoring.hpp" 14 | 15 | namespace machineTool { 16 | struct LaserMonitoring_t : public WorkingUnitMonitoring_t { 17 | BindableMemberValue LaserState; 18 | BindableMemberValue ControllerIsOn; 19 | }; 20 | } // namespace machineTool 21 | 22 | REFL_TYPE( 23 | machineTool::LaserMonitoring_t, 24 | Bases(), 25 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_LASERMONITORINGTYPE))) 26 | REFL_FIELD(LaserState) 27 | REFL_FIELD(ControllerIsOn) 28 | REFL_END 29 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/MachineTool.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../TypeDefinition.hpp" 10 | #include "Constants.hpp" 11 | #include "Equipment.hpp" 12 | #include "MachineToolIdentification.hpp" 13 | #include "Monitoring.hpp" 14 | #include "Notification.hpp" 15 | #include "Production.hpp" 16 | 17 | namespace machineTool { 18 | struct MachineTool_t { 19 | BindableMember Equipment; 20 | BindableMember Identification; 21 | BindableMember Monitoring; 22 | BindableMember Production; 23 | BindableMember Notification; 24 | }; 25 | } // namespace machineTool 26 | 27 | REFL_TYPE( 28 | machineTool::MachineTool_t, 29 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_MACHINETOOLTYPE))) 30 | REFL_FIELD(Identification, UmatiServerLib::attribute::UaBrowseName(constants::NsDIUri)) 31 | REFL_FIELD(Equipment) 32 | REFL_FIELD(Monitoring) 33 | REFL_FIELD(Production) 34 | REFL_FIELD(Notification) 35 | REFL_END 36 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/MaintenancePrognosis.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../TypeDefinition.hpp" 11 | #include "Constants.hpp" 12 | #include "Prognosis.hpp" 13 | 14 | namespace machineTool { 15 | 16 | struct MaintenancePrognosis_t : public Prognosis_t { 17 | BindableMemberValue Activity; 18 | }; 19 | 20 | } // namespace machineTool 21 | 22 | REFL_TYPE( 23 | machineTool::MaintenancePrognosis_t, 24 | Bases(), 25 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_MAINTENANCEPROGNOSISTYPE))) 26 | REFL_FIELD(Activity) 27 | REFL_END 28 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/ManualActivityPrognosis.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../TypeDefinition.hpp" 11 | #include "Constants.hpp" 12 | #include "Prognosis.hpp" 13 | 14 | namespace machineTool { 15 | 16 | struct ManualActivityPrognosis_t : public Prognosis_t { 17 | BindableMemberValue Activity; 18 | }; 19 | 20 | } // namespace machineTool 21 | 22 | REFL_TYPE( 23 | machineTool::ManualActivityPrognosis_t, 24 | Bases(), 25 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_MANUALACTIVITYPROGNOSISTYPE))) 26 | REFL_FIELD(Activity) 27 | REFL_END 28 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/MultiTool.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../../UmatiServerLib/BindableMemberPlaceholder.hpp" 11 | #include "../TypeDefinition.hpp" 12 | #include "Constants.hpp" 13 | #include "Tool.hpp" 14 | 15 | namespace machineTool { 16 | 17 | struct MultiTool_t : public BaseTool_t { 18 | BindableMemberPlaceholder Tool; 19 | }; 20 | 21 | } // namespace machineTool 22 | 23 | REFL_TYPE( 24 | machineTool::MultiTool_t, 25 | Bases(), 26 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_MULTITOOLTYPE))) 27 | REFL_FIELD( 28 | Tool, 29 | UmatiServerLib::attribute::PlaceholderOptional(), 30 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_MULTITOOLTYPE_TOOL))) 31 | 32 | REFL_END 33 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/Notification.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../TypeDefinition.hpp" 11 | #include "../ns0/BaseObject.hpp" 12 | #include "Constants.hpp" 13 | #include "PrognosisList.hpp" 14 | 15 | namespace machineTool { 16 | 17 | struct Notification_t { 18 | BindableMember Prognoses; 19 | BindableMember Messages; 20 | }; 21 | 22 | } // namespace machineTool 23 | 24 | REFL_TYPE( 25 | machineTool::Notification_t, 26 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_PROGNOSISLISTTYPE))) 27 | REFL_FIELD( 28 | Prognoses, 29 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_NOTIFICATIONTYPE_PROGNOSES)), 30 | UmatiServerLib::attribute::PlaceholderOptional()) 31 | REFL_FIELD( 32 | Messages, 33 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_NOTIFICATIONTYPE_MESSAGES)), 34 | UmatiServerLib::attribute::PlaceholderOptional()) 35 | REFL_END 36 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/NotificationEvent.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../TypeDefinition.hpp" 11 | #include "../ns0/BaseEvent.hpp" 12 | #include "Constants.hpp" 13 | 14 | namespace machineTool { 15 | 16 | struct NotificationEvent_t : public ns0::BaseEvent_t { 17 | std::string Identifier; 18 | }; 19 | 20 | } // namespace machineTool 21 | 22 | REFL_TYPE( 23 | machineTool::NotificationEvent_t, 24 | Bases(), 25 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_NOTIFICATIONEVENTTYPE))) 26 | REFL_FIELD(Identifier) 27 | REFL_END 28 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/PartLoadPrognosis.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../TypeDefinition.hpp" 11 | #include "Constants.hpp" 12 | #include "Prognosis.hpp" 13 | 14 | namespace machineTool { 15 | 16 | struct PartLoadPrognosis_t : public Prognosis_t { 17 | BindableMemberValue Location; 18 | BindableMemberValue PartIdentifier; 19 | BindableMemberValue PartName; 20 | BindableMemberValue PartNodeId; 21 | }; 22 | 23 | } // namespace machineTool 24 | 25 | REFL_TYPE( 26 | machineTool::PartLoadPrognosis_t, 27 | Bases(), 28 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_PARTLOADPROGNOSISTYPE))) 29 | REFL_FIELD(Location) 30 | REFL_FIELD(PartName) 31 | REFL_FIELD( 32 | PartIdentifier, 33 | UmatiServerLib::attribute::PlaceholderOptional(), 34 | UmatiServerLib::attribute::MemberInTypeNodeId( 35 | UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_PARTLOADPROGNOSISTYPE_PARTIDENTIFIER))) 36 | REFL_FIELD( 37 | PartNodeId, 38 | UmatiServerLib::attribute::PlaceholderOptional(), 39 | UmatiServerLib::attribute::MemberInTypeNodeId( 40 | UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_PARTLOADPROGNOSISTYPE_PARTNODEID))) 41 | REFL_END 42 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/PartUnLoadPrognosis.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../TypeDefinition.hpp" 11 | #include "Constants.hpp" 12 | #include "Prognosis.hpp" 13 | 14 | namespace machineTool { 15 | 16 | struct PartUnLoadPrognosis_t : public Prognosis_t { 17 | BindableMemberValue Location; 18 | BindableMemberValue PartIdentifier; 19 | BindableMemberValue PartName; 20 | BindableMemberValue PartNodeId; 21 | }; 22 | 23 | } // namespace machineTool 24 | 25 | REFL_TYPE( 26 | machineTool::PartUnLoadPrognosis_t, 27 | Bases(), 28 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_PARTUNLOADPROGNOSISTYPE))) 29 | REFL_FIELD(Location) 30 | REFL_FIELD(PartName) 31 | REFL_FIELD( 32 | PartIdentifier, 33 | UmatiServerLib::attribute::PlaceholderOptional(), 34 | UmatiServerLib::attribute::MemberInTypeNodeId( 35 | UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_PARTUNLOADPROGNOSISTYPE_PARTIDENTIFIER))) 36 | REFL_FIELD( 37 | PartNodeId, 38 | UmatiServerLib::attribute::PlaceholderOptional(), 39 | UmatiServerLib::attribute::MemberInTypeNodeId( 40 | UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_PARTUNLOADPROGNOSISTYPE_PARTNODEID))) 41 | REFL_END 42 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/ProcessChangeoverPrognosis.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../TypeDefinition.hpp" 11 | #include "Constants.hpp" 12 | #include "Prognosis.hpp" 13 | 14 | namespace machineTool { 15 | 16 | struct ProcessChangeoverPrognosis_t : public Prognosis_t { 17 | BindableMemberValue Activity; 18 | BindableMemberValue Location; 19 | }; 20 | 21 | } // namespace machineTool 22 | 23 | REFL_TYPE( 24 | machineTool::ProcessChangeoverPrognosis_t, 25 | Bases(), 26 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_PROCESSCHANGEOVERPROGNOSISTYPE))) 27 | REFL_FIELD(Activity) 28 | REFL_FIELD(Location) 29 | REFL_END 30 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/Production.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../TypeDefinition.hpp" 11 | #include "Constants.hpp" 12 | #include "ProductionActiveProgram.hpp" 13 | #include "ProductionJobList.hpp" 14 | 15 | namespace machineTool { 16 | 17 | struct Production_t { 18 | BindableMember ActiveProgram; 19 | BindableMember ProductionPlan; 20 | }; 21 | 22 | } // namespace machineTool 23 | 24 | REFL_TYPE( 25 | machineTool::Production_t, 26 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_PRODUCTIONTYPE))) 27 | REFL_FIELD( 28 | ProductionPlan, 29 | UmatiServerLib::attribute::PlaceholderOptional(), 30 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_PRODUCTIONTYPE_PRODUCTIONPLAN))) 31 | REFL_FIELD(ActiveProgram) 32 | REFL_END 33 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/ProductionActiveProgram.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../TypeDefinition.hpp" 11 | #include "Constants.hpp" 12 | #include "ProductionProgram.hpp" 13 | 14 | namespace machineTool { 15 | 16 | struct ProductionActiveProgram_t : public ProductionProgram_t { 17 | BindableMemberValue JobIdentifier; 18 | BindableMemberValue JobNodeId; 19 | }; 20 | 21 | } // namespace machineTool 22 | 23 | REFL_TYPE( 24 | machineTool::ProductionActiveProgram_t, 25 | Bases(), 26 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_PRODUCTIONACTIVEPROGRAMTYPE))) 27 | // REFL_FIELD(State) // Override mandatory ///\todo requires fix in nodeset, i=5030 needs to be ProductionActiveProgramType not ProductionProgramType 28 | REFL_FIELD( 29 | JobIdentifier, 30 | UmatiServerLib::attribute::MemberInTypeNodeId( 31 | UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_PRODUCTIONACTIVEPROGRAMTYPE_JOBIDENTIFIER)), 32 | UmatiServerLib::attribute::PlaceholderOptional()) 33 | REFL_FIELD( 34 | JobNodeId, 35 | UmatiServerLib::attribute::MemberInTypeNodeId( 36 | UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_PRODUCTIONACTIVEPROGRAMTYPE_JOBNODEID)), 37 | UmatiServerLib::attribute::PlaceholderOptional()) 38 | REFL_END 39 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/ProductionJobEndPrognosis.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../TypeDefinition.hpp" 11 | #include "Constants.hpp" 12 | #include "Prognosis.hpp" 13 | 14 | namespace machineTool { 15 | 16 | struct ProductionJobEndPrognosis_t : public Prognosis_t { 17 | BindableMemberValue JobNodeId; 18 | BindableMemberValue SourceIdentifier; 19 | }; 20 | 21 | } // namespace machineTool 22 | 23 | REFL_TYPE( 24 | machineTool::ProductionJobEndPrognosis_t, 25 | Bases(), 26 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_PRODUCTIONJOBENDPROGNOSISTYPE))) 27 | REFL_FIELD( 28 | JobNodeId, 29 | UmatiServerLib::attribute::PlaceholderOptional(), 30 | UmatiServerLib::attribute::MemberInTypeNodeId( 31 | UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_PRODUCTIONJOBENDPROGNOSISTYPE_JOBNODEID))) 32 | REFL_FIELD(SourceIdentifier) 33 | REFL_END 34 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/ProductionJobList.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../TypeDefinition.hpp" 11 | #include "../ns0/OrderedList.hpp" 12 | #include "Constants.hpp" 13 | #include "ProductionJob.hpp" 14 | 15 | namespace machineTool { 16 | 17 | struct ProductionJobList_t : public ns0::OrderedList_t {}; 18 | 19 | } // namespace machineTool 20 | 21 | REFL_TYPE( 22 | machineTool::ProductionJobList_t, 23 | Bases>(), 24 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_PRODUCTIONJOBLISTTYPE))) 25 | REFL_FIELD( 26 | OrderedObjects, 27 | UmatiServerLib::attribute::MemberInTypeNodeId( 28 | UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_PRODUCTIONJOBLISTTYPE_ORDEREDOBJECT_PLACEHOLDER)), 29 | UmatiServerLib::attribute::PlaceholderOptional()) 30 | REFL_END 31 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/ProductionJobTransitionEvent.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../MachineTool/ProductionJob.hpp" 11 | #include "../TypeDefinition.hpp" 12 | #include "../ns0/BaseEvent.hpp" 13 | #include "../ns0/TransitionEvent.hpp" 14 | #include "Constants.hpp" 15 | 16 | namespace machineTool { 17 | 18 | struct ProductionJobTransitionEvent_t : public ns0::TransitionEvent_t { 19 | BindableMemberValue Identifier; 20 | // std::string CustomerOrderIdentifier; //optional 21 | // std::string OrderIdentifier; //optional 22 | BindableMemberValue RunsCompleted; 23 | BindableMember RunsPlanned; 24 | }; 25 | 26 | } // namespace machineTool 27 | 28 | REFL_TYPE( 29 | machineTool::ProductionJobTransitionEvent_t, 30 | Bases(), 31 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_PRODUCTIONJOBTRANSITIONEVENTTYPE))) 32 | REFL_FIELD(Identifier) 33 | REFL_FIELD(RunsCompleted) 34 | REFL_FIELD(RunsPlanned) 35 | REFL_END 36 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/ProductionPart.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include 10 | 11 | #include "../../src_generated/types_machinetool_generated.h" 12 | #include "../TypeDefinition.hpp" 13 | #include "Constants.hpp" 14 | 15 | namespace machineTool { 16 | 17 | struct ProductionPart_t { 18 | BindableMemberValue CustomerOrderIdentifier; 19 | BindableMemberValue Identifier; 20 | BindableMemberValue Name; 21 | BindableMemberValue PartQuality; 22 | BindableMemberValue ProcessIrregularity; 23 | }; 24 | 25 | } // namespace machineTool 26 | 27 | REFL_TYPE( 28 | machineTool::ProductionPart_t, 29 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_PRODUCTIONPARTTYPE))) 30 | REFL_FIELD( 31 | CustomerOrderIdentifier, 32 | UmatiServerLib::attribute::PlaceholderOptional(), 33 | UmatiServerLib::attribute::MemberInTypeNodeId( 34 | UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_PRODUCTIONPARTTYPE_CUSTOMERORDERIDENTIFIER))) 35 | REFL_FIELD( 36 | Identifier, 37 | UmatiServerLib::attribute::PlaceholderOptional(), 38 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_PRODUCTIONPARTTYPE_IDENTIFIER))) 39 | REFL_FIELD(Name) 40 | REFL_FIELD(PartQuality) 41 | REFL_FIELD(ProcessIrregularity) 42 | REFL_END 43 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/ProductionProgram.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../TypeDefinition.hpp" 11 | #include "../ns0/IOrderedObject.hpp" 12 | #include "Constants.hpp" 13 | #include "ProductionStateMachine.hpp" 14 | 15 | namespace machineTool { 16 | 17 | struct ProductionProgram_t : public ns0::IOrderedObject_t { 18 | BindableMemberValue Name; 19 | BindableMember State; 20 | }; 21 | 22 | } // namespace machineTool 23 | 24 | REFL_TYPE( 25 | machineTool::ProductionProgram_t, 26 | Bases>(), 27 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_PRODUCTIONPROGRAMTYPE))) 28 | REFL_FIELD(Name) 29 | REFL_FIELD( 30 | State, 31 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_PRODUCTIONPROGRAMTYPE_STATE)), 32 | UmatiServerLib::attribute::PlaceholderOptional()) 33 | REFL_END 34 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/Prognosis.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../TypeDefinition.hpp" 11 | #include "Constants.hpp" 12 | 13 | namespace machineTool { 14 | 15 | struct Prognosis_t { 16 | BindableMemberValue PredictedTime; 17 | }; 18 | 19 | } // namespace machineTool 20 | 21 | REFL_TYPE( 22 | machineTool::Prognosis_t, 23 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_PROGNOSISTYPE))) 24 | REFL_FIELD(PredictedTime) 25 | REFL_END 26 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/SoftwareIdentification.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../../OpcUaTypes/LocalizedText.hpp" 10 | #include "../DI/Constants.hpp" 11 | #include "../TypeDefinition.hpp" 12 | #include "Constants.hpp" 13 | 14 | namespace machineTool { 15 | 16 | struct SoftwareIdentification_t { 17 | BindableMemberValue SoftwareRevision; 18 | BindableMemberValue Identifier; 19 | BindableMemberValue Manufacturer; 20 | }; 21 | 22 | } // namespace machineTool 23 | 24 | REFL_TYPE( 25 | machineTool::SoftwareIdentification_t, 26 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_SOFTWAREIDENTIFICATIONTYPE))) 27 | REFL_FIELD(SoftwareRevision, UmatiServerLib::attribute::UaBrowseName(constants::NsDIUri)) 28 | REFL_FIELD(Identifier) 29 | REFL_FIELD( 30 | Manufacturer, 31 | UmatiServerLib::attribute::PlaceholderOptional(), 32 | UmatiServerLib::attribute::MemberInTypeNodeId( 33 | UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_SOFTWAREIDENTIFICATIONTYPE_MANUFACTURER))) 34 | REFL_END 35 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/SpindleMonitoring.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../../src_generated/types_machinetool_generated.h" 11 | #include "../TypeDefinition.hpp" 12 | #include "../ns0/AnalogUnitRange.hpp" 13 | #include "Constants.hpp" 14 | #include "WorkingUnitMonitoring.hpp" 15 | 16 | namespace machineTool { 17 | struct SpindleMonitoring_t : public WorkingUnitMonitoring_t { 18 | BindableMemberValue IsUsedAsAxis; 19 | BindableMemberValue IsRotating; 20 | BindableMember> Override; 21 | }; 22 | } // namespace machineTool 23 | 24 | REFL_TYPE( 25 | machineTool::SpindleMonitoring_t, 26 | Bases(), 27 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_SPINDLEMONITORINGTYPE))) 28 | REFL_FIELD(IsRotating) 29 | REFL_FIELD( 30 | IsUsedAsAxis, 31 | UmatiServerLib::attribute::PlaceholderOptional(), 32 | UmatiServerLib::attribute::MemberInTypeNodeId( 33 | UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_SPINDLEMONITORINGTYPE_ISUSEDASAXIS))) 34 | REFL_FIELD( 35 | Override, 36 | UmatiServerLib::attribute::PlaceholderOptional(), 37 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_SPINDLEMONITORINGTYPE_OVERRIDE))) 38 | REFL_END 39 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/ToolList.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../../UmatiServerLib/BindableMemberPlaceholder.hpp" 11 | #include "../TypeDefinition.hpp" 12 | #include "../ns0/Constants.hpp" 13 | #include "Constants.hpp" 14 | #include "MultiTool.hpp" 15 | #include "Tool.hpp" 16 | 17 | namespace machineTool { 18 | 19 | struct ToolList_t { 20 | BindableMemberValue NodeVersion; 21 | BindableMemberPlaceholder> Tool; 22 | }; 23 | 24 | } // namespace machineTool 25 | 26 | REFL_TYPE( 27 | machineTool::ToolList_t, 28 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_TOOLLISTTYPE))) 29 | REFL_FIELD( 30 | NodeVersion, 31 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_TOOLLISTTYPE_NODEVERSION)), 32 | UmatiServerLib::attribute::UaBrowseName(constants::Ns0Uri), 33 | UmatiServerLib::attribute::PlaceholderOptional()) 34 | REFL_FIELD( 35 | Tool, 36 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_TOOLLISTTYPE_TOOL)), 37 | UmatiServerLib::attribute::PlaceholderOptional()) 38 | REFL_END 39 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/ToolLoadPrognosis.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../TypeDefinition.hpp" 11 | #include "Constants.hpp" 12 | #include "Prognosis.hpp" 13 | 14 | namespace machineTool { 15 | 16 | struct ToolLoadPrognosis_t : public Prognosis_t { 17 | BindableMemberValue Location; 18 | BindableMemberValue ToolIdentifier; 19 | BindableMemberValue ToolName; 20 | }; 21 | 22 | } // namespace machineTool 23 | 24 | REFL_TYPE( 25 | machineTool::ToolLoadPrognosis_t, 26 | Bases(), 27 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_TOOLLOADPROGNOSISTYPE))) 28 | REFL_FIELD(Location) 29 | REFL_FIELD( 30 | ToolName, 31 | UmatiServerLib::attribute::PlaceholderOptional(), 32 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_TOOLLOADPROGNOSISTYPE_TOOLNAME))) 33 | REFL_FIELD( 34 | ToolIdentifier, 35 | UmatiServerLib::attribute::PlaceholderOptional(), 36 | UmatiServerLib::attribute::MemberInTypeNodeId( 37 | UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_TOOLLOADPROGNOSISTYPE_TOOLIDENTIFIER))) 38 | REFL_END 39 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/UtilityChangePrognosis.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../TypeDefinition.hpp" 11 | #include "Constants.hpp" 12 | #include "Prognosis.hpp" 13 | 14 | namespace machineTool { 15 | 16 | struct UtilityChangePrognosis_t : public Prognosis_t { 17 | BindableMemberValue UtilityName; 18 | }; 19 | 20 | } // namespace machineTool 21 | 22 | REFL_TYPE( 23 | machineTool::UtilityChangePrognosis_t, 24 | Bases(), 25 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_UTILITYCHANGEPROGNOSISTYPE))) 26 | REFL_FIELD(UtilityName) 27 | REFL_END 28 | -------------------------------------------------------------------------------- /TypeDefinition/MachineTool/WorkingUnitMonitoring.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../TypeDefinition.hpp" 11 | #include "Constants.hpp" 12 | #include "ElementMonitoring.hpp" 13 | 14 | namespace machineTool { 15 | struct WorkingUnitMonitoring_t : public ElementMonitoring_t {}; 16 | } // namespace machineTool 17 | 18 | REFL_TYPE( 19 | machineTool::WorkingUnitMonitoring_t, 20 | Bases(), 21 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineToolUri, UA_MACHINETOOLID_WORKINGUNITMONITORINGTYPE))) 22 | REFL_END 23 | -------------------------------------------------------------------------------- /TypeDefinition/Machinery/Constants.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../../src_generated/machinery_nodeids.h" 10 | 11 | namespace constants { 12 | constexpr const char *NsMachineryUri = "http://opcfoundation.org/UA/Machinery/"; 13 | } 14 | -------------------------------------------------------------------------------- /TypeDefinition/Machinery/IMachineTagNameplate.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../DI/ITagNameplate.hpp" 11 | #include "../TypeDefinition.hpp" 12 | #include "Constants.hpp" 13 | 14 | namespace machinery { 15 | struct IMachineTagNameplate_t : public di::ITagNameplate_t { 16 | BindableMemberValue Location; 17 | }; 18 | 19 | } // namespace machinery 20 | 21 | REFL_TYPE( 22 | machinery::IMachineTagNameplate_t, 23 | Bases(), 24 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineryUri, UA_MACHINERYID_IMACHINETAGNAMEPLATETYPE))) 25 | REFL_FIELD( 26 | Location, 27 | UmatiServerLib::attribute::PlaceholderOptional(), 28 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsMachineryUri, UA_MACHINERYID_IMACHINETAGNAMEPLATETYPE_LOCATION))) 29 | REFL_END 30 | -------------------------------------------------------------------------------- /TypeDefinition/Machinery/MachineIdentification.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../TypeDefinition.hpp" 10 | #include "Constants.hpp" 11 | #include "IMachineTagNameplate.hpp" 12 | 13 | namespace machinery { 14 | 15 | struct MachineIdentification_t : public IMachineryItemVendorNameplateType_t {}; 16 | 17 | } // namespace machinery 18 | 19 | REFL_TYPE( 20 | machinery::MachineIdentification_t, 21 | Bases(), 22 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineryUri, UA_MACHINERYID_IMACHINEVENDORNAMEPLATETYPE))) 23 | 24 | REFL_END 25 | -------------------------------------------------------------------------------- /TypeDefinition/MachineryResult/Constants.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2022 (c) Sebastian Friedl, ISW University of Stuttgart (for umati and VDMA e.V.) 7 | */ 8 | 9 | #pragma once 10 | #include "../../src_generated/machinery_result_nodeids.h" 11 | #include "../../src_generated/types_machinery_result_generated.h" 12 | 13 | namespace constants { 14 | constexpr const char *NsMachineryResultUri = "http://opcfoundation.org/UA/Machinery/Result/"; 15 | } 16 | -------------------------------------------------------------------------------- /TypeDefinition/MachineryResult/ResultDataType.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Sebastian Friedl, ISW University of Stuttgart (for VDMA e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "Constants.hpp" 10 | #include "ResultMetaDataType.hpp" 11 | 12 | namespace machinery_result { 13 | struct ResultDataType_t { 14 | UA_ResultMetaDataType resultMetaData; 15 | // size_t resultContentSize; 16 | // UA_Variant *resultContent; 17 | }; 18 | } // namespace machinery_result 19 | 20 | REFL_TYPE(machinery_result::ResultDataType_t, UmatiServerLib::attribute::UaDataType(&UA_TYPES_MACHINERY_RESULT[UA_TYPES_MACHINERY_RESULT_RESULTDATATYPE])) 21 | REFL_FIELD(resultMetaData) 22 | // REFL_FIELD(resultContent) 23 | REFL_END -------------------------------------------------------------------------------- /TypeDefinition/MachineryResult/ResultManagementType.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Sebastian Friedl, ISW University of Stuttgart (for VDMA e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../TypeDefinition.hpp" 10 | #include "../ns0/Folder.hpp" 11 | #include "Constants.hpp" 12 | #include "ResultDataType.hpp" 13 | #include "ResultVariableType.hpp" 14 | 15 | namespace machinery_result { 16 | 17 | struct ResultManagementType_Results_t { 18 | BindableMemberPlaceholder ResultVariable; 19 | }; 20 | 21 | struct ResultManagementType_t { 22 | BindableMember Results; 23 | }; 24 | 25 | } // namespace machinery_result 26 | 27 | REFL_TYPE( 28 | machinery_result::ResultManagementType_Results_t, 29 | UmatiServerLib::attribute::UaObjectType( // TODO handle correctly when this is pointing to an object instead of an object type 30 | UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_FOLDERTYPE))) 31 | REFL_FIELD( 32 | ResultVariable, 33 | UmatiServerLib::attribute::PlaceholderOptional(), 34 | UmatiServerLib::attribute::MemberInTypeNodeId( 35 | UmatiServerLib::constexp::NodeId(constants::NsMachineryResultUri, UA_MACHINERY_RESULTID_RESULTMANAGEMENTTYPE_RESULTS_RESULTVARIABLE))) 36 | REFL_END 37 | 38 | REFL_TYPE( 39 | machinery_result::ResultManagementType_t, 40 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsMachineryResultUri, UA_MACHINERY_RESULTID_RESULTMANAGEMENTTYPE))) 41 | REFL_FIELD( 42 | Results, 43 | UmatiServerLib::attribute::MemberInTypeNodeId( 44 | UmatiServerLib::constexp::NodeId(constants::NsMachineryResultUri, UA_MACHINERY_RESULTID_RESULTMANAGEMENTTYPE_RESULTS)), 45 | UmatiServerLib::attribute::PlaceholderOptional()) 46 | REFL_END 47 | -------------------------------------------------------------------------------- /TypeDefinition/MachineryResult/ResultMetaDataType.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Sebastian Friedl, ISW University of Stuttgart (for VDMA e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "Constants.hpp" 10 | 11 | namespace machinery_result { 12 | struct ResultMetaDataType_t { 13 | UA_String resultId; 14 | UA_Boolean *hasTransferableDataOnFile; 15 | UA_Boolean *isPartial; 16 | UA_Boolean *isSimulated; 17 | UA_Int32 *resultState; 18 | UA_String *taskId; 19 | UA_String *partId; 20 | UA_String *externalRecipeId; 21 | UA_String *internalRecipeId; 22 | UA_String *productId; 23 | UA_String *externalConfigurationId; 24 | UA_String *internalConfigurationId; 25 | UA_String *jobId; 26 | UA_DateTime *creationTime; 27 | UA_ProcessingTimesDataType *processingTimes; 28 | size_t resultUriSize; 29 | UA_Variant *resultUri; 30 | UA_ResultEvaluationEnum *resultEvaluation; 31 | UA_Int32 *resultEvaluationCode; 32 | UA_LocalizedText *resultEvaluationDetails; 33 | size_t fileFormatSize; 34 | UA_String *fileFormat; 35 | }; 36 | } // namespace machinery_result 37 | 38 | REFL_TYPE( 39 | machinery_result::ResultMetaDataType_t, UmatiServerLib::attribute::UaDataType(&UA_TYPES_MACHINERY_RESULT[UA_TYPES_MACHINERY_RESULT_RESULTMETADATATYPE])) 40 | REFL_FIELD(resultId) 41 | REFL_END -------------------------------------------------------------------------------- /TypeDefinition/MachineryResult/ResultVariableType.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Sebastian Friedl, ISW University of Stuttgart (for VDMA e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "Constants.hpp" 10 | #include "ResultDataType.hpp" 11 | 12 | namespace machinery_result { 13 | struct ResultType_t { 14 | BindableMemberValue Value; 15 | }; 16 | } // namespace machinery_result 17 | 18 | REFL_TYPE( 19 | machinery_result::ResultType_t, 20 | UmatiServerLib::attribute::UaVariableType(UmatiServerLib::constexp::NodeId(constants::NsMachineryResultUri, UA_MACHINERY_RESULTID_RESULTTYPE))) 21 | REFL_FIELD(Value, UmatiServerLib::attribute::UaVariableTypeValue()) 22 | REFL_END -------------------------------------------------------------------------------- /TypeDefinition/Robotics/Constants.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../../src_generated/robotics_nodeids.h" 10 | 11 | namespace constants { 12 | constexpr const char *NsRoboticsUri = "http://opcfoundation.org/UA/Robotics/"; 13 | } 14 | -------------------------------------------------------------------------------- /TypeDefinition/Robotics/MotionDevice.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../../src_generated/types_robotics_generated.h" 10 | #include "../DI/Component.hpp" 11 | #include "../TypeDefinition.hpp" 12 | #include "Constants.hpp" 13 | 14 | namespace robotics { 15 | 16 | struct MotionDevice_t : public di::Component_t { 17 | BindableMemberValue MotionDeviceCategory; 18 | }; 19 | 20 | } // namespace robotics 21 | 22 | REFL_TYPE( 23 | robotics::MotionDevice_t, 24 | Bases(), 25 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsRoboticsUri, UA_ROBOTICSID_MOTIONDEVICETYPE))) 26 | REFL_FIELD(Manufacturer) 27 | REFL_FIELD(Model) 28 | REFL_FIELD(MotionDeviceCategory) 29 | REFL_FIELD(ProductCode) 30 | REFL_FIELD(SerialNumber) 31 | REFL_END 32 | -------------------------------------------------------------------------------- /TypeDefinition/TypeDefinition.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2019-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "../OpcUaTypes/Attributes.hpp" 15 | #include "../OpcUaTypes/DateTime.hpp" 16 | #include "../OpcUaTypes/EUInformation.hpp" 17 | #include "../OpcUaTypes/LocalizedText.hpp" 18 | #include "../UmatiServerLib/BindableMemberValue.hpp" 19 | #include "../UmatiServerLib/Util.hpp" 20 | -------------------------------------------------------------------------------- /TypeDefinition/Woodworking/Constants.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2021 (c) Christoph Ruckstetter, Michael Weinig AG 6 | */ 7 | 8 | #pragma once 9 | #include "../../src_generated/woodworking_nodeids.h" 10 | 11 | namespace constants { 12 | constexpr const char *NsWoodworkingUri = "http://opcfoundation.org/UA/Woodworking/"; 13 | } 14 | -------------------------------------------------------------------------------- /TypeDefinition/Woodworking/IWwBaseState.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2021 (c) Christoph Ruckstetter, Michael Weinig AG 6 | */ 7 | 8 | #pragma once 9 | #include "../../UmatiServerLib/BindableMemberPlaceholder.hpp" 10 | #include "../TypeDefinition.hpp" 11 | #include "../ns0/BaseObject.hpp" 12 | #include "../ns0/Constants.hpp" 13 | #include "Constants.hpp" 14 | #include "IWwUnitFlags.hpp" 15 | #include "IWwUnitOverview.hpp" 16 | #include "IWwUnitValues.hpp" 17 | 18 | namespace woodworking { 19 | 20 | struct IWwBaseState_t { 21 | BindableMember Overview; 22 | BindableMember Flags; 23 | BindableMember Values; 24 | }; 25 | 26 | } // namespace woodworking 27 | 28 | REFL_TYPE( 29 | woodworking::IWwBaseState_t, 30 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsWoodworkingUri, UA_WOODWORKINGID_IWWBASESTATETYPE))) 31 | REFL_FIELD(Overview) 32 | REFL_FIELD( 33 | Flags, 34 | UmatiServerLib::attribute::PlaceholderOptional(), 35 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsWoodworkingUri, UA_WOODWORKINGID_IWWBASESTATETYPE_FLAGS))) 36 | REFL_FIELD( 37 | Values, 38 | UmatiServerLib::attribute::PlaceholderOptional(), 39 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsWoodworkingUri, UA_WOODWORKINGID_IWWBASESTATETYPE_VALUES))) 40 | 41 | REFL_END 42 | -------------------------------------------------------------------------------- /TypeDefinition/Woodworking/IWwState.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2021 (c) Christoph Ruckstetter, Michael Weinig AG 6 | */ 7 | 8 | #pragma once 9 | #include "../../UmatiServerLib/BindableMemberPlaceholder.hpp" 10 | #include "../TypeDefinition.hpp" 11 | #include "../ns0/BaseObject.hpp" 12 | #include "../ns0/Constants.hpp" 13 | #include "Constants.hpp" 14 | #include "IWwBaseState.hpp" 15 | #include "IWwSubUnits.hpp" 16 | 17 | namespace woodworking { 18 | 19 | struct IWwState_t { 20 | BindableMember Machine; 21 | BindableMember SubUnits; 22 | }; 23 | 24 | } // namespace woodworking 25 | 26 | REFL_TYPE( 27 | woodworking::IWwState_t, 28 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsWoodworkingUri, UA_WOODWORKINGID_IWWSTATETYPE))) 29 | REFL_FIELD(Machine) 30 | REFL_FIELD( 31 | SubUnits, 32 | UmatiServerLib::attribute::PlaceholderOptional(), 33 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsWoodworkingUri, UA_WOODWORKINGID_WWMACHINETYPE_STATE_SUBUNITS))) 34 | REFL_END 35 | -------------------------------------------------------------------------------- /TypeDefinition/Woodworking/IWwSubUnits.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2021 (c) Christoph Ruckstetter, Michael Weinig AG 6 | */ 7 | 8 | #pragma once 9 | #include "../../UmatiServerLib/BindableMemberPlaceholder.hpp" 10 | #include "../Machinery/IMachineTagNameplate.hpp" 11 | #include "../Machinery/IMachineryItemVendorNameplateType.hpp" 12 | #include "../TypeDefinition.hpp" 13 | #include "../ns0/Constants.hpp" 14 | #include "Constants.hpp" 15 | #include "IWwBaseState.hpp" 16 | 17 | namespace woodworking { 18 | 19 | struct IWwSubUnits_t { 20 | // BindableMemberPlaceholder SubUnit; 21 | BindableMember SubUnit; 22 | }; 23 | 24 | } // namespace woodworking 25 | 26 | REFL_TYPE( 27 | woodworking::IWwSubUnits_t, 28 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsWoodworkingUri, UA_WOODWORKINGID_IWWSUBUNITSTYPE))) 29 | REFL_FIELD( 30 | SubUnit, 31 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsWoodworkingUri, UA_WOODWORKINGID_IWWSUBUNITSTYPE_SUBUNIT)), 32 | UmatiServerLib::attribute::PlaceholderOptional()) 33 | 34 | REFL_END 35 | -------------------------------------------------------------------------------- /TypeDefinition/Woodworking/IWwUnitOverview.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2021 (c) Christoph Ruckstetter, Michael Weinig AG 6 | */ 7 | 8 | #pragma once 9 | #include 10 | 11 | #include "../../UmatiServerLib/BindableMemberPlaceholder.hpp" 12 | #include "../../src_generated/types_woodworking_generated.h" 13 | #include "../TypeDefinition.hpp" 14 | #include "../ns0/BaseObject.hpp" 15 | #include "../ns0/Constants.hpp" 16 | #include "Constants.hpp" 17 | 18 | namespace woodworking { 19 | 20 | struct IWwUnitOverview_t { 21 | BindableMemberValue CurrentState; 22 | BindableMemberValue CurrentMode; 23 | }; 24 | 25 | } // namespace woodworking 26 | 27 | REFL_TYPE( 28 | woodworking::IWwUnitOverview_t, 29 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsWoodworkingUri, UA_WOODWORKINGID_IWWUNITOVERVIEWTYPE))) 30 | REFL_FIELD(CurrentState) 31 | REFL_FIELD(CurrentMode) 32 | REFL_END 33 | -------------------------------------------------------------------------------- /TypeDefinition/Woodworking/ManufacturerSpecific.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2021 (c) Christoph Ruckstetter, Michael Weinig AG 6 | */ 7 | 8 | #pragma once 9 | #include "../../UmatiServerLib/BindableMemberPlaceholder.hpp" 10 | #include "../TypeDefinition.hpp" 11 | #include "../ns0/Constants.hpp" 12 | #include "Constants.hpp" 13 | 14 | namespace woodworking { 15 | 16 | struct ManufacturerSpecific_t { 17 | BindableMemberValue LastProgramName; 18 | }; 19 | 20 | } // namespace woodworking 21 | 22 | REFL_TYPE( 23 | woodworking::ManufacturerSpecific_t, UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_FOLDERTYPE))) 24 | REFL_FIELD( 25 | LastProgramName, 26 | UmatiServerLib::attribute::PlaceholderOptional(), 27 | UmatiServerLib::attribute::MemberInTypeNodeId( 28 | UmatiServerLib::constexp::NodeId(constants::NsWoodworkingUri, UA_WOODWORKINGID_WWMACHINETYPE_MANUFACTURERSPECIFIC_LASTPROGRAMNAME))) 29 | REFL_END 30 | -------------------------------------------------------------------------------- /TypeDefinition/Woodworking/WwBaseEvent.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2021 (c) Christoph Ruckstetter, Michael Weinig AG 6 | */ 7 | 8 | #pragma once 9 | #include "../TypeDefinition.hpp" 10 | #include "../ns0/BaseEvent.hpp" 11 | #include "../ns0/Constants.hpp" 12 | #include "Constants.hpp" 13 | #include "IWwEventMessage.hpp" 14 | 15 | namespace woodworking { 16 | 17 | struct WwBaseEvent_t : public IWwEventMessage_t, public ns0::BaseEvent_t {}; 18 | 19 | } // namespace woodworking 20 | 21 | REFL_TYPE( 22 | woodworking::WwBaseEvent_t, 23 | Bases(), 24 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsWoodworkingUri, UA_WOODWORKINGID_WWBASEEVENTTYPE))) 25 | REFL_END 26 | -------------------------------------------------------------------------------- /TypeDefinition/Woodworking/WwEventsDispatcher.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2021 (c) Christoph Ruckstetter, Michael Weinig AG 6 | */ 7 | 8 | #pragma once 9 | #include "../../UmatiServerLib/BindableMemberPlaceholder.hpp" 10 | #include "../Machinery/IMachineTagNameplate.hpp" 11 | #include "../Machinery/IMachineryItemVendorNameplateType.hpp" 12 | #include "../TypeDefinition.hpp" 13 | #include "../ns0/Constants.hpp" 14 | #include "Constants.hpp" 15 | 16 | namespace woodworking { 17 | 18 | struct WwEventsDispatcher_t {}; 19 | } // namespace woodworking 20 | 21 | REFL_TYPE( 22 | woodworking::WwEventsDispatcher_t, 23 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsWoodworkingUri, UA_WOODWORKINGID_WWEVENTSDISPATCHERTYPE))) 24 | REFL_END 25 | -------------------------------------------------------------------------------- /TypeDefinition/Woodworking/WwMachine.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2021 (c) Christoph Ruckstetter, Michael Weinig AG 6 | */ 7 | 8 | #pragma once 9 | #include "../TypeDefinition.hpp" 10 | #include "../ns0/BaseObject.hpp" 11 | #include "../ns0/StateVariable.hpp" 12 | #include "Constants.hpp" 13 | #include "IWwState.hpp" 14 | #include "MachineIdentification.hpp" 15 | #include "ManufacturerSpecific.hpp" 16 | #include "WwEventsDispatcher.hpp" 17 | 18 | namespace woodworking { 19 | 20 | struct WwMachine_t { 21 | BindableMember Identification; 22 | BindableMember State; 23 | BindableMember Events; 24 | BindableMember ManufacturerSpecific; 25 | }; 26 | } // namespace woodworking 27 | 28 | REFL_TYPE( 29 | woodworking::WwMachine_t, 30 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsWoodworkingUri, UA_WOODWORKINGID_WWMACHINETYPE))) 31 | REFL_FIELD(Identification, UmatiServerLib::attribute::UaBrowseName(constants::NsDIUri)) 32 | REFL_FIELD(State) 33 | REFL_FIELD( 34 | Events, 35 | UmatiServerLib::attribute::PlaceholderOptional(), 36 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::NsWoodworkingUri, UA_WOODWORKINGID_WWMACHINETYPE_EVENTS))) 37 | REFL_FIELD( 38 | ManufacturerSpecific, 39 | UmatiServerLib::attribute::PlaceholderOptional(), 40 | UmatiServerLib::attribute::MemberInTypeNodeId( 41 | UmatiServerLib::constexp::NodeId(constants::NsWoodworkingUri, UA_WOODWORKINGID_WWMACHINETYPE_MANUFACTURERSPECIFIC))) 42 | REFL_END 43 | -------------------------------------------------------------------------------- /TypeDefinition/ns0/AcknowledgeableCondition.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../TypeDefinition.hpp" 10 | #include "Condition.hpp" 11 | #include "Constants.hpp" 12 | 13 | namespace ns0 { 14 | 15 | class AcknowledgeableCondition_t : public Condition_t { 16 | public: 17 | BindableMember EnabledState; 18 | BindableMember AckedState; 19 | BindableMember ConfirmedState; 20 | }; 21 | 22 | } // namespace ns0 23 | 24 | REFL_TYPE( 25 | ns0::AcknowledgeableCondition_t, 26 | Bases(), 27 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_ACKNOWLEDGEABLECONDITIONTYPE))) 28 | REFL_FIELD( 29 | EnabledState, 30 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_ACKNOWLEDGEABLECONDITIONTYPE_ENABLEDSTATE))) 31 | REFL_FIELD( 32 | AckedState, 33 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_ACKNOWLEDGEABLECONDITIONTYPE_ACKEDSTATE))) 34 | REFL_FIELD( 35 | ConfirmedState, 36 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_ACKNOWLEDGEABLECONDITIONTYPE_CONFIRMEDSTATE)), 37 | UmatiServerLib::attribute::PlaceholderOptional()) 38 | REFL_END 39 | -------------------------------------------------------------------------------- /TypeDefinition/ns0/AlarmCondition.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../TypeDefinition.hpp" 10 | #include "AcknowledgeableCondition.hpp" 11 | #include "Constants.hpp" 12 | 13 | namespace ns0 { 14 | 15 | struct AlarmCondition_t : public AcknowledgeableCondition_t { 16 | ///\todo declare fields 17 | }; 18 | 19 | } // namespace ns0 20 | 21 | REFL_TYPE( 22 | ns0::AlarmCondition_t, 23 | Bases(), 24 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_ALARMCONDITIONTYPE))) 25 | REFL_END 26 | -------------------------------------------------------------------------------- /TypeDefinition/ns0/AnalogItem.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../TypeDefinition.hpp" 10 | #include "Constants.hpp" 11 | 12 | namespace ns0 { 13 | 14 | template 15 | struct AnalogItem_t { 16 | BindableMemberValue Value; 17 | BindableMemberValue EURange; 18 | BindableMemberValue EngineeringUnits; 19 | }; 20 | 21 | } // namespace ns0 22 | 23 | REFL_TEMPLATE( 24 | (typename T), (ns0::AnalogItem_t), UmatiServerLib::attribute::UaVariableType(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_ANALOGITEMTYPE))) 25 | REFL_FIELD(Value, UmatiServerLib::attribute::UaVariableTypeValue()) 26 | REFL_FIELD(EURange) 27 | REFL_FIELD(EngineeringUnits, UmatiServerLib::attribute::PlaceholderOptional()) 28 | REFL_END 29 | -------------------------------------------------------------------------------- /TypeDefinition/ns0/AnalogUnitRange.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../TypeDefinition.hpp" 10 | #include "AnalogItem.hpp" 11 | #include "Constants.hpp" 12 | 13 | namespace ns0 { 14 | 15 | template 16 | struct AnalogUnitRange_t : public AnalogItem_t {}; 17 | 18 | } // namespace ns0 19 | 20 | REFL_TEMPLATE( 21 | (typename T), 22 | (ns0::AnalogUnitRange_t), 23 | Bases>(), 24 | UmatiServerLib::attribute::UaVariableType(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_ANALOGUNITRANGETYPE))) 25 | REFL_FIELD(EngineeringUnits) 26 | REFL_END 27 | -------------------------------------------------------------------------------- /TypeDefinition/ns0/AnalogUnitType.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Sebastian Friedl, ISW University of Stuttgart (for umati and VDMA e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../TypeDefinition.hpp" 10 | #include "Constants.hpp" 11 | 12 | namespace ns0 { 13 | 14 | template 15 | struct AnalogUnitType_t { 16 | BindableMemberValue Value; 17 | BindableMemberValue EngineeringUnits; 18 | }; 19 | 20 | } // namespace ns0 21 | 22 | REFL_TEMPLATE( 23 | (typename T), 24 | (ns0::AnalogUnitType_t), 25 | UmatiServerLib::attribute::UaVariableType(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_ANALOGUNITTYPE))) 26 | REFL_FIELD(Value, UmatiServerLib::attribute::UaVariableTypeValue()) 27 | REFL_FIELD(EngineeringUnits) 28 | REFL_END 29 | -------------------------------------------------------------------------------- /TypeDefinition/ns0/BaseEvent.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../TypeDefinition.hpp" 10 | #include "Constants.hpp" 11 | 12 | namespace ns0 { 13 | 14 | struct BaseEvent_t { 15 | UmatiServerLib::DateTime_t Time = std::chrono::system_clock::now(); 16 | std::string SourceName; 17 | std::uint16_t Severity; 18 | UmatiServerLib::LocalizedText_t Message; 19 | }; 20 | 21 | } // namespace ns0 22 | 23 | REFL_TYPE(ns0::BaseEvent_t, UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_BASEEVENTTYPE))) 24 | REFL_FIELD(Time) 25 | REFL_FIELD(SourceName) 26 | REFL_FIELD(Severity) 27 | REFL_FIELD(Message) 28 | REFL_END 29 | -------------------------------------------------------------------------------- /TypeDefinition/ns0/BaseModelChangeEvent.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../TypeDefinition.hpp" 10 | #include "BaseEvent.hpp" 11 | #include "Constants.hpp" 12 | 13 | namespace ns0 { 14 | 15 | struct BaseModelChangeEvent_t : public BaseEvent_t {}; 16 | 17 | } // namespace ns0 18 | 19 | REFL_TYPE( 20 | ns0::BaseModelChangeEvent_t, 21 | Bases(), 22 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_BASEMODELCHANGEEVENTTYPE))) 23 | REFL_END 24 | -------------------------------------------------------------------------------- /TypeDefinition/ns0/BaseObject.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../TypeDefinition.hpp" 10 | #include "Constants.hpp" 11 | 12 | namespace ns0 { 13 | 14 | struct BaseObject_t {}; 15 | 16 | } // namespace ns0 17 | 18 | REFL_TYPE(ns0::BaseObject_t, UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_BASEOBJECTTYPE))) 19 | REFL_END 20 | -------------------------------------------------------------------------------- /TypeDefinition/ns0/Condition.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../../OpcUaTypes/StatusCode.hpp" 10 | #include "../TypeDefinition.hpp" 11 | #include "BaseEvent.hpp" 12 | #include "ConditionVariable.hpp" 13 | #include "Constants.hpp" 14 | #include "TwoStateVariable.hpp" 15 | 16 | namespace ns0 { 17 | 18 | struct Condition_t : public BaseEvent_t { 19 | UA_NodeId BranchId; 20 | std::string ClientUserId; 21 | ConditionVariable_t Comment; 22 | UA_NodeId ConditionClassId; 23 | UmatiServerLib::LocalizedText_t ConditionClassName; 24 | std::string ConditionName; 25 | UA_NodeId ConditionSubClassId; 26 | UmatiServerLib::LocalizedText_t ConditionSubClassName; 27 | TwoStateVariable_t EnabledState; 28 | ConditionVariable_t LastSeverity; 29 | ConditionVariable_t Quality; 30 | bool Retain; 31 | }; 32 | 33 | } // namespace ns0 34 | 35 | REFL_TYPE( 36 | ns0::Condition_t, 37 | Bases(), 38 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_CONDITIONTYPE))) 39 | REFL_FIELD(BranchId) 40 | REFL_FIELD(ClientUserId) 41 | REFL_FIELD(Comment) 42 | REFL_FIELD(ConditionClassId) 43 | REFL_FIELD(ConditionClassName) 44 | REFL_FIELD(ConditionName) 45 | REFL_FIELD(ConditionSubClassId, UmatiServerLib::attribute::PlaceholderOptional()) 46 | REFL_FIELD(ConditionSubClassName, UmatiServerLib::attribute::PlaceholderOptional()) 47 | REFL_FIELD(EnabledState) 48 | REFL_FIELD(LastSeverity) 49 | REFL_FIELD(Quality) 50 | REFL_FIELD(Retain) 51 | REFL_END 52 | -------------------------------------------------------------------------------- /TypeDefinition/ns0/ConditionVariable.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../TypeDefinition.hpp" 10 | #include "Constants.hpp" 11 | 12 | namespace ns0 { 13 | 14 | template 15 | struct ConditionVariable_t { 16 | T Value; 17 | UmatiServerLib::DateTime_t SourceTimestamp; 18 | }; 19 | 20 | } // namespace ns0 21 | 22 | REFL_TEMPLATE( 23 | (typename T), 24 | (ns0::ConditionVariable_t), 25 | UmatiServerLib::attribute::UaVariableType(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_CONDITIONVARIABLETYPE))) 26 | REFL_FIELD(Value, UmatiServerLib::attribute::UaVariableTypeValue()) 27 | REFL_FIELD(SourceTimestamp) 28 | REFL_END 29 | -------------------------------------------------------------------------------- /TypeDefinition/ns0/Constants.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include 10 | 11 | namespace constants { 12 | constexpr const char *Ns0Uri = "http://opcfoundation.org/UA/"; 13 | } 14 | -------------------------------------------------------------------------------- /TypeDefinition/ns0/DataItem.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Alen Galinec 6 | */ 7 | 8 | #pragma once 9 | #include 10 | 11 | #include "../TypeDefinition.hpp" 12 | #include "Constants.hpp" 13 | 14 | namespace ns0 { 15 | 16 | struct DataItem_t { 17 | BindableMemberValue Definition; 18 | BindableMemberValue ValuePrecision; 19 | }; 20 | 21 | } // namespace ns0 22 | 23 | REFL_TYPE(ns0::DataItem_t, UmatiServerLib::attribute::UaVariableType(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_DATAITEMTYPE))) 24 | REFL_FIELD(Definition, UmatiServerLib::attribute::PlaceholderOptional()) 25 | REFL_FIELD(ValuePrecision, UmatiServerLib::attribute::PlaceholderOptional()) 26 | REFL_END 27 | -------------------------------------------------------------------------------- /TypeDefinition/ns0/DiscreteItem.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Alen Galinec 6 | */ 7 | 8 | #pragma once 9 | #include 10 | 11 | #include "../TypeDefinition.hpp" 12 | #include "Constants.hpp" 13 | #include "DataItem.hpp" 14 | 15 | namespace ns0 { 16 | 17 | struct DiscreteItem_t : public DataItem_t {}; 18 | 19 | } // namespace ns0 20 | 21 | REFL_TYPE( 22 | ns0::DiscreteItem_t, 23 | Bases(), 24 | UmatiServerLib::attribute::UaVariableType(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_DISCRETEITEMTYPE))) 25 | REFL_END 26 | -------------------------------------------------------------------------------- /TypeDefinition/ns0/FiniteStateMachine.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../TypeDefinition.hpp" 10 | #include "Constants.hpp" 11 | #include "FiniteStateVariable.hpp" 12 | #include "FiniteTransitionVariable.hpp" 13 | 14 | namespace ns0 { 15 | 16 | ///\todo correc inheritance 17 | struct FiniteStateMachine_t { 18 | BindableMember CurrentState; 19 | BindableMember LastTransition; 20 | }; 21 | 22 | } // namespace ns0 23 | 24 | REFL_TYPE( 25 | ns0::FiniteStateMachine_t, UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_FINITESTATEMACHINETYPE))) 26 | REFL_FIELD(CurrentState) 27 | REFL_FIELD(LastTransition, UmatiServerLib::attribute::PlaceholderOptional()) 28 | REFL_END 29 | -------------------------------------------------------------------------------- /TypeDefinition/ns0/FiniteStateVariable.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../TypeDefinition.hpp" 10 | #include "Constants.hpp" 11 | #include "StateVariable.hpp" 12 | 13 | namespace ns0 { 14 | 15 | //\todo correct inheritance 16 | struct FiniteStateVariable_t : public StateVariable_t {}; 17 | 18 | } // namespace ns0 19 | 20 | REFL_TYPE( 21 | ns0::FiniteStateVariable_t, 22 | Bases>(), 23 | UmatiServerLib::attribute::UaVariableType(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_FINITESTATEVARIABLETYPE))) 24 | REFL_FIELD(Value, UmatiServerLib::attribute::UaVariableTypeValue()) 25 | REFL_END 26 | -------------------------------------------------------------------------------- /TypeDefinition/ns0/FiniteTransitionVariable.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../TypeDefinition.hpp" 10 | #include "Constants.hpp" 11 | #include "TransitionVariable.hpp" 12 | 13 | namespace ns0 { 14 | 15 | struct FiniteTransitionVariable_t : public TransitionVariable_t {}; 16 | 17 | } // namespace ns0 18 | 19 | REFL_TYPE( 20 | ns0::FiniteTransitionVariable_t, 21 | Bases>(), 22 | UmatiServerLib::attribute::UaVariableType(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_FINITETRANSITIONVARIABLETYPE))) 23 | REFL_END 24 | -------------------------------------------------------------------------------- /TypeDefinition/ns0/Folder.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Sebastian Friedl, ISW University of Stuttgart (for VDMA e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../TypeDefinition.hpp" 10 | #include "Constants.hpp" 11 | 12 | namespace ns0 { 13 | 14 | struct Folder_t {}; 15 | 16 | } // namespace ns0 17 | 18 | REFL_TYPE(ns0::Folder_t, UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_FOLDERTYPE))) 19 | REFL_END 20 | -------------------------------------------------------------------------------- /TypeDefinition/ns0/GeneralModelChangeEvent.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../TypeDefinition.hpp" 10 | #include "BaseModelChangeEvent.hpp" 11 | #include "Constants.hpp" 12 | 13 | namespace ns0 { 14 | 15 | struct GeneralModelChangeEvent_t : public BaseModelChangeEvent_t { 16 | BindableMemberValue> Changes; 17 | }; 18 | 19 | } // namespace ns0 20 | 21 | REFL_TYPE( 22 | ns0::GeneralModelChangeEvent_t, 23 | Bases(), 24 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_GENERALMODELCHANGEEVENTTYPE))) 25 | REFL_FIELD(Changes) 26 | REFL_END 27 | -------------------------------------------------------------------------------- /TypeDefinition/ns0/IOrderedObject.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../TypeDefinition.hpp" 10 | #include "Constants.hpp" 11 | 12 | namespace ns0 { 13 | 14 | template 15 | struct IOrderedObject_t { 16 | BindableMemberValue NumberInList; 17 | }; 18 | 19 | } // namespace ns0 20 | 21 | REFL_TEMPLATE( 22 | (typename T), 23 | (ns0::IOrderedObject_t), 24 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_IORDEREDOBJECTTYPE))) 25 | REFL_FIELD(NumberInList) 26 | REFL_END 27 | -------------------------------------------------------------------------------- /TypeDefinition/ns0/MultiStateDiscreteType.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2022 (c) Alen Galinec 6 | */ 7 | 8 | #pragma once 9 | #include "../TypeDefinition.hpp" 10 | #include "Constants.hpp" 11 | #include "DiscreteItem.hpp" 12 | 13 | namespace ns0 { 14 | 15 | struct MultiStateDiscreteType_t : public DiscreteItem_t { 16 | BindableMemberValue Value; 17 | BindableMemberValue> EnumStrings; 18 | }; 19 | 20 | } // namespace ns0 21 | 22 | REFL_TYPE( 23 | ns0::MultiStateDiscreteType_t, 24 | Bases(), 25 | UmatiServerLib::attribute::UaVariableType(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_MULTISTATEDISCRETETYPE))) 26 | REFL_FIELD(Value, UmatiServerLib::attribute::UaVariableTypeValue()) 27 | REFL_FIELD(EnumStrings) 28 | REFL_END 29 | -------------------------------------------------------------------------------- /TypeDefinition/ns0/OrderedList.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../../UmatiServerLib/BindableMemberPlaceholder.hpp" 10 | #include "../TypeDefinition.hpp" 11 | #include "Constants.hpp" 12 | 13 | namespace ns0 { 14 | 15 | ///\todo limit T to IOrderedObject 16 | template 17 | struct OrderedList_t { 18 | BindableMemberValue NodeVersion; 19 | BindableMemberPlaceholder OrderedObjects; 20 | }; 21 | 22 | } // namespace ns0 23 | 24 | REFL_TEMPLATE( 25 | (typename T), (ns0::OrderedList_t), UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_ORDEREDLISTTYPE))) 26 | REFL_FIELD( 27 | NodeVersion, 28 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_ORDEREDLISTTYPE_NODEVERSION)), 29 | UmatiServerLib::attribute::PlaceholderOptional()) 30 | REFL_FIELD( 31 | OrderedObjects, 32 | UmatiServerLib::attribute::MemberInTypeNodeId(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_ORDEREDLISTTYPE_ORDEREDOBJECT_PLACEHOLDER)), 33 | UmatiServerLib::attribute::PlaceholderOptional()) 34 | REFL_END 35 | -------------------------------------------------------------------------------- /TypeDefinition/ns0/StateVariable.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../TypeDefinition.hpp" 10 | #include "Constants.hpp" 11 | 12 | namespace ns0 { 13 | 14 | template 15 | struct StateVariable_t { 16 | BindableMemberValue Value; 17 | BindableMemberValue EffectiveDisplayName; 18 | BindableMemberValue Id; 19 | BindableMemberValue Name; 20 | BindableMemberValue Number; 21 | }; 22 | 23 | } // namespace ns0 24 | 25 | REFL_TEMPLATE( 26 | (typename T), 27 | (ns0::StateVariable_t), 28 | UmatiServerLib::attribute::UaVariableType(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_STATEVARIABLETYPE))) 29 | REFL_FIELD(Id) 30 | REFL_FIELD(Value, UmatiServerLib::attribute::UaVariableTypeValue()) 31 | REFL_FIELD(Number, UmatiServerLib::attribute::PlaceholderOptional()) 32 | REFL_FIELD(Name, UmatiServerLib::attribute::PlaceholderOptional()) 33 | REFL_FIELD(EffectiveDisplayName, UmatiServerLib::attribute::PlaceholderOptional()) 34 | REFL_END 35 | -------------------------------------------------------------------------------- /TypeDefinition/ns0/TransitionEvent.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../TypeDefinition.hpp" 10 | #include "BaseEvent.hpp" 11 | #include "Constants.hpp" 12 | #include "StateVariable.hpp" 13 | #include "TransitionVariable.hpp" 14 | 15 | namespace ns0 { 16 | 17 | struct TransitionEvent_t : public BaseEvent_t { 18 | BindableMember> Transition; 19 | BindableMember> FromState; 20 | BindableMember> ToState; 21 | }; 22 | 23 | } // namespace ns0 24 | 25 | REFL_TYPE( 26 | ns0::TransitionEvent_t, 27 | Bases(), 28 | UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_TRANSITIONEVENTTYPE))) 29 | REFL_FIELD(Transition) 30 | REFL_FIELD(FromState) 31 | REFL_FIELD(ToState) 32 | REFL_END 33 | -------------------------------------------------------------------------------- /TypeDefinition/ns0/TransitionVariable.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../TypeDefinition.hpp" 10 | #include "Constants.hpp" 11 | 12 | namespace ns0 { 13 | 14 | template 15 | struct TransitionVariable_t { 16 | BindableMemberValue Value; 17 | BindableMemberValue Id; 18 | BindableMemberValue Number; 19 | BindableMemberValue Name; 20 | BindableMemberValue TransitionTime; 21 | }; 22 | 23 | } // namespace ns0 24 | 25 | REFL_TEMPLATE( 26 | (typename T), 27 | (ns0::TransitionVariable_t), 28 | UmatiServerLib::attribute::UaVariableType(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_TRANSITIONVARIABLETYPE))) 29 | REFL_FIELD(Id) 30 | REFL_FIELD(Value, UmatiServerLib::attribute::UaVariableTypeValue()) 31 | REFL_FIELD(Number, UmatiServerLib::attribute::PlaceholderOptional()) 32 | REFL_FIELD(Name, UmatiServerLib::attribute::PlaceholderOptional()) 33 | REFL_FIELD(TransitionTime, UmatiServerLib::attribute::PlaceholderOptional()) 34 | REFL_END 35 | -------------------------------------------------------------------------------- /TypeDefinition/ns0/TwoStateVariable.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../TypeDefinition.hpp" 10 | #include "Constants.hpp" 11 | #include "StateVariable.hpp" 12 | 13 | namespace ns0 { 14 | 15 | struct TwoStateVariable_t : public StateVariable_t { 16 | UmatiServerLib::DateTime_t EffectiveTransitionTime; 17 | UmatiServerLib::DateTime_t TransitionTime; 18 | UmatiServerLib::LocalizedText_t FalseState; 19 | UmatiServerLib::LocalizedText_t TrueState; 20 | }; 21 | 22 | } // namespace ns0 23 | 24 | REFL_TYPE( 25 | ns0::TwoStateVariable_t, 26 | Bases>(), 27 | UmatiServerLib::attribute::UaVariableType(UmatiServerLib::constexp::NodeId(constants::Ns0Uri, UA_NS0ID_TWOSTATEVARIABLETYPE))) 28 | REFL_FIELD(Id) 29 | REFL_FIELD(EffectiveTransitionTime, UmatiServerLib::attribute::PlaceholderOptional()) 30 | REFL_FIELD(TransitionTime, UmatiServerLib::attribute::PlaceholderOptional()) 31 | REFL_FIELD(FalseState, UmatiServerLib::attribute::PlaceholderOptional()) 32 | REFL_FIELD(TrueState, UmatiServerLib::attribute::PlaceholderOptional()) 33 | REFL_END 34 | -------------------------------------------------------------------------------- /UmatiServerLib/BindHelper.cpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2020 (c) Tonja Heinemann, ISW University of Stuttgart (for umati and VDW e.V.) 7 | */ 8 | 9 | #include "BindHelper.hpp" 10 | 11 | open62541Cpp::UA_NodeId resolveBrowsePath(UA_Server *pServer, const open62541Cpp::UA_BrowsePath &brPath) { 12 | // No Elements in browse path. 13 | if (brPath.BrowsePath->relativePath.elementsSize == 0) { 14 | return open62541Cpp::UA_NodeId(brPath.BrowsePath->startingNode); 15 | } 16 | 17 | auto trResult = UA_Server_translateBrowsePathToNodeIds(pServer, brPath.BrowsePath); 18 | 19 | if (trResult.statusCode != UA_STATUSCODE_GOOD) { 20 | std::stringstream ss; 21 | ss << "Result not good: " << UA_StatusCode_name(trResult.statusCode) << ". "; 22 | ss << "Could not resolve Path: " << static_cast(brPath); 23 | throw UmatiServerLib::Exceptions::NodeNotFound(ss.str()); 24 | } 25 | 26 | if (trResult.targetsSize != 1) { 27 | std::cout << "Unexpected number of results, expect 1, got: " << trResult.targetsSize << std::endl; 28 | throw std::invalid_argument("Unexpected number of results."); 29 | } 30 | open62541Cpp::UA_NodeId ret(trResult.targets[0].targetId.nodeId); 31 | UA_BrowsePathResult_clear(&trResult); 32 | return ret; 33 | } 34 | -------------------------------------------------------------------------------- /UmatiServerLib/BindableMember.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | 13 | #include "ValueDecorator.hpp" 14 | 15 | template 16 | class BindableMember : public ValueDecorator { 17 | protected: 18 | bool m_isOptional = true; 19 | bool m_isBind = false; 20 | 21 | public: 22 | bool IsOptional() { return m_isOptional; } 23 | bool IsBind() { return m_isBind; } 24 | 25 | void SetBind() { m_isBind = true; }; 26 | void ResetBind() { m_isBind = false; }; 27 | void SetMandatory() { m_isOptional = false; }; 28 | 29 | /// NodeId of the parent element, enable creating an optional member later on 30 | open62541Cpp::UA_NodeId ParentNodeId; 31 | 32 | /// \TODO replace by utilizing MemberInTypeNodeId 33 | open62541Cpp::UA_RelativPathElement RelativPathElement; 34 | 35 | /// NodeId of this member in the type definition (taken from MemberInTypeNodeId atribute) 36 | /// \TODO Replace by pointer to attribute 37 | open62541Cpp::UA_NodeId MemberInTypeNodeId; 38 | 39 | /// NodeId, when binded. Enable deletion later on 40 | open62541Cpp::UA_NodeId NodeId; 41 | 42 | BindableMember() = default; 43 | BindableMember(const T &val); 44 | virtual ~BindableMember() {} 45 | }; 46 | 47 | template 48 | BindableMember::BindableMember(const T &val) : ValueDecorator(val) {} 49 | -------------------------------------------------------------------------------- /UmatiServerLib/BindableMemberValue.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | 13 | #include "BindableMember.hpp" 14 | 15 | template 16 | class BindableMemberValue : public BindableMember { 17 | public: 18 | BindableMemberValue() = default; 19 | explicit BindableMemberValue(const T &val); 20 | UA_StatusCode StatusCode = UA_STATUSCODE_GOOD; 21 | std::optional SourceTimestamp; 22 | std::optional ServerTimestamp; 23 | 24 | BindableMemberValue &operator=(const T &other) { 25 | this->value = other; 26 | return *this; 27 | } 28 | }; 29 | 30 | template 31 | BindableMemberValue::BindableMemberValue(const T &val) : BindableMember(val) {} 32 | -------------------------------------------------------------------------------- /UmatiServerLib/ConvertSimpleValue.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2019-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2022 (c) Sebastian Friedl, ISW University of Stuttgart (for VDMA e.V.) 7 | * Copyright 2022 (c) Alen Galinec 8 | */ 9 | 10 | #pragma once 11 | 12 | #include 13 | 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #include "../OpcUaTypes/DateTime.hpp" 20 | #include "../OpcUaTypes/LocalizedText.hpp" 21 | #include "../OpcUaTypes/StatusCode.hpp" 22 | #include "NodeValue.hpp" 23 | 24 | namespace UmatiServerLib { 25 | 26 | using primitiveTypes_t = std:: 27 | variant; 28 | 29 | // UA_Variant* dst 30 | typedef std::function copyToVariantFunc; 31 | 32 | class ConvertSimpleValue { 33 | public: 34 | static copyToVariantFunc asVariantFunc(primitiveTypes_t pVariable); 35 | static copyToVariantFunc asVariantFunc(std::string *variable); 36 | static copyToVariantFunc asVariantFuncArray(std::vector *variable); 37 | static copyToVariantFunc asVariantFuncArray(std::vector *variable); 38 | static copyToVariantFunc asVariantFuncArray(std::vector *variable); 39 | static copyToVariantFunc asVariantFuncArray(std::vector *variable); 40 | static copyToVariantFunc asVariantFunc(UmatiServerLib::DateTime_t *variable); 41 | static copyToVariantFunc asVariantFunc(UmatiServerLib::StatusCode_t *variable); 42 | static copyToVariantFunc asVariantFunc(bool *pVariable); 43 | }; 44 | 45 | } // namespace UmatiServerLib 46 | -------------------------------------------------------------------------------- /UmatiServerLib/ConvertStructValue.cpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #include "ConvertStructValue.hpp" 9 | 10 | #include 11 | 12 | namespace UmatiServerLib { 13 | 14 | copyToVariantFunc ConvertStructValue::GetToVariantFunc(void *pVariable, const UA_DataType *typeDefinition) { 15 | return [pVariable, typeDefinition](UA_Variant *dst) { UA_Variant_setScalarCopy(dst, pVariable, typeDefinition); }; 16 | } 17 | 18 | void ConvertStructValue::copyValue(const std::string &src, void *memberPtr, const UA_DataType *typeDefinition) { 19 | open62541Cpp::UA_String str(src); 20 | UA_copy(str.String, memberPtr, &UA_TYPES[UA_TYPES_STRING]); 21 | } 22 | 23 | } // namespace UmatiServerLib 24 | -------------------------------------------------------------------------------- /UmatiServerLib/NodeValue.cpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2019-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #include "NodeValue.hpp" 9 | 10 | void NodeValue::operator=(NodeValue::GetValue_t F) { fCallback = F; } 11 | 12 | UA_DataValue NodeValue::Value() { return fCallback(); } 13 | 14 | NodeValue::NodeValue(const open62541Cpp::UA_NodeId &nodeId) : NodeId(nodeId) {} 15 | 16 | NodeValue::NodeValue(NodeValue &&other) : NodeId(std::move(other.NodeId)) {} 17 | -------------------------------------------------------------------------------- /UmatiServerLib/NodeValue.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2019-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | 10 | #include 11 | 12 | #include 13 | #include 14 | 15 | /** 16 | * @brief Class for accessting the value of a single node. 17 | * 18 | * Allow setting an callback function, which is called, when the value is needed. 19 | * @todo Use new External DataValue concept of open62541 20 | */ 21 | class NodeValue { 22 | typedef std::function GetValue_t; 23 | GetValue_t fCallback = nullptr; 24 | open62541Cpp::UA_NodeId NodeId; 25 | NodeValue(const NodeValue&) = delete; 26 | 27 | public: 28 | open62541Cpp::UA_NodeId GetNodeId() { return NodeId; } 29 | NodeValue(NodeValue&& other); 30 | NodeValue(const open62541Cpp::UA_NodeId& nodeId); 31 | // Use variadict expression https://stackoverflow.com/questions/9242234/c11-variadic-stdfunction-parameter 32 | void operator=(GetValue_t F); 33 | 34 | UA_DataValue Value(); 35 | }; 36 | -------------------------------------------------------------------------------- /UmatiServerLib/NodesMaster.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2019-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | 10 | #include 11 | 12 | #include 13 | #include 14 | 15 | #include "NodeValue.hpp" 16 | 17 | /** 18 | * @brief Stores a list of NodeId <-> Member and handle read value calls 19 | * 20 | */ 21 | class NodesMaster { 22 | protected: 23 | std::map m_Nodes; 24 | UA_Server *m_pServer; 25 | NodesMaster(const NodesMaster &other); 26 | void setCallback(const open62541Cpp::UA_NodeId &nodeId); 27 | 28 | public: 29 | NodesMaster(UA_Server *pServer); 30 | 31 | NodeValue &operator()(int nsIndex, int nsIntId); 32 | NodeValue &operator()(const UA_NodeId &nodeId); 33 | NodeValue &operator()(const open62541Cpp::UA_NodeId &nodeId); 34 | 35 | void Remove(const open62541Cpp::UA_NodeId &nodeId); 36 | 37 | // Read callback, which will be resolved to the member internally 38 | static void callback( 39 | UA_Server *pServer, 40 | const UA_NodeId *sessionId, 41 | void *sessionContext, 42 | const UA_NodeId *nodeid, 43 | void *nodeContext, 44 | const UA_NumericRange *range, 45 | const UA_DataValue *oldValue); 46 | }; 47 | -------------------------------------------------------------------------------- /UmatiServerLib/OpcUaKeys.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | 10 | #include 11 | 12 | #include 13 | #include 14 | 15 | /** 16 | * @brief Helper for OPC UA connection encryption 17 | * 18 | * Generating a Public/Private-Key-Pair is not fully implemented. 19 | */ 20 | class OpcUaKeys { 21 | public: 22 | OpcUaKeys( 23 | std::string privFile, 24 | std::string pubFile, 25 | std::vector trustedClients, 26 | std::vector issuerCerts, 27 | std::vector revocation); 28 | void Load(); 29 | UA_ByteString PrivateKey = UA_BYTESTRING_NULL; 30 | UA_ByteString PublicCert = UA_BYTESTRING_NULL; 31 | 32 | std::vector Trusted; 33 | std::vector Issuer; 34 | std::vector Revoked; 35 | virtual ~OpcUaKeys(); 36 | 37 | void GenerateKeys(); 38 | void StoreKeys(); 39 | 40 | protected: // Not fully implemented, so hidden 41 | void generatePrivateKey(); 42 | void generateCertificate(); 43 | 44 | void writeFile(std::string filename, const UA_ByteString& content); 45 | UA_ByteString readFile(std::string filename); 46 | std::vector readDir(std::string dirname); 47 | std::vector readFiles(std::vector filenames); 48 | 49 | protected: 50 | std::string PrivKeyFile; 51 | std::string PubCertFile; 52 | std::vector TrustedClients; 53 | std::vector IssuerCerts; 54 | std::vector Revocation; 55 | /*std::string TrustedDir; 56 | std::string IssuerDir; 57 | std::string RevocationDir;*/ 58 | }; 59 | -------------------------------------------------------------------------------- /UmatiServerLib/ServerHelper.cpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #include "ServerHelper.hpp" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | void writeEventNotifier(UA_Server *pServer, open62541Cpp::UA_NodeId nodeId, UA_Byte eventNotifier) { 15 | auto status = UA_Server_writeEventNotifier(pServer, *nodeId.NodeId, eventNotifier); 16 | if (status != UA_STATUSCODE_GOOD) { 17 | std::stringstream ss; 18 | ss << "WriteEventNotifier failed: " << UA_StatusCode_name(status); 19 | throw std::runtime_error(ss.str()); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /UmatiServerLib/ServerHelper.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include 10 | 11 | #include 12 | 13 | void writeEventNotifier(UA_Server *pServer, open62541Cpp::UA_NodeId nodeId, UA_Byte eventNotifier = UA_EVENTNOTIFIERTYPE_SUBSCRIBETOEVENTS); 14 | -------------------------------------------------------------------------------- /UmatiServerLib/StateMachine.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright (c) 2020-2021, 2023 Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | 10 | #include 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | #include "../OpcUaTypes/LocalizedText.hpp" 17 | 18 | namespace UmatiServerLib { 19 | /** 20 | * @brief Read a state machine from the address space 21 | * 22 | * This class reads all states and transitions from a state machine type with all information needed for setting them later on. 23 | */ 24 | class StateMachine { 25 | public: 26 | StateMachine(open62541Cpp::UA_NodeId stateMachineType, UA_Server *pServer); 27 | 28 | protected: 29 | struct State_t { 30 | LocalizedText_t DispName; 31 | std::uint32_t Number; 32 | open62541Cpp::UA_NodeId Id; 33 | }; 34 | 35 | struct Transition_t { 36 | LocalizedText_t DispName; 37 | open62541Cpp::UA_NodeId From; 38 | open62541Cpp::UA_NodeId To; 39 | std::uint32_t Number = UA_UINT32_MAX; 40 | }; 41 | void readStatesAndTransitions(); 42 | void mergeTransitions(); 43 | void readStates(open62541Cpp::UA_NodeId stateMachineType); 44 | State_t readStateValues(open62541Cpp::UA_NodeId stateObj); 45 | 46 | void readTransitions(); 47 | void readTransitions(open62541Cpp::UA_NodeId transitionObj); 48 | Transition_t readTransitionValues(open62541Cpp::UA_NodeId transition); 49 | 50 | std::list m_states; 51 | std::list m_transitions; 52 | UA_Server *m_pServer; 53 | open62541Cpp::UA_NodeId m_stateMachineType; 54 | }; 55 | } // namespace UmatiServerLib 56 | -------------------------------------------------------------------------------- /UmatiServerLib/TypeToUaDatatype.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #include 9 | 10 | /** 11 | * @brief Extendable namespace, which allows using custom UA_DataTypes* for C++ types. 12 | * 13 | */ 14 | namespace UmatiServerLib::TypeToUaDatatype { 15 | template 16 | inline const UA_DataType *GetType() { 17 | if constexpr (!refl::trait::is_reflectable::value) { 18 | return nullptr; 19 | } else { 20 | if constexpr (refl::descriptor::has_attribute(refl::reflect())) { 21 | return refl::descriptor::get_attribute(refl::reflect()).pDataType; 22 | } else { 23 | return nullptr; 24 | } 25 | } 26 | } 27 | 28 | template <> 29 | inline const UA_DataType *GetType() { 30 | return &UA_TYPES[UA_TYPES_NODEID]; 31 | } 32 | } // namespace UmatiServerLib::TypeToUaDatatype 33 | -------------------------------------------------------------------------------- /UmatiServerLib/ValueDecorator.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | 10 | template 11 | class ValueDecorator { 12 | public: 13 | ValueDecorator() = default; 14 | ValueDecorator(const T& val) : value(val) {} 15 | 16 | T& operator*() { return value; } 17 | 18 | T* operator->() { return &value; } 19 | 20 | T value; 21 | }; 22 | -------------------------------------------------------------------------------- /Woodworking/BasicWoodworking.cpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2021 (c) Christoph Ruckstetter, Michael Weinig AG 6 | */ 7 | 8 | #include "BasicWoodworking.hpp" 9 | 10 | BasicWoodworking::BasicWoodworking(UA_Server *pServer) : InstantiatedWoodworking(pServer) { 11 | MachineName = "BasicWoodworking"; 12 | CreateObject(); 13 | } 14 | 15 | void BasicWoodworking::CreateObject() { 16 | InstantiatedWoodworking::CreateObject(); 17 | InstantiateIdentification(); 18 | InstantiateMachineFlags(); 19 | InstantiateMachineOverview(); 20 | } 21 | 22 | void BasicWoodworking::InstantiateIdentification() { InstantiatedWoodworking::InstantiateIdentification(); } 23 | 24 | void BasicWoodworking::InstantiateMachineFlags() { InstantiatedWoodworking::InstantiateMachineFlags(); } 25 | 26 | void BasicWoodworking::InstantiateMachineOverview() { InstantiatedWoodworking::InstantiateMachineOverview(); } 27 | 28 | void BasicWoodworking::Simulate() { ++m_simStep; } 29 | -------------------------------------------------------------------------------- /Woodworking/BasicWoodworking.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2021 (c) Christoph Ruckstetter, Michael Weinig AG 6 | */ 7 | 8 | #pragma once 9 | #include "InstantiatedWoodworking.hpp" 10 | 11 | class BasicWoodworking : public InstantiatedWoodworking { 12 | public: 13 | BasicWoodworking(UA_Server *pServer); 14 | 15 | void Simulate() override; 16 | virtual ~BasicWoodworking() = default; 17 | 18 | protected: 19 | void CreateObject() override; 20 | 21 | void InstantiateIdentification() override; 22 | void InstantiateMachineFlags() override; 23 | void InstantiateMachineOverview() override; 24 | 25 | int m_simStep = 0; 26 | }; 27 | -------------------------------------------------------------------------------- /Woodworking/FullWoodworking.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2021 (c) Christoph Ruckstetter, Michael Weinig AG 6 | */ 7 | 8 | #pragma once 9 | #include "InstantiatedWoodworking.hpp" 10 | class FullWoodworking : public InstantiatedWoodworking { 11 | public: 12 | FullWoodworking(UA_Server *pServer); 13 | 14 | void Simulate() override; 15 | virtual ~FullWoodworking() = default; 16 | 17 | protected: 18 | void CreateObject() override; 19 | 20 | void InstantiateIdentification() override; 21 | void InstantiateMachineFlags() override; 22 | void InstantiateMachineOverview() override; 23 | void InstantiateMachineValues(); 24 | void InstantiateEventsDispatcher(); 25 | void InstantiateManufacturerSpecific(); 26 | void InstantiateSubunits(); 27 | 28 | int m_simStep = 0; 29 | }; 30 | -------------------------------------------------------------------------------- /Woodworking/InstantiatedWoodworking.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2021 (c) Christoph Ruckstetter, Michael Weinig AG 6 | */ 7 | 8 | #pragma once 9 | #include 10 | 11 | #include 12 | #include 13 | 14 | #include "../MachineTools/SimulatedInstance.hpp" 15 | #include "../TypeDefinition/Woodworking/WwMachine.hpp" 16 | #include "../UmatiServerLib/NodesMaster.hpp" 17 | 18 | class InstantiatedWoodworking : public SimulatedInstance { 19 | public: 20 | InstantiatedWoodworking(UA_Server *pServer); 21 | const std::uint16_t &NsIndex; 22 | 23 | protected: 24 | virtual void CreateObject(); 25 | virtual void InstantiateIdentification(); 26 | virtual void InstantiateMachineFlags(); 27 | virtual void InstantiateMachineOverview(); 28 | 29 | std::string MachineName; 30 | std::uint16_t m_nsIndex; 31 | woodworking::WwMachine_t ww; 32 | UA_Server *m_pServer; 33 | open62541Cpp::UA_NodeId m_nodeId = open62541Cpp::UA_NodeId((std::uint16_t)0, 0); 34 | NodesMaster n; 35 | }; 36 | -------------------------------------------------------------------------------- /arch/gmtime.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | * Copyright 2021 (c) Götz Görisch, VDW - Verein Deutscher Werkzeugmaschinenfabriken e.V. 7 | */ 8 | 9 | #include 10 | 11 | #if defined(__STDC_LIB_EXT1__) 12 | #define UMATI_GMTIME(pTimeT, pTm) gmtime_s(pTimeT, pTm) 13 | #elif defined(_WIN32) 14 | #define UMATI_GMTIME(pTimeT, pTm) gmtime_s(pTm, pTimeT) 15 | #elif (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 1) || defined(_XOPEN_SOURCE) || defined(_BSD_SOURCE) || defined(_SVID_SOURCE) || defined(_POSIX_SOURCE) 16 | #define UMATI_GMTIME(pTimeT, pTm) gmtime_r(pTimeT, pTm) 17 | #else 18 | #error "No safe gmtime found" 19 | #endif 20 | -------------------------------------------------------------------------------- /cmake/empty.bsd.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /configuration.docker.json: -------------------------------------------------------------------------------- 1 | { 2 | "Hostname": "", 3 | "Port": 4840, 4 | "UserPassAuthentication": [], 5 | "Encryption": { 6 | "ServerCert": "server_cert.pem", 7 | "ServerKey": "server_key.pem", 8 | "TrustedClients": ["trusted/trustedClient.der"], 9 | "IssuerCerts": [], 10 | "Revocation": [] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /configuration.template.json: -------------------------------------------------------------------------------- 1 | { 2 | "Hostname": "localhost", 3 | "Port": 4840, 4 | "UserPassAuthentication": [], 5 | "Encryption": { 6 | "ServerCert": "server_cert.der", 7 | "ServerKey": "server_key.der", 8 | "TrustedClients": [ 9 | "trusted/trustedClient.der" 10 | ], 11 | "IssuerCerts": [], 12 | "Revocation": [] 13 | } 14 | } -------------------------------------------------------------------------------- /doc/.vscode/image-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/umati/Sample-Server/8d8ea0156bdaf34d7b6298b9c20ab2bb4d40a69b/doc/.vscode/image-2.png -------------------------------------------------------------------------------- /doc/.vscode/image-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/umati/Sample-Server/8d8ea0156bdaf34d7b6298b9c20ab2bb4d40a69b/doc/.vscode/image-3.png -------------------------------------------------------------------------------- /doc/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "(Windows) Launch", 6 | "type": "cppvsdbg", 7 | "request": "launch", 8 | "program": "${workspaceFolder}/build/Debug/SampleServer.exe", 9 | "args": [], 10 | "stopAtEntry": false, 11 | "cwd": "${workspaceFolder}", 12 | "environment": [], 13 | "console": "externalTerminal" 14 | } 15 | ] 16 | } -------------------------------------------------------------------------------- /doc/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "cmake.installPrefix": "${workspaceFolder}/_install", 3 | "cmake.buildDirectory": "${workspaceFolder}/build", 4 | "cmake.debugConfig": { 5 | "cwd": "${workspaceFolder}" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /doc/Usage.md: -------------------------------------------------------------------------------- 1 | # Sample-Server 2 | 3 | ## How do I work with the umati Sample-Server 4 | 5 | 1. Operating System 6 | - [Ubuntu 20.04 (focal fossa)](https://ubuntu.com/download/desktop) on 7 | - [VMware Workstation 16 Player](https://www.vmware.com/de/products/workstation-player.html) 8 | 2. Sample-Server Environment 9 | - [Docker Engine on Ubuntu](https://docs.docker.com/engine/install/ubuntu/) 10 | 3. Sample-Server package 11 | - from [GitHub](https://github.com/umati/Sample-Server/pkgs/container/sample-server) 12 | 4. OPC UA Client 13 | - [UaExpert on Linux](https://www.unified-automation.com/de/downloads/opc-ua-clients/uaexpert.html) 14 | 15 | ## How to install the Sample-Server 16 | 17 | ### Steps 1+2 OS and Environment 18 | 19 | - look at the corresponding installation manuals on the download pages 20 | 21 | ### Step 3 Install Sample-Server package 22 | 23 | - download Sample-Server package 24 | `docker pull ghcr.io/umati/sample-server:develop` 25 | 26 | - run the container 27 | `docker run -d -p 4840:4840 ghcr.io/umati/sample-server:develop` 28 | 29 | - check if container is running 30 | `docker container ls -a` 31 | 32 | ### Step 4 Install [UaExpert OPC UA](https://www.unified-automation.com/products/development-tools/uaexpert.html) Client 33 | 34 | - open `*.tar` file with archive manager and run the `*.AppImage` 35 | 36 | ![RunAppImg](assets/RunAppImg.png) 37 | 38 | - add a new server with the correct endpoint 39 | 40 | ![AddServer](assets/AddServer.png) 41 | 42 | - connect to the server and browse to the `Machines` folder 43 | 44 | ![ConnectAndBrowse](assets/ConnectAndBrowse.png) 45 | -------------------------------------------------------------------------------- /doc/assets/AddServer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/umati/Sample-Server/8d8ea0156bdaf34d7b6298b9c20ab2bb4d40a69b/doc/assets/AddServer.png -------------------------------------------------------------------------------- /doc/assets/ConnectAndBrowse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/umati/Sample-Server/8d8ea0156bdaf34d7b6298b9c20ab2bb4d40a69b/doc/assets/ConnectAndBrowse.png -------------------------------------------------------------------------------- /doc/assets/RunAppImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/umati/Sample-Server/8d8ea0156bdaf34d7b6298b9c20ab2bb4d40a69b/doc/assets/RunAppImg.png -------------------------------------------------------------------------------- /doc/assets/sample-server.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/umati/Sample-Server/8d8ea0156bdaf34d7b6298b9c20ab2bb4d40a69b/doc/assets/sample-server.jpg -------------------------------------------------------------------------------- /initialbuild.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # MIT License 3 | # 4 | # Copyright 2021 (c) Götz Görisch, VDW - Verein Deutscher Werkzeugmaschinenfabriken e.V. 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy 7 | # of this software and associated documentation files (the "Software"), to deal 8 | # in the Software without restriction, including without limitation the rights 9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | # copies of the Software, and to permit persons to whom the Software is 11 | # furnished to do so, subject to the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included in all 14 | # copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | # SOFTWARE. 23 | 24 | BASEDIR=$(pwd) 25 | 26 | mkdir build-auto 27 | cd build-auto || exit 28 | cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH="$BASEDIR/install" ../.github/ 29 | cmake --build . 30 | cd SampleServer-build || exit 31 | ctest 32 | -------------------------------------------------------------------------------- /model/AdditiveManufacturing/Opc.Ua.AdditiveManufacturing.NodeSet2.bsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | This enumeration indicates the function of a specific material. 5 | 6 | 7 | 8 | 9 | 10 | This enumeration indicates the severity of a specific sensor. 11 | 12 | 13 | 14 | 15 | 16 | This enumeration indicates the severity of a specific sensor. 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /tests/Test_TranslateBrowse.cpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #include 9 | 10 | #include 11 | 12 | #include "../TypeDefinition/MachineTool/Constants.hpp" 13 | #include "../UmatiServerLib/Util.hpp" 14 | #include "util/MTServer_Test.hpp" 15 | 16 | class TranslateBrowse : public MTServer_Test {}; 17 | 18 | TEST_F(TranslateBrowse, translateBrowsePathToolListType) { 19 | open62541Cpp::UA_QualifiedName qnToolList(nsFromUri(pServer, constants::NsMachineToolUri), "ToolListType"); 20 | UA_BrowsePath p; 21 | UA_RelativePathElement el; 22 | p.startingNode = UA_NODEID_NUMERIC(0, UA_NS0ID_BASEOBJECTTYPE); 23 | p.relativePath.elementsSize = 1; 24 | p.relativePath.elements = ⪙ 25 | el.isInverse = UA_FALSE; 26 | el.referenceTypeId = UA_NODEID_NULL; 27 | el.targetName = *qnToolList.QualifiedName; 28 | UA_BrowsePathResult ret = UA_Server_translateBrowsePathToNodeIds(pServer, &p); 29 | ASSERT_EQ(ret.statusCode, UA_STATUSCODE_GOOD); 30 | ASSERT_EQ(ret.targetsSize, 1); 31 | ASSERT_EQ(ret.targets[0].targetId.nodeId.identifier.numeric, UA_MACHINETOOLID_TOOLLISTTYPE); 32 | UA_BrowsePathResult_clear(&ret); 33 | } 34 | -------------------------------------------------------------------------------- /tests/util/MTServer_Test.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include "../../src_generated/namespace_di_generated.h" 10 | #include "../../src_generated/namespace_ia_generated.h" 11 | #include "../../src_generated/namespace_machinery_generated.h" 12 | #include "../../src_generated/namespace_machinetool_generated.h" 13 | #include "UAServer_Test.hpp" 14 | 15 | class MTServer_Test : public UAServer_Test { 16 | protected: 17 | void SetUp() override { 18 | UAServer_Test::SetUp(); 19 | namespace_di_generated(pServer); 20 | namespace_ia_generated(pServer); 21 | namespace_machinery_generated(pServer); 22 | namespace_machinetool_generated(pServer); 23 | } 24 | 25 | void TearDown() override { UAServer_Test::TearDown(); } 26 | }; 27 | -------------------------------------------------------------------------------- /tests/util/UAClient.cpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #include "UAClient.hpp" 9 | 10 | #include 11 | #include 12 | 13 | UAClient::UAClient() { 14 | m_pClient = UA_Client_new(); 15 | UA_ClientConfig_setDefault(UA_Client_getConfig(m_pClient)); 16 | } 17 | 18 | UAClient::~UAClient() {} 19 | 20 | UA_StatusCode UAClient::Connect(std::string url) { return UA_Client_connect(m_pClient, url.c_str()); } 21 | 22 | UA_StatusCode UAClient::ReadValue(open62541Cpp::UA_NodeId nodeId) { 23 | UA_Variant Variant; 24 | UA_Variant_init(&Variant); 25 | auto ret = UA_Client_readValueAttribute(m_pClient, *nodeId.NodeId, &Variant); 26 | UA_Variant_clear(&Variant); 27 | return ret; 28 | } 29 | -------------------------------------------------------------------------------- /tests/util/UAClient.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include 10 | 11 | #include 12 | #include 13 | 14 | class UAClient { 15 | public: 16 | UAClient(); 17 | ~UAClient(); 18 | 19 | UA_StatusCode Connect(std::string url); 20 | UA_StatusCode ReadValue(open62541Cpp::UA_NodeId nodeId); 21 | 22 | protected: 23 | UA_Client *m_pClient = nullptr; 24 | }; 25 | -------------------------------------------------------------------------------- /tests/util/UAServer_Test.hpp: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | * 5 | * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) 6 | */ 7 | 8 | #pragma once 9 | #include 10 | #include 11 | #include 12 | 13 | class UAServer_Test : public ::testing::Test { 14 | public: 15 | UA_Server *pServer = nullptr; 16 | static constexpr const char *NsTestNs = "TestNs"; 17 | 18 | protected: 19 | static UA_StatusCode generateChildNodeIdInParentNs( 20 | UA_Server *server, 21 | const UA_NodeId *sessionId, 22 | void *sessionContext, 23 | const UA_NodeId *sourceNodeId, 24 | const UA_NodeId *targetParentNodeId, 25 | const UA_NodeId *referenceTypeId, 26 | UA_NodeId *targetNodeId) { 27 | if (UA_NodeId_equal(targetNodeId, &UA_NODEID_NULL) && !UA_NodeId_equal(targetParentNodeId, &UA_NODEID_NULL)) { 28 | targetNodeId->namespaceIndex = targetParentNodeId->namespaceIndex; 29 | } 30 | return UA_STATUSCODE_GOOD; 31 | } 32 | 33 | void SetUp() override { 34 | pServer = UA_Server_new(); 35 | auto pConfig = UA_Server_getConfig(pServer); 36 | UA_ServerConfig_setDefault(pConfig); 37 | pConfig->nodeLifecycle.generateChildNodeId = generateChildNodeIdInParentNs; 38 | m_testNs = UA_Server_addNamespace(pServer, NsTestNs); 39 | } 40 | 41 | void TearDown() override { 42 | UA_Server_run_shutdown(pServer); 43 | UA_Server_delete(pServer); 44 | } 45 | 46 | std::uint16_t m_testNs; 47 | }; 48 | -------------------------------------------------------------------------------- /tools/certGen/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !openssl.cnf.jinja2 3 | !requirements.txt 4 | !settings.template.json 5 | !.gitignore 6 | !createCertificate.py 7 | !README.md 8 | -------------------------------------------------------------------------------- /tools/certGen/README.md: -------------------------------------------------------------------------------- 1 | # Certificate generator 2 | 3 | This is a basic self sign certificate generator for an OPC UA Server. 4 | 5 | ## Usage 6 | 7 | - Create a Python virtual enviroment using `python -m venv venv` and activate it with `source venv/bin/activate`. 8 | 9 | - Install the required packages `pip install -r requirements.txt`. 10 | 11 | - Make a copy of `settings.template.json` and name it `.json` (`` is the name of your enviroment). Adapt your hostname(s) and IP adresses. 12 | 13 | - Call `python createCertificate.py `. 14 | 15 | - All certificates are stored created in a folder named ``. Copy `server_key.der` and `server_cert.der` in the directory of the server executable. 16 | -------------------------------------------------------------------------------- /tools/certGen/requirements.txt: -------------------------------------------------------------------------------- 1 | Jinja2==3.1.6 2 | MarkupSafe==3.0.2 3 | -------------------------------------------------------------------------------- /tools/certGen/settings.template.json: -------------------------------------------------------------------------------- 1 | { 2 | "Hostnames": ["localhost"], 3 | "IPs": ["127.0.0.1"] 4 | } 5 | --------------------------------------------------------------------------------