From 8c9a8dc30b1fce2016a8b19885ca3abfe4266124 Mon Sep 17 00:00:00 2001 From: jannast <104557199+jannast@users.noreply.github.com> Date: Tue, 10 Oct 2023 15:29:27 +0200 Subject: [PATCH] new manipulation SetOperationModeStatusAndSetOperatingMode (#70) // new manipulation SetOperationModeStatusAndSetOperatingMode # 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/combined/combined_requests.proto | 13 +++++++++++++ src/t2iapi/combined/service.proto | 11 +++++++++++ src/t2iapi/metric/types.proto | 13 +++++++++++++ 4 files changed, 38 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0980e8c..922169f 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 SetModeOfOperationAndSetOperatingMode for combined settings - manipulation ConveyMetricDemoValues for metrics - manipulation SetAlertConditionAndAlertSignalActivationState for alert activation states diff --git a/src/t2iapi/combined/combined_requests.proto b/src/t2iapi/combined/combined_requests.proto index 865cd14..67929a2 100644 --- a/src/t2iapi/combined/combined_requests.proto +++ b/src/t2iapi/combined/combined_requests.proto @@ -12,6 +12,7 @@ package t2iapi.combined; import "t2iapi/context/types.proto"; import "t2iapi/operation/types.proto"; import "t2iapi/activation_state/types.proto"; +import "t2iapi/metric/types.proto"; option java_package = "com.draeger.medical.t2iapi.combined"; @@ -57,3 +58,15 @@ message SetAlertActivationAndSetOperatingModeRequest { // shall be set t2iapi.operation.OperatingMode operating_mode = 4; // the requested OperatingMode value of the operation state } + +/* +Request to set the non-exclusive mode of operation represented by an enum metric with the given handle to the +requested value and set the @OperatingMode of the operation with the given handle to the requested OperatingMode value. +*/ +message SetModeOfOperationAndSetOperatingModeRequest { + string metric_descriptor_handle = 1; // handle of the enum metric, which represents the mode of operation + t2iapi.metric.ModeOfOperation mode_of_operation = 2; // defines the mode of operation to be applied + string operation_descriptor_handle = 3; // the operation descriptor handle for which the OperatingMode value + // shall be set + t2iapi.operation.OperatingMode operating_mode = 4; // OperatingMode value to be set for the operation +} diff --git a/src/t2iapi/combined/service.proto b/src/t2iapi/combined/service.proto index 328bcc5..cb7c7d7 100644 --- a/src/t2iapi/combined/service.proto +++ b/src/t2iapi/combined/service.proto @@ -51,4 +51,15 @@ service CombinedService { rpc SetAlertActivationAndSetOperatingMode ( t2iapi.combined.SetAlertActivationAndSetOperatingModeRequest) returns (BasicResponse); + + /* + Request to set the non-exclusive mode of operation represented by an enum metric with the given handle to the + requested value and set the @OperatingMode of the operation with the given handle to the requested OperatingMode + value. + The manipulated states shall be persistent until a next manipulation call or an SDC operation invocation. + If the device is not able to maintain the static states, it shall return RESULT_NOT_SUPPORTED. + */ + rpc SetModeOfOperationAndSetOperatingMode ( + t2iapi.combined.SetModeOfOperationAndSetOperatingModeRequest) + returns (BasicResponse); } diff --git a/src/t2iapi/metric/types.proto b/src/t2iapi/metric/types.proto index ec38133..cb3f3d9 100644 --- a/src/t2iapi/metric/types.proto +++ b/src/t2iapi/metric/types.proto @@ -45,6 +45,19 @@ enum OperationModeStatus { OPERATION_MODE_STATUS_PAUSED = 2; // operation mode is not applied, but available } +/* +Defines the possible non-exclusive MODE OF OPERATION according to MPKP (11073-10701-2022). +These are represented as an enum metric where the instances of pm:AllowedValue have the pm:Type of: +- MDC_MODE_OF_OPERATION_ON, +- MDC_MODE_OF_OPERATION_OFF, and +- optionally MDC_MODE_OF_OPERATION_PAUSED. + */ +enum ModeOfOperation { + MODE_OF_OPERATION_ON = 0; // mode of operation is applied + MODE_OF_OPERATION_OFF = 1; // mode of operation is not applied, but available + MODE_OF_OPERATION_PAUSED = 2; // mode of operation is not applied, but available +} + /* The MetricStatus is intended to reflect the state of the device and is not the ActivationState. This state in turn should trigger the setting of the ActivationState, it is linked to the