From 58fed133e156846d695a2da321ef09aede662780 Mon Sep 17 00:00:00 2001 From: jannast <104557199+jannast@users.noreply.github.com> Date: Tue, 6 Aug 2024 14:31:46 +0200 Subject: [PATCH 1/3] New manipulation get component sw version (#85) Add manipulation GetComponentSwVersion for devices # 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 --- CHANGELOG.md | 1 + src/t2iapi/device/device_responses.proto | 10 +++++++++- src/t2iapi/device/service.proto | 7 +++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 156bada..576d605 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - manipulation GetAvailableDeviceMetaData for device - manipulation AssociateValidateAndChangeIdentificationOfPatientOrLocationContextState for contexts +- manipulation GetComponentSwVersion for devices - manipulation ProvideInformationAboutLastCalibration for devices - manipulation ProvideInformationAboutNextCalibration for devices - manipulation SetSystemContextActivationStateAndContextAssociation for combined settings diff --git a/src/t2iapi/device/device_responses.proto b/src/t2iapi/device/device_responses.proto index 1721789..96301b3 100644 --- a/src/t2iapi/device/device_responses.proto +++ b/src/t2iapi/device/device_responses.proto @@ -37,4 +37,12 @@ Response containing the available device metadata. message AvailableDeviceMetaDataResponse { BasicResponse status = 1; t2iapi.biceps.MetaDataMsg meta_data = 2; // available device metadata -} \ No newline at end of file +} + +/* +Response containing the software version of the requested pm:AbstractDeviceComponentDescriptor handle when supported. + */ +message GetComponentSwVersionResponse { + BasicResponse status = 1; // status of the rpc + string software_version = 2; // Software version of the requested device component +} diff --git a/src/t2iapi/device/service.proto b/src/t2iapi/device/service.proto index 7ffa506..6aedd8f 100644 --- a/src/t2iapi/device/service.proto +++ b/src/t2iapi/device/service.proto @@ -143,4 +143,11 @@ service DeviceService { user's opinion, must be present for this device. */ rpc GetAvailableDeviceMetaData(BasicHandleRequest) returns (AvailableDeviceMetaDataResponse); + + /* + Get the software version of the requested pm:AbstractDeviceComponentDescriptor handle if it is representing + a component with a software version. + */ + rpc GetComponentSwVersion (BasicHandleRequest) + returns (t2iapi.device.GetComponentSwVersionResponse); } From ace404f3915b842a8334fbf67ac025b8e1d9948e Mon Sep 17 00:00:00 2001 From: jannast <104557199+jannast@users.noreply.github.com> Date: Wed, 14 Aug 2024 10:59:29 +0200 Subject: [PATCH 2/3] add manipulation GetComponentHwVersion (#87) add new manipulation GetComponentHwVersion to get the hardware version of an AbstractDeviceComponent # 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 --- CHANGELOG.md | 1 + src/t2iapi/device/device_responses.proto | 8 ++++++++ src/t2iapi/device/service.proto | 7 +++++++ 3 files changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 576d605..c9ebcb6 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 GetComponentHwVersion for devices - manipulation GetAvailableDeviceMetaData for device - manipulation AssociateValidateAndChangeIdentificationOfPatientOrLocationContextState for contexts - manipulation GetComponentSwVersion for devices diff --git a/src/t2iapi/device/device_responses.proto b/src/t2iapi/device/device_responses.proto index 96301b3..7791096 100644 --- a/src/t2iapi/device/device_responses.proto +++ b/src/t2iapi/device/device_responses.proto @@ -46,3 +46,11 @@ message GetComponentSwVersionResponse { BasicResponse status = 1; // status of the rpc string software_version = 2; // Software version of the requested device component } + +/* +Response containing the hardware version of the requested pm:AbstractDeviceComponentDescriptor handle when supported. + */ +message GetComponentHwVersionResponse { + BasicResponse status = 1; // status of the rpc + string hardware_version = 2; // Hardware version of the requested device component +} diff --git a/src/t2iapi/device/service.proto b/src/t2iapi/device/service.proto index 6aedd8f..8bf4bcb 100644 --- a/src/t2iapi/device/service.proto +++ b/src/t2iapi/device/service.proto @@ -150,4 +150,11 @@ service DeviceService { */ rpc GetComponentSwVersion (BasicHandleRequest) returns (t2iapi.device.GetComponentSwVersionResponse); + + /* + Get the hardware version of the requested pm:AbstractDeviceComponentDescriptor handle if it is representing + a component with a hardware version. + */ + rpc GetComponentHwVersion (BasicHandleRequest) + returns (t2iapi.device.GetComponentHwVersionResponse); } From bacdf22b3e7d6f946ed62a425e23874789544ba3 Mon Sep 17 00:00:00 2001 From: Maximilian Pilz Date: Wed, 14 Aug 2024 15:31:48 +0200 Subject: [PATCH 3/3] 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); }