Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/pstaeck/t2iapi into add_new…
Browse files Browse the repository at this point in the history
…_manipulation_get_available_meta_data

Conflicts:
	CHANGELOG.md
  • Loading branch information
pstaeck committed Jul 1, 2024
2 parents 31f22ad + 02babf7 commit c217961
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- manipulation GetAvailableDeviceMetaData for device
- manipulation AssociateValidateAndChangeIdentificationOfPatientOrLocationContextState for contexts
- manipulation ProvideInformationAboutLastCalibration for devices
- manipulation ProvideInformationAboutNextCalibration for devices
- manipulation SetSystemContextActivationStateAndContextAssociation for combined settings

Expand Down
10 changes: 10 additions & 0 deletions src/t2iapi/context/context_requests.proto
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@ message CreateContextStateWithAssociationAndValidatorsRequest {
string num_validators = 3; // number of pm:Validator elements
}

/*
Request to create or adapt a pm:PatientContextState or pm:LocationContextState instance with
@ContextAssociation = Assoc for the given @DescriptorHandle, with a given number
of pm:Validator elements and a changed pm:Identification.
*/
message AssociateValidateAndChangeIdentificationOfPatientOrLocationContextStateRequest {
string descriptor_handle = 1;
string num_validators = 2; // number of pm:Validator elements
}

/*
Request to create or adapt a context state with a given association and specific validator.
*/
Expand Down
11 changes: 11 additions & 0 deletions src/t2iapi/context/context_responses.proto
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ message CreateContextStateWithAssociationResponse {
string context_state_handle = 2; // handle of the context state, that was created or adapted
}

/*
Response containing the context state handle and the prior mdib version.
*/
message AssociateValidateAndChangeIdentificationOfPatientOrLocationContextStateResponse {
BasicResponse status = 1;
string context_state_handle = 2; // handle of the context state, that was created or adapted
uint64 prior_mdib_version = 3; // mdib version before the change - contains the previously associated
// context state whose pm:Identification the changed
// pm:Identification must structurally differ from.
}

/*
Response which contains all context types supported by the DUT.
*/
Expand Down
20 changes: 20 additions & 0 deletions src/t2iapi/context/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,26 @@ service ContextService {
t2iapi.context.CreateContextStateWithAssocAndSpecificValidatorRequest)
returns (t2iapi.context.CreateContextStateWithAssociationResponse);

/*
Create or adapt a patient- or location context state, such that
- it belongs to the given @DescriptorHandle,
- it has @ContextAssociation = Assoc,
- it has the given number of pm:Validators, and
- its pm:Identification changes.
The pm:Identification of the created resp. adapted context state must differ structurally from
the pm:Identification of the previously associated context state of the same @DescriptorHandle.
Returns the handle of the created or adapted context state and an mdib version
that contains the version of the previously associated context state whose pm:Identification
the changed pm:Identification must structurally differ from.
The mdib version must represent the mdib of the device before the changes of the
manipulation are applied to the mdib.
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 AssociateValidateAndChangeIdentificationOfPatientOrLocationContextState(
t2iapi.context.AssociateValidateAndChangeIdentificationOfPatientOrLocationContextStateRequest)
returns (AssociateValidateAndChangeIdentificationOfPatientOrLocationContextStateResponse);

/*
Create or adapt neonatal patient with a given type of association and
including the mothers identification.
Expand Down
12 changes: 11 additions & 1 deletion src/t2iapi/device/device_requests.proto
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,19 @@ message TriggerDescriptorUpdateRequest{
repeated string handle = 1;
}

/*
Request to provide information about the pm:CalibrationInfo/@ComponentCalibrationState for the given descriptor handle.
*/
message ProvideInformationAboutLastCalibrationRequest {
string handle = 1; // handle of the pm:AbstractDeviceComponentDescriptor for which
// the last calibration information shall be provided
CalibrationState calibration_state = 2; // @ComponentCalibrationState value to set as the last calibration
// information
}

/*
Request to provide information about the pm:NextCalibration/@ComponentCalibrationState for the given descriptor handle.
*/
*/
message ProvideInformationAboutNextCalibrationRequest {
string handle = 1; // handle of the pm:AbstractDeviceComponentDescriptor for which
// the next calibration information shall be provided
Expand Down
7 changes: 7 additions & 0 deletions src/t2iapi/device/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,13 @@ service DeviceService {
*/
rpc SetBatteryUsage (t2iapi.device.SetBatteryUsageRequest) returns (BasicResponse);

/*
Provide information about the pm:CalibrationInfo for the given pm:AbstractDeviceComponentDescriptor.
If the device is not able to provide the information, it shall return RESULT_NOT_SUPPORTED.
*/
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.
Expand Down

0 comments on commit c217961

Please sign in to comment.