From bacdf22b3e7d6f946ed62a425e23874789544ba3 Mon Sep 17 00:00:00 2001 From: Maximilian Pilz Date: Wed, 14 Aug 2024 15:31:48 +0200 Subject: [PATCH] Add physical disconnection (#89) Add the manipulation PhysicallyDisconnectRemovableSubsystemAfterSettingActivationStateOnOrStndBy and update the license check to enable developers to update the dates in all headers. # Checklist The following aspects have been respected by the author of this pull request, confirmed by both pull request assignee **and** reviewer: * Changelog update (necessity checked and entry added or not added respectively) * [x] Pull Request Assignee * [x] Reviewer * README update (necessity checked and entry added or not added respectively) * [x] Pull Request Assignee * [x] Reviewer --- .../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 | 4 +-- .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, 57 insertions(+), 44 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..65798e1 100644 --- a/.github/license-check/header-MIT-draeger-python.txt +++ b/.github/license-check/header-MIT-draeger-python.txt @@ -1,4 +1,4 @@ # 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 +# 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 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..2beb5fe 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); }