Skip to content

Commit

Permalink
Merge branch 'main' into generalize-triggerDescriptorUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-Draeger committed Sep 6, 2023
2 parents 8e7a21e + 245ec72 commit 103f24a
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 86 deletions.
20 changes: 15 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- manipulation TransitionFromCreateStateWithIdentificationToRemoveIdentification for contexts
- manipulation TransitionFromCreateStateWithIdentificationToChangeIdentification for contexts
- manipulation TransitionProvideValueToExpressNoValueAvailable for metrics
- manipulation ProvideMetricValueOrSamples for metrics
- manipulation SetSomeAlertSignalPresence for alerts
- manipulation CreateContextStateWithAssociationAndSetOperatingMode for contexts and operations
Expand All @@ -22,22 +25,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- semantics for CreateContextStateWithAssociationAndValidators manipulation
- semantics for SetMetricStatus manipulation
- semantics for the CalibrateMetric manipulation
- message SetAlarmSignalInactivationStateRequest
- semantics for the EnsembleContextIndicateMembershipWithIdentification manipulation
- semantics for the SetMetricValuesInRange manipulation
- semantics for the SetAlertConditionPresence manipulation
- semantics for SetOperatingMode manipulation
- manipulation SetInvalidValue to SetIncorrectValue, changed semantics
- semantics for SetAlertActivation, SetComponentActivation, SetAlarmSignalInactivationState,
SetAlertSystemNotFunctional, SetLocationDetail, RemoveAllContextStateValidators, SetContextStateAssociation,
CreateContextStateWithAssociation, CreateContextStateWithAssociationAndUniqueIdentification,
CreateContextStateWithAssocIdentificationAndValidator, RemoveIdentificationOfContextState,
ChangeIdentificationOfContextState, CreateContextStateWithAssocAndSpecificValidator,
SetClockDevice, SetLanguage, SetNoValue, SetMetricValuesWithQualityMode
- semantics for CreateContextStateWithAssociationAndValidators manipulation
CreateContextStateWithAssociation, CreateContextStateWithAssocIdentificationAndValidator,
CreateContextStateWithAssocAndSpecificValidator, SetClockDevice, SetLanguage, SetNoValue,
SetMetricValuesWithQualityMode
- semantics for SetDeviceOperatingMode manipulation
- message PartialIdentification to message PartialInstanceIdentifier
- generalized triggerDescriptorUpdate manipulation to multiple ReportParts

### Removed

- manipulation CreateContextStateWithAssociationAndUniqueIdentification, RemoveIdentificationOfContextState,
ChangeIdentificationOfContextState
- manipulation SetNoValue
- manipulation SetAlertSignalPresence
- manipulation ChangeMdibSequenceId
- manipulation SetUserConfirmableValue
Expand Down
2 changes: 1 addition & 1 deletion src/t2iapi/alert/alert_requests.proto
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ to do so, because it is not directly modelled in the MDIB.
*/
message SetAlarmSignalInactivationStateRequest{
string handle = 1; // handle reference of the alert condition
AlarmSignalInactivationState enable = 2;
bool enable = 2; // if enable is True, the AlertConditionState/@Presence is requested to be True, otherwise False
}

/*
Expand Down
17 changes: 0 additions & 17 deletions src/t2iapi/alert/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,3 @@ enum AlertConditionEscalationProcess {
ALERT_CONDITION_ESCALATION_PROCESS_START_DEESCALATION = 2;
ALERT_CONDITION_ESCALATION_PROCESS_STOP_DEESCALATION = 3;
}

/*
Defines the state of AlarmSignalInactivation, Enabled or Disabled.
*/
enum AlarmSignalInactivationState {
ALARM_SIGNAL_INACTIVATION_STATE_ENABLED = 0;
ALARM_SIGNAL_INACTIVATION_STATE_DISABLED = 1;
}

/*
The Presence is set to "true" if the AlertCondition has been detected and is still present. Otherwise it
is set to "false".
*/
enum AlertConditionPresence {
ALERT_CONDITION_PRESENCE_TRUE = 0;
ALERT_CONDITION_PRESENCE_FALSE = 1;
}
18 changes: 3 additions & 15 deletions src/t2iapi/context/context_responses.proto
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,6 @@ message CreateContextStateWithAssociationResponse {
string context_state_handle = 2; // handle of the context state, that was created or adapted
}

/*
Response containing the handle of the newly created context state and its unique identification.
In case of a PatientContextState having multiple pm:InstanceIdentifier, the @Extension and @Root shall be returned
for the pm:InstanceIdentifier with pm:Type/@Code = MDC_ATTR_PT_ID.
*/
message CreateContextStateWithAssociationAndUniqueIdentificationResponse {
BasicResponse status = 1;
string context_state_handle = 2; // handle of the context state, that was created
string extension = 3; // value of the identifier (from pm:InstanceIdentifier/@Extension)
string root = 4; // value of the identifier (from pm:InstanceIdentifier/@Root)
}

