From 4501d08816e4311c07ad1d4d146c09a9e192445f Mon Sep 17 00:00:00 2001 From: maximilianpilz <104556470+maximilianpilz@users.noreply.github.com> Date: Wed, 14 Aug 2024 14:17:50 +0200 Subject: [PATCH 1/4] add PhysicallyDisconnectRemovableSubsystemAfterSettingActivationStateOnOrStndBy --- .../header-MIT-draeger-java-and-proto.txt | 6 +++++ .../license-check/header-MIT-draeger-java.txt | 6 ----- .../header-MIT-draeger-proto.txt | 6 ----- .../header-MIT-draeger-python.txt | 10 +++++--- .github/license-check/license-config | 23 +++++++++++++++++ .github/license-check/license-config.json | 25 ------------------- .github/workflows/license-check.yml | 8 +++--- CHANGELOG.md | 1 + src/t2iapi/combined/service.proto | 22 +++++++++++++++- 9 files changed, 61 insertions(+), 46 deletions(-) create mode 100644 .github/license-check/header-MIT-draeger-java-and-proto.txt delete mode 100644 .github/license-check/header-MIT-draeger-java.txt delete mode 100644 .github/license-check/header-MIT-draeger-proto.txt create mode 100644 .github/license-check/license-config delete mode 100644 .github/license-check/license-config.json diff --git a/.github/license-check/header-MIT-draeger-java-and-proto.txt b/.github/license-check/header-MIT-draeger-java-and-proto.txt new file mode 100644 index 0000000..13d9ec2 --- /dev/null +++ b/.github/license-check/header-MIT-draeger-java-and-proto.txt @@ -0,0 +1,6 @@ +/\* +This Source Code Form is subject to the terms of the MIT License. +Copyright \(c\) (?:([0-9]{4}-[0-9]{4})|([0-9]{4}))(?:, (?:([0-9]{4}-[0-9]{4})|([0-9]{4})))* Draegerwerk AG & Co. KGaA. + +SPDX-License-Identifier: MIT +\*/ \ No newline at end of file diff --git a/.github/license-check/header-MIT-draeger-java.txt b/.github/license-check/header-MIT-draeger-java.txt deleted file mode 100644 index 1f21077..0000000 --- a/.github/license-check/header-MIT-draeger-java.txt +++ /dev/null @@ -1,6 +0,0 @@ -/* -This Source Code Form is subject to the terms of the MIT License. -Copyright (c) %year% Draegerwerk AG & Co. KGaA. - -SPDX-License-Identifier: MIT -*/ \ No newline at end of file diff --git a/.github/license-check/header-MIT-draeger-proto.txt b/.github/license-check/header-MIT-draeger-proto.txt deleted file mode 100644 index 1f21077..0000000 --- a/.github/license-check/header-MIT-draeger-proto.txt +++ /dev/null @@ -1,6 +0,0 @@ -/* -This Source Code Form is subject to the terms of the MIT License. -Copyright (c) %year% Draegerwerk AG & Co. KGaA. - -SPDX-License-Identifier: MIT -*/ \ No newline at end of file diff --git a/.github/license-check/header-MIT-draeger-python.txt b/.github/license-check/header-MIT-draeger-python.txt index 2a1d894..6a46561 100644 --- a/.github/license-check/header-MIT-draeger-python.txt +++ b/.github/license-check/header-MIT-draeger-python.txt @@ -1,4 +1,6 @@ -# This Source Code Form is subject to the terms of the MIT License. -# -# Copyright (c) %year% Draegerwerk AG & Co. KGaA. -# SPDX-License-Identifier: MIT \ No newline at end of file +/\# +\# This Source Code Form is subject to the terms of the MIT License. +\# +\# Copyright \(c\) (?:([0-9]{4}-[0-9]{4})|([0-9]{4}))(?:, (?:([0-9]{4}-[0-9]{4})|([0-9]{4})))* Draegerwerk AG & Co. KGaA. +\# SPDX-License-Identifier: MIT +/ \ No newline at end of file diff --git a/.github/license-check/license-config b/.github/license-check/license-config new file mode 100644 index 0000000..d68b861 --- /dev/null +++ b/.github/license-check/license-config @@ -0,0 +1,23 @@ +[DraegerLicenseMITJava] +file_name_pattern: tests/java/src/**/*.java +file_header_encoding: utf-8 +header_regex_file: .github/license-check/header-MIT-draeger-java-and-proto.txt +header_regex_file_encoding: utf-8 + +[DraegerLicenseMITProto] +file_name_pattern: src/**/*.proto +file_header_encoding: utf-8 +header_regex_file: .github/license-check/header-MIT-draeger-java-and-proto.txt +header_regex_file_encoding: utf-8 + +[DraegerLicenseMITPythonTests] +file_name_pattern: tests/python/**/*.py +file_header_encoding: utf-8 +header_regex_file: .github/license-check/header-MIT-draeger-python.txt +header_regex_file_encoding: utf-8 + +[DraegerLicenseMITPythonSetup] +file_name_pattern: python/**/*.py +file_header_encoding: utf-8 +header_regex_file: .github/license-check/header-MIT-draeger-python.txt +header_regex_file_encoding: utf-8 diff --git a/.github/license-check/license-config.json b/.github/license-check/license-config.json deleted file mode 100644 index f9c572c..0000000 --- a/.github/license-check/license-config.json +++ /dev/null @@ -1,25 +0,0 @@ -[ - { - "include": [ - "src/**/*.proto" - ], - "exclude": [ - "src/buf.yaml" - ], - "license": "./.github/license-check/header-MIT-draeger-proto.txt" - }, - { - "include": [ - "tests/java/src/**/*.java" - ], - "license": "./.github/license-check/header-MIT-draeger-java.txt" - }, - - { - "include": [ - "python/**/*.py", - "tests/python/**/*.py" - ], - "license": "./.github/license-check/header-MIT-draeger-python.txt" - } -] \ No newline at end of file diff --git a/.github/workflows/license-check.yml b/.github/workflows/license-check.yml index 4f25065..8eafae9 100644 --- a/.github/workflows/license-check.yml +++ b/.github/workflows/license-check.yml @@ -10,8 +10,8 @@ jobs: steps: # Run `git checkout` - uses: actions/checkout@v4 - - uses: viperproject/check-license-header@v1 + - uses: maximilianpilz/file-header-check@v1 with: - path: . - config: .github/license-check/license-config.json - strict: false # + config: '.github/license-check/license-config' + config-encoding: 'utf-8' + log-level: 'DEBUG' diff --git a/CHANGELOG.md b/CHANGELOG.md index c9ebcb6..eca7cd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- manipulation PhysicallyDisconnectRemovableSubsystemAfterSettingActivationStateOnOrStndBy - manipulation GetComponentHwVersion for devices - manipulation GetAvailableDeviceMetaData for device - manipulation AssociateValidateAndChangeIdentificationOfPatientOrLocationContextState for contexts diff --git a/src/t2iapi/combined/service.proto b/src/t2iapi/combined/service.proto index 8b9861d..73ed3de 100644 --- a/src/t2iapi/combined/service.proto +++ b/src/t2iapi/combined/service.proto @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the MIT License. -Copyright (c) 2023 Draegerwerk AG & Co. KGaA. +Copyright (c) 2023, 2024 Draegerwerk AG & Co. KGaA. SPDX-License-Identifier: MIT */ @@ -11,6 +11,7 @@ package t2iapi.combined; import "t2iapi/combined/combined_requests.proto"; import "t2iapi/context/context_responses.proto"; +import "t2iapi/basic_requests.proto" import "t2iapi/basic_responses.proto"; option java_package = "com.draeger.medical.t2iapi.combined"; @@ -73,4 +74,23 @@ service CombinedService { rpc SetSystemContextActivationStateAndContextAssociation ( t2iapi.combined.SetSystemContextActivationStateAndContextAssociationRequest) returns (BasicResponse); + + /* + Request to set the pm:AbstractDeviceComponentState/@ActivationState corresponding to the specified handle to + a value in { "On", "StndBy" } and + physically disconnect the removable subsystem being represented by the + corresponding pm:AbstractDeviceComponentDescriptor all while persisting the aforementioned ActivationState except when + it is necessary to change it due to the physical disconnection by means other than this manipulation. + + The ActivationState as requested shall be persisted in all cases except (indirectly) + as a result of the physical disconnection. + Reasons other than the physical disconnection constitute a RESULT_NOT_SUPPORTED or RESULT_FAIL. + In case the ActivationState is not going to be persisted it shall not be a direct result of this manipulation, i.e. + this manipulation shall not directly change the ActivationState in a way not described here. + + In case the pm:AbstractDeviceComponentDescriptor with the specified handle does not represent a removable subsystem + it shall return RESULT_NOT_SUPPORTED. + */ + rpc PhysicallyDisconnectRemovableSubsystemAfterSettingActivationStateOnOrStndBy (BasicHandleRequest) + returns (BasicResponse); } From e071d699068c5f0b6a9c3842061efe040bf75742 Mon Sep 17 00:00:00 2001 From: maximilianpilz <104556470+maximilianpilz@users.noreply.github.com> Date: Wed, 14 Aug 2024 14:23:22 +0200 Subject: [PATCH 2/4] fix python header pattern --- .github/license-check/header-MIT-draeger-python.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/license-check/header-MIT-draeger-python.txt b/.github/license-check/header-MIT-draeger-python.txt index 6a46561..6f5774b 100644 --- a/.github/license-check/header-MIT-draeger-python.txt +++ b/.github/license-check/header-MIT-draeger-python.txt @@ -1,5 +1,4 @@ -/\# -\# This Source Code Form is subject to the terms of the MIT License. +/\# This Source Code Form is subject to the terms of the MIT License. \# \# Copyright \(c\) (?:([0-9]{4}-[0-9]{4})|([0-9]{4}))(?:, (?:([0-9]{4}-[0-9]{4})|([0-9]{4})))* Draegerwerk AG & Co. KGaA. \# SPDX-License-Identifier: MIT From 1edb85cf02e48a9b8ea30d22aaa8c8a0c9549728 Mon Sep 17 00:00:00 2001 From: maximilianpilz <104556470+maximilianpilz@users.noreply.github.com> Date: Wed, 14 Aug 2024 14:29:37 +0200 Subject: [PATCH 3/4] fix python header pattern --- .github/license-check/header-MIT-draeger-python.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/license-check/header-MIT-draeger-python.txt b/.github/license-check/header-MIT-draeger-python.txt index 6f5774b..65798e1 100644 --- a/.github/license-check/header-MIT-draeger-python.txt +++ b/.github/license-check/header-MIT-draeger-python.txt @@ -1,5 +1,4 @@ -/\# This Source Code Form is subject to the terms of the MIT License. -\# -\# Copyright \(c\) (?:([0-9]{4}-[0-9]{4})|([0-9]{4}))(?:, (?:([0-9]{4}-[0-9]{4})|([0-9]{4})))* Draegerwerk AG & Co. KGaA. -\# SPDX-License-Identifier: MIT -/ \ No newline at end of file +# This Source Code Form is subject to the terms of the MIT License. +# +# Copyright \(c\) (?:([0-9]{4}-[0-9]{4})|([0-9]{4}))(?:, (?:([0-9]{4}-[0-9]{4})|([0-9]{4})))* Draegerwerk AG & Co. KGaA. +# SPDX-License-Identifier: MIT From 5290b7a850caa1261afde9de576cb26d9934250f Mon Sep 17 00:00:00 2001 From: maximilianpilz <104556470+maximilianpilz@users.noreply.github.com> Date: Wed, 14 Aug 2024 14:31:41 +0200 Subject: [PATCH 4/4] fix syntax error in service.proto --- src/t2iapi/combined/service.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/t2iapi/combined/service.proto b/src/t2iapi/combined/service.proto index 73ed3de..2beb5fe 100644 --- a/src/t2iapi/combined/service.proto +++ b/src/t2iapi/combined/service.proto @@ -11,7 +11,7 @@ package t2iapi.combined; import "t2iapi/combined/combined_requests.proto"; import "t2iapi/context/context_responses.proto"; -import "t2iapi/basic_requests.proto" +import "t2iapi/basic_requests.proto"; import "t2iapi/basic_responses.proto"; option java_package = "com.draeger.medical.t2iapi.combined";