From d594e12a778e107a31d5bb12ca99df865f7edaee Mon Sep 17 00:00:00 2001 From: Jannasch Date: Wed, 4 Oct 2023 09:16:26 +0200 Subject: [PATCH 1/3] new manipulation SetOperationModeStatusAndSetOperatingMode --- CHANGELOG.md | 1 + src/t2iapi/combined/combined_requests.proto | 13 +++++++++++++ src/t2iapi/combined/service.proto | 10 ++++++++++ 3 files changed, 24 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0980e8c..9fedea0 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 SetOperationModeStatusAndSetOperatingMode 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..05bf24a 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 status of an operation mode of 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 SetOperationModeStatusAndSetOperatingModeRequest { + string metric_descriptor_handle = 1; // handle of the enum metric, which represents the operation mode + t2iapi.metric.OperationModeStatus operation_mode_status = 2; // defines the operation mode status 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..118ed52 100644 --- a/src/t2iapi/combined/service.proto +++ b/src/t2iapi/combined/service.proto @@ -51,4 +51,14 @@ service CombinedService { rpc SetAlertActivationAndSetOperatingMode ( t2iapi.combined.SetAlertActivationAndSetOperatingModeRequest) returns (BasicResponse); + + /* + Request to set the status of an operation mode of 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 SetOperationModeStatusAndSetOperatingMode ( + t2iapi.combined.SetOperationModeStatusAndSetOperatingModeRequest) + returns (BasicResponse); } From 14d2a46873a9681fea05dd6bcc7e56ce600ba99b Mon Sep 17 00:00:00 2001 From: jannaste Date: Mon, 9 Oct 2023 07:20:15 +0200 Subject: [PATCH 2/3] rework manipulation and mode of operation --- CHANGELOG.md | 2 +- src/t2iapi/combined/combined_requests.proto | 10 +++++----- src/t2iapi/combined/service.proto | 9 +++++---- src/t2iapi/metric/types.proto | 10 ++++++++++ 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fedea0..922169f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- manipulation SetOperationModeStatusAndSetOperatingMode for combined settings +- 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 05bf24a..67929a2 100644 --- a/src/t2iapi/combined/combined_requests.proto +++ b/src/t2iapi/combined/combined_requests.proto @@ -60,12 +60,12 @@ message SetAlertActivationAndSetOperatingModeRequest { } /* -Request to set the status of an operation mode of 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. +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 SetOperationModeStatusAndSetOperatingModeRequest { - string metric_descriptor_handle = 1; // handle of the enum metric, which represents the operation mode - t2iapi.metric.OperationModeStatus operation_mode_status = 2; // defines the operation mode status to be applied +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 118ed52..cb7c7d7 100644 --- a/src/t2iapi/combined/service.proto +++ b/src/t2iapi/combined/service.proto @@ -53,12 +53,13 @@ service CombinedService { returns (BasicResponse); /* - Request to set the status of an operation mode of 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. + 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 SetOperationModeStatusAndSetOperatingMode ( - t2iapi.combined.SetOperationModeStatusAndSetOperatingModeRequest) + rpc SetModeOfOperationAndSetOperatingMode ( + t2iapi.combined.SetModeOfOperationAndSetOperatingModeRequest) returns (BasicResponse); } diff --git a/src/t2iapi/metric/types.proto b/src/t2iapi/metric/types.proto index ec38133..688eeb5 100644 --- a/src/t2iapi/metric/types.proto +++ b/src/t2iapi/metric/types.proto @@ -45,6 +45,16 @@ 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 given pm:Type. + */ +enum ModeOfOperation { + MDC_MODE_OF_OPERATION_ON = 0; // mode of operation is applied + MDC_MODE_OF_OPERATION_OFF = 1; // mode of operation is not applied, but available + MDC_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 From 3ce67581cd5089b8f70b8b5a5f652b5f4c57e1f2 Mon Sep 17 00:00:00 2001 From: jannaste Date: Mon, 9 Oct 2023 07:26:25 +0200 Subject: [PATCH 3/3] fix lint messages --- src/t2iapi/metric/types.proto | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/t2iapi/metric/types.proto b/src/t2iapi/metric/types.proto index 688eeb5..cb3f3d9 100644 --- a/src/t2iapi/metric/types.proto +++ b/src/t2iapi/metric/types.proto @@ -47,12 +47,15 @@ enum OperationModeStatus { /* 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 given pm:Type. +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 { - MDC_MODE_OF_OPERATION_ON = 0; // mode of operation is applied - MDC_MODE_OF_OPERATION_OFF = 1; // mode of operation is not applied, but available - MDC_MODE_OF_OPERATION_PAUSED = 2; // mode of operation is not applied, but available + 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 } /*