/*
Response which contains all context types supported by the DUT.
*/
Expand All @@ -45,10 +33,10 @@ message GetSupportedContextTypesResponse {
}

/*
Response which contains Identification including a list of InstanceIdentifier elements
which identify an ensemble and thus enables the caller to distinguish ensembles from each other.
Response which contains a list of lists with pm:Identification elements. Each list of pm:Identification elements
identifies a pm:EnsembleContextState and thus enables the differentiation of ensembles from each other.
*/
message EnsembleContextIndicateMembershipWithIdentificationResponse {
BasicResponse status = 1;
repeated PartialInstanceIdentifier identification = 2;
repeated IdentificationList identification_list = 3;
}
46 changes: 19 additions & 27 deletions src/t2iapi/context/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -62,23 +62,11 @@ service ContextService {
Create a new pm:AbstractContextState instance with the given @ContextAssociation value for the given descriptor handle
and provide at least the number of pm:Validator elements for this ContextState.
If the number of pm:Validator elements is zero, zero pm:Validator elements shall be provided.
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 CreateContextStateWithAssociationAndValidators(
t2iapi.context.CreateContextStateWithAssociationAndValidatorsRequest)
returns (t2iapi.context.CreateContextStateWithAssociationResponse);

/*
Create a new ContextState instance with the given ContextAssociation value for the given descriptor handle
and provide the unique identification.
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 CreateContextStateWithAssociationAndUniqueIdentification(
t2iapi.context.CreateContextStateWithAssociationRequest)
returns (t2iapi.context.CreateContextStateWithAssociationAndUniqueIdentificationResponse);

/*
Create a new ContextState instance with the given ContextAssociation value for the given descriptor handle
and provide at least one Identification and Validator for this ContextState.
Expand All @@ -90,22 +78,22 @@ service ContextService {
returns (BasicResponse);

/*
Remove at least one pm:Identification element for the pm:AbstractContextState/@Handle.
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.
For the Context with the provided descriptor handle perform the following transition:
- associate a pm:AbstractContextState instance with at least one unique pm:Identification element
for the Context with the given descriptor handle
- remove at least one pm:Identification element for the previously associated pm:AbstractContextState.
*/
rpc RemoveIdentificationOfContextState(
t2iapi.context.ContextStateHandleRequest)
returns (BasicResponse);
rpc TransitionFromCreateStateWithIdentificationToRemoveIdentification (BasicHandleRequest)
returns (CreateContextStateWithAssociationResponse);

/*
Change at least one pm:Identification element for the pm:AbstractContextState/@Handle.
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.
For the Context with the provided descriptor handle perform the following transition:
- associate a pm:AbstractContextState instance with at least one unique pm:Identification element
for the Context with the given descriptor handle
- change at least one already present pm:Identification element for the previously associated pm:AbstractContextState.
*/
rpc ChangeIdentificationOfContextState(
t2iapi.context.ContextStateHandleRequest)
returns (BasicResponse);
rpc TransitionFromCreateStateWithIdentificationToChangeIdentification (BasicHandleRequest)
returns (CreateContextStateWithAssociationResponse);

/*
Create a new ContextState instance with the given ContextAssociation value for the given descriptor handle,
Expand Down Expand Up @@ -139,9 +127,13 @@ service ContextService {
returns (BasicResponse);

/*
Indicate membership in an SDC PARTICIPANT ENSEMBLE using an ensemble context that has the provided descriptor handle
and return a list of pm:Identification elements which identify an ensemble and thus enable the caller to distinguish
ensembles from each other.
Indicate membership in an SDC PARTICIPANT ENSEMBLE using ensemble context state(s) that have the provided descriptor
handle and return a list of pm:Identification elements which identify the ensemble context state(s).
If already one or more pm:EnsembleContextState(s) indicate the membership, it is not needed to create a new
pm:EnsembleContextState(s). In this case it is sufficient to only return the BasicResponse and the pm:Identification
elements.
The 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 EnsembleContextIndicateMembershipWithIdentification (BasicHandleRequest)
returns (EnsembleContextIndicateMembershipWithIdentificationResponse);
Expand Down
11 changes: 5 additions & 6 deletions src/t2iapi/metric/metric_requests.proto
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,13 @@ message SetMetricValuesWithQualityModeRequest {
}

/*
Request to set metric values within a given range.
Request to set new pm:MetricValue/@Value resp. @Samples within the given range for the metric with the
given handle.
*/
message SetMetricValuesInRangeRequest {
string handle = 1; // handle of the metric state for which values shall be set
// Lower and upper limit values which should not be violated by metric values.
// If both limit values are not defined (empty string) a valid metric value shall be set.
string lower = 2;
string upper = 3;
string handle = 1; // handle of the metric for which new pm:MetricValue/@Value or @Samples shall be set
string lower = 2; // lower limit for setting the new pm:MetricValue/@Value or @Samples
string upper = 3; // upper limit for setting the new pm:MetricValue/@Value or @Samples
}

/*
Expand Down
11 changes: 7 additions & 4 deletions src/t2iapi/metric/metric_responses.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ option java_package = "com.draeger.medical.t2iapi.metric";
option java_outer_classname = "MetricResponses";

/*
This message is used as a response for the CalibrateMetric manipulation. It returns a list of NumericMetricValue/@Value
or SampleArrayValue/@Samples as strings measured during the calibration. An empty list is returned if no values
can be provided.
This message is used as a response for the CalibrateMetric manipulation.
It returns a list of pm:MetricValue/@Value or pm:MetricValue/@Samples as strings measured during the calibration.
For further comparison of the value(s) it is required that each returned string value has the same representation
of the whole and fractional part that would be transmitted via SDC, i.e. if the value is represented as '0.01'
via SDC, do not provide it as '00.010'.
An empty list is returned if no values can be provided.
*/
message CalibrateMetricResponse {
BasicResponse response = 1;
repeated string values = 2;
repeated string values = 2; // pm:MetricValue/@Value or pm:MetricValue/@Samples
}

// Response indicating whether a metric is computer-controlled
Expand Down
26 changes: 16 additions & 10 deletions src/t2iapi/metric/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ service MetricService {
rpc SetMetricQualityValidity (t2iapi.metric.SetMetricQualityValidityRequest)
returns (BasicResponse);

/*
Set no metric values for the provided metric handle.
The manipulated state can be set temporarily or persistent until a next manipulation call.
*/
rpc SetNoValue (BasicHandleRequest)
returns (BasicResponse);

/*
For the metric with the provided handle do the following:
- set the @ActivationState to the provided value
Expand All @@ -54,7 +47,7 @@ service MetricService {
returns (BasicResponse);

/*
Calibrate the metric for the provided handle and return the calibration values.
Start a new calibration for the metric with the provided handle and return the calibration values.
*/
rpc CalibrateMetric (BasicHandleRequest)
returns (t2iapi.metric.CalibrateMetricResponse);
Expand All @@ -68,8 +61,11 @@ service MetricService {
returns (BasicResponse);

/*
Set metric values within a given range. If no limit value is defined, random but valid metric values shall be set.
If a limit is defined, it shall not be violated by metric values.
Set new metric value(s) (resulting in new pm:MetricValue/@Value resp. pm:MetricValue/@Samples) within a given range.
The range is defined by lower and upper limit values which shall not be violated.
If no limit values are requested (empty strings), a random but valid metric @Value or @Samples shall be set.
If a limit is requested, it shall not be violated by the new metric @Value or @Samples.
Even if a metric @Value or @Samples is already present, a new metric @Value or @Samples shall be provided.
*/
rpc SetMetricValuesInRange (t2iapi.metric.SetMetricValuesInRangeRequest)
returns (BasicResponse);
Expand All @@ -88,6 +84,8 @@ service MetricService {
/*
Set the provided measurement, calculation or setting status for the metric of the provided handle. This is not the
AbstractMetricState/@ActivationState, but the internal state of the device.
The resulting AbstractMetricState/@ActivationState shall be persistent until the next manipulation call.
If the device is not able to maintain the static state, it shall return RESULT_NOT_SUPPORTED.
*/
rpc SetMetricStatus (t2iapi.metric.SetMetricStatusRequest) returns (BasicResponse);

Expand All @@ -109,4 +107,12 @@ service MetricService {
*/
rpc ProvideMetricValueOrSamples (BasicHandleRequest)
returns (BasicResponse);

/*
For the metric with the provided handle perform the following transition:
- provide pm:MetricValue/@Value resp. @Samples and then
- express for the metric that no value is available.
*/
rpc TransitionProvideValueToExpressNoValueAvailable (BasicHandleRequest)
returns (BasicResponse);
}
8 changes: 7 additions & 1 deletion src/t2iapi/response_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,15 @@ enum Result {
RESULT_NOT_IMPLEMENTED = 3;
}

/*
Represents pm:Identification (defined in IEEE Std 11073-10207-2017).
*/
message IdentificationList {
repeated PartialInstanceIdentifier identification = 1; // list of identifiers for contexts
}

/*
Represents InstanceIdentifier (defined in IEEE Std 11073-10207-2017).
Represents pm:InstanceIdentifier (defined in IEEE Std 11073-10207-2017).
Following combinations of InstanceIdentifier/@Root and InstanceIdentifier/@Extension are allowed:
+------------------------------------------------------------------------+
Expand Down

0 comments on commit 103f24a

Please sign in to comment.