From 19b05160497bb9cee7b8c2763520bf0d0c721377 Mon Sep 17 00:00:00 2001 From: Ilja Antipov Date: Thu, 1 Aug 2024 10:09:28 +0200 Subject: [PATCH 1/5] implement manipulations SetMdsUiLanguage and GetMdsUiSupportedLanguages --- CHANGELOG.md | 2 ++ src/t2iapi/device/device_requests.proto | 9 +++++++++ src/t2iapi/device/device_responses.proto | 8 ++++++++ src/t2iapi/device/service.proto | 16 ++++++++++++++-- 4 files changed, 33 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 156bada..6fcf522 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - manipulation ProvideInformationAboutLastCalibration for devices - manipulation ProvideInformationAboutNextCalibration for devices - manipulation SetSystemContextActivationStateAndContextAssociation for combined settings +- manipulation SetMdsUiLanguage for devices +- manipulation GetMdsUiSupportedLanguages for devices ## [4.1.0] - 2024-02-22 diff --git a/src/t2iapi/device/device_requests.proto b/src/t2iapi/device/device_requests.proto index 7a4c2c5..fbdc2f7 100644 --- a/src/t2iapi/device/device_requests.proto +++ b/src/t2iapi/device/device_requests.proto @@ -36,6 +36,15 @@ message SetLanguageRequest { string language = 1; // the language to set as specified by RFC5646, e.g. en-US } +/* +Request to set the language of the component with a UI represented by the MDS to the given language. + */ +message SetMdsUiLanguageRequest { + string handle = 1; // pm:MdsDescriptor/@Handle representing the component with a UI for which the language + // shall be set + string language = 2; // the language to set as specified by RFC5646, e.g. en-US +} + /* Request a list of removable descriptors of the given class. */ diff --git a/src/t2iapi/device/device_responses.proto b/src/t2iapi/device/device_responses.proto index 1721789..820ea26 100644 --- a/src/t2iapi/device/device_responses.proto +++ b/src/t2iapi/device/device_responses.proto @@ -15,6 +15,14 @@ import "t2iapi/biceps/metadata.proto"; option java_package = "com.draeger.medical.t2iapi.device"; option java_outer_classname = "DeviceResponses"; +/* +Response containing all languages supported by the UI component represented by a MDS + */ +message GetMdsUiSupportedLanguagesResponse { + BasicResponse status = 1; + repeated string languages = 2; // list of languages which are supported by the UI component represented by a MDS +} + /* Response which contains all descriptor handles that can be removed and reinserted into the MDIB of the device. */ diff --git a/src/t2iapi/device/service.proto b/src/t2iapi/device/service.proto index 7ffa506..170a032 100644 --- a/src/t2iapi/device/service.proto +++ b/src/t2iapi/device/service.proto @@ -52,6 +52,18 @@ service DeviceService { */ rpc SetLanguage (t2iapi.device.SetLanguageRequest) returns (BasicResponse); + /* + Set the language of the component with a UI represented by the MDS to the given language. + The manipulated state shall be persistent until a next manipulation call. If the device is not able to maintain + the static state, it shall return RESULT_NOT_SUPPORTED. + */ + rpc SetMdsUiLanguage (t2iapi.device.SetMdsUiLanguageRequest) returns (BasicResponse); + + /* + Get all supported languages of the component with a UI represented by the MDS with the provided handle. + */ + rpc GetMdsUiSupportedLanguages (t2iapi.device.SetMdsUiLanguageRequest) returns (BasicResponse); + /* Get all descriptor handles which can be removed and reinserted into the MDIB of the device and whose descriptors are of the given class. @@ -66,7 +78,7 @@ service DeviceService { to remove descriptors (at least one of every possible kind). */ rpc GetRemovableDescriptorsOfClass (GetRemovableDescriptorsOfClassRequest) - returns (t2iapi.device.GetRemovableDescriptorsResponse); + returns (t2iapi.device.GetMdsUiSupportedLanguagesResponse); /* Remove a descriptor from the device MDIB. @@ -128,7 +140,7 @@ service DeviceService { */ rpc ProvideInformationAboutLastCalibration (t2iapi.device.ProvideInformationAboutLastCalibrationRequest) returns (BasicResponse); - + /* Provide information about the pm:NextCalibration for the given pm:AbstractDeviceComponentDescriptor. If the device is not able to provide the information, it shall return RESULT_NOT_SUPPORTED. From 2281afe6280a91d833123d17c02bf1a81c9332b2 Mon Sep 17 00:00:00 2001 From: Ilja Antipov Date: Thu, 1 Aug 2024 11:37:44 +0200 Subject: [PATCH 2/5] revert changes to GetRemovableDescriptorsOfClass,use correct response for GetMdsUiSupportedLanguages --- src/t2iapi/device/service.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/t2iapi/device/service.proto b/src/t2iapi/device/service.proto index 170a032..741bd97 100644 --- a/src/t2iapi/device/service.proto +++ b/src/t2iapi/device/service.proto @@ -62,7 +62,7 @@ service DeviceService { /* Get all supported languages of the component with a UI represented by the MDS with the provided handle. */ - rpc GetMdsUiSupportedLanguages (t2iapi.device.SetMdsUiLanguageRequest) returns (BasicResponse); + rpc GetMdsUiSupportedLanguages (t2iapi.device.SetMdsUiLanguageRequest) returns (GetMdsUiSupportedLanguagesResponse); /* Get all descriptor handles which can be removed and reinserted into the MDIB of the device @@ -78,7 +78,7 @@ service DeviceService { to remove descriptors (at least one of every possible kind). */ rpc GetRemovableDescriptorsOfClass (GetRemovableDescriptorsOfClassRequest) - returns (t2iapi.device.GetMdsUiSupportedLanguagesResponse); + returns (t2iapi.device.GetRemovableDescriptorsResponse); /* Remove a descriptor from the device MDIB. From baecc3ae5d6bb4fed188a73b34a5c36618df101c Mon Sep 17 00:00:00 2001 From: Ilja Antipov Date: Mon, 5 Aug 2024 12:56:02 +0200 Subject: [PATCH 3/5] use BasicHandleRequest instead of SetMdsUiLanguageRequest --- src/t2iapi/device/service.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/t2iapi/device/service.proto b/src/t2iapi/device/service.proto index 741bd97..ac62d62 100644 --- a/src/t2iapi/device/service.proto +++ b/src/t2iapi/device/service.proto @@ -62,7 +62,7 @@ service DeviceService { /* Get all supported languages of the component with a UI represented by the MDS with the provided handle. */ - rpc GetMdsUiSupportedLanguages (t2iapi.device.SetMdsUiLanguageRequest) returns (GetMdsUiSupportedLanguagesResponse); + rpc GetMdsUiSupportedLanguages (t2iapi.BasicHandleRequest) returns (GetMdsUiSupportedLanguagesResponse); /* Get all descriptor handles which can be removed and reinserted into the MDIB of the device From c1bcb2f03118d31f3a51d05f5ce81fef9a86cc47 Mon Sep 17 00:00:00 2001 From: Ilja Antipov Date: Wed, 4 Sep 2024 10:30:47 +0200 Subject: [PATCH 4/5] fix remarks --- src/t2iapi/device/device_responses.proto | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/t2iapi/device/device_responses.proto b/src/t2iapi/device/device_responses.proto index 820ea26..6f3cd02 100644 --- a/src/t2iapi/device/device_responses.proto +++ b/src/t2iapi/device/device_responses.proto @@ -16,11 +16,12 @@ option java_package = "com.draeger.medical.t2iapi.device"; option java_outer_classname = "DeviceResponses"; /* -Response containing all languages supported by the UI component represented by a MDS +Response containing all languages supported by the UI component represented by an MDS */ message GetMdsUiSupportedLanguagesResponse { BasicResponse status = 1; - repeated string languages = 2; // list of languages which are supported by the UI component represented by a MDS + repeated string languages = 2; // list of languages as specified by RFC5646 which are supported by the + // UI component represented by an MDS } /* From fd90cbe41b0f2dada3273f7d2b6ed00ef20ce29d Mon Sep 17 00:00:00 2001 From: Ilja Antipov Date: Mon, 9 Sep 2024 09:38:35 +0200 Subject: [PATCH 5/5] fix remark --- src/t2iapi/device/device_responses.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/t2iapi/device/device_responses.proto b/src/t2iapi/device/device_responses.proto index facc890..22fbb8a 100644 --- a/src/t2iapi/device/device_responses.proto +++ b/src/t2iapi/device/device_responses.proto @@ -16,7 +16,7 @@ option java_package = "com.draeger.medical.t2iapi.device"; option java_outer_classname = "DeviceResponses"; /* -Response containing all languages supported by the UI component represented by an MDS +Response containing all languages supported by the UI component represented by an MDS. */ message GetMdsUiSupportedLanguagesResponse { BasicResponse status = 1;