From 985f5b127685d3d8314004e8ff2701edce9415ac Mon Sep 17 00:00:00 2001 From: Ilja Antipov Date: Thu, 12 Sep 2024 11:45:40 +0200 Subject: [PATCH 1/3] add rpc for InsertContainmentTreeEntryForSequenceId --- CHANGELOG.md | 1 + src/t2iapi/device/device_requests.proto | 9 ++++++ src/t2iapi/device/device_responses.proto | 10 +++++++ src/t2iapi/device/service.proto | 37 ++++++++++++++++++++++++ 4 files changed, 57 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2187369..5b41545 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - manipulation SetSystemContextActivationStateAndContextAssociation for combined settings - manipulation SetMdsUiLanguage for devices - manipulation GetMdsUiSupportedLanguages for devices +- manipulation InsertContainmentTreeEntryForSequenceId 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 fbdc2f7..314d445 100644 --- a/src/t2iapi/device/device_requests.proto +++ b/src/t2iapi/device/device_requests.proto @@ -94,3 +94,12 @@ message ProvideInformationAboutNextCalibrationRequest { CalibrationState calibration_state = 2; // ComponentCalibrationState value to set as the next calibration // information } + +/* +Request to make available the CONTAINMENT TREE ENTRY(as defined in IEEE Std 11073-10207-2017) that was previously +represented by the descriptor with the provided handle in the device's MDIB with the provided @SequenceId. + */ +message InsertContainmentTreeEntryForSequenceIdRequest { + string handle = 1; // descriptor handle which represented the CONTAINMENT TREE ENTRY + string sequence_id = 2; // @SequenceId of the devices MDIB where the requested CONTAINMENT TREE ENTRY was seen +} diff --git a/src/t2iapi/device/device_responses.proto b/src/t2iapi/device/device_responses.proto index 22fbb8a..58e8773 100644 --- a/src/t2iapi/device/device_responses.proto +++ b/src/t2iapi/device/device_responses.proto @@ -63,3 +63,13 @@ message GetComponentHwVersionResponse { BasicResponse status = 1; // status of the rpc string hardware_version = 2; // Hardware version of the requested device component } + +/* +Response containing the descriptor handle which is representing the requested +CONTAINMENT TREE ENTRY(as defined in IEEE Std 11073-10207-2017 in the device's current MDIB. + */ +message InsertContainmentTreeEntryForSequenceIdResponse{ + BasicResponse status = 1; // status of the rpc + string handle = 2; // descriptor handle which is representing the requested CONTAINMENT TREE ENTRY in + // the device's current MDIB +} diff --git a/src/t2iapi/device/service.proto b/src/t2iapi/device/service.proto index 17c3344..9f75993 100644 --- a/src/t2iapi/device/service.proto +++ b/src/t2iapi/device/service.proto @@ -182,4 +182,41 @@ service DeviceService { */ rpc IndicateTimeOfNextCalibrationToUser (BasicHandleRequest) returns (BasicResponse); + + /* + Make available the CONTAINMENT TREE ENTRY(as defined in IEEE Std 11073-10207-2017) that was previously + represented by the provided handle in the MDIB with the provided @SequenceId. If the CONTAINMENT TREE ENTRY is + absent in the current MDIB, it shall be inserted and its (new) handle shall be returned. If the + CONTAINMENT TREE ENTRY is already present in the current MDIB, only its handle shall be returned, no further + action is required. + + Hint: Devices which use static handles for descriptors do not have to lookup the previous handles since + they stay the same. + + Example 1: returning the same handle for the Metric + - device presented an MDIB with the Metric handle "metric_1" in @SequenceID "123" + - device changes @SequenceID to "789" and presents a new MDIB + - metric with the handle "metric_1" is still present in the current MDIB + - InsertContainmentTreeEntryForSequenceId with handle="metric_1" and sequence_id="123" is executed + - "metric_1" is returned since the descriptor with this handle it is still available in the current MDIB + - no further action from the device is required + + Example 2: returning a new handle for the MDS: + - device presented an MDIB with MDS handle "mds0" in @SequenceID "123" + - device changes @SequenceID to "789" and presents a new MDIB + - MDS with the handle "mds0" is still present in the current MDIB but it's handle changed to "mds10" + - InsertContainmentTreeEntryForSequenceId with handle="mds0" and sequence_id="123" is executed + - "mds10" is returned since the descriptor handle for that MDS has changed + - no further action from the device is required + + Example 3: inserting the Channel into the current MDIB and returning the (new) handle: + - device presented the Channel with handle "channel123" in @SequenceID "123" + - device changes @SequenceID to "789" and presents a new MDIB + - channel with handle "channel123" is no longer present in the current MDIB + - InsertContainmentTreeEntryForSequenceId with handle="channel123" and sequence_id="123" is executed + - channel is inserted into the device's current MDIB + - the (new) handle of the inserted channel is returned + */ + rpc InsertContainmentTreeEntryForSequenceId (InsertContainmentTreeEntryForSequenceIdRequest) + returns (InsertContainmentTreeEntryForSequenceIdResponse); } From 0803318bc2656f822d3124f0d558c145b4347169 Mon Sep 17 00:00:00 2001 From: Ilja Antipov Date: Tue, 17 Sep 2024 15:26:26 +0200 Subject: [PATCH 2/3] fix remarks --- src/t2iapi/device/device_requests.proto | 9 ++++--- src/t2iapi/device/device_responses.proto | 6 ++--- src/t2iapi/device/service.proto | 31 +++++++++++++----------- 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/src/t2iapi/device/device_requests.proto b/src/t2iapi/device/device_requests.proto index 314d445..2cebbc0 100644 --- a/src/t2iapi/device/device_requests.proto +++ b/src/t2iapi/device/device_requests.proto @@ -96,10 +96,11 @@ message ProvideInformationAboutNextCalibrationRequest { } /* -Request to make available the CONTAINMENT TREE ENTRY(as defined in IEEE Std 11073-10207-2017) that was previously -represented by the descriptor with the provided handle in the device's MDIB with the provided @SequenceId. +Request to make available the BICEPS CONTAINMENT TREE ENTRY (as defined in IEEE Std 11073-10700-2022) that was +previously represented by the descriptor with the provided handle in the device's MDIB in the provided @SequenceId. */ message InsertContainmentTreeEntryForSequenceIdRequest { - string handle = 1; // descriptor handle which represented the CONTAINMENT TREE ENTRY - string sequence_id = 2; // @SequenceId of the devices MDIB where the requested CONTAINMENT TREE ENTRY was seen + string handle = 1; // descriptor handle which represented the BICEPS CONTAINMENT TREE ENTRY + string sequence_id = 2; // @SequenceId of the devices MDIB where the requested BICEPS CONTAINMENT TREE ENTRY + // was seen } diff --git a/src/t2iapi/device/device_responses.proto b/src/t2iapi/device/device_responses.proto index 58e8773..ec8e922 100644 --- a/src/t2iapi/device/device_responses.proto +++ b/src/t2iapi/device/device_responses.proto @@ -66,10 +66,10 @@ message GetComponentHwVersionResponse { /* Response containing the descriptor handle which is representing the requested -CONTAINMENT TREE ENTRY(as defined in IEEE Std 11073-10207-2017 in the device's current MDIB. +BICEPS CONTAINMENT TREE ENTRY (as defined in IEEE Std 11073-10700-2022 in the device's current MDIB. */ message InsertContainmentTreeEntryForSequenceIdResponse{ BasicResponse status = 1; // status of the rpc - string handle = 2; // descriptor handle which is representing the requested CONTAINMENT TREE ENTRY in - // the device's current MDIB + string handle = 2; // descriptor handle which is representing the requested BICEPS CONTAINMENT TREE ENTRY + // in the device's current MDIB } diff --git a/src/t2iapi/device/service.proto b/src/t2iapi/device/service.proto index 9f75993..5a5dbe7 100644 --- a/src/t2iapi/device/service.proto +++ b/src/t2iapi/device/service.proto @@ -184,38 +184,41 @@ service DeviceService { returns (BasicResponse); /* - Make available the CONTAINMENT TREE ENTRY(as defined in IEEE Std 11073-10207-2017) that was previously - represented by the provided handle in the MDIB with the provided @SequenceId. If the CONTAINMENT TREE ENTRY is - absent in the current MDIB, it shall be inserted and its (new) handle shall be returned. If the - CONTAINMENT TREE ENTRY is already present in the current MDIB, only its handle shall be returned, no further - action is required. + Make available the BICEPS CONTAINMENT TREE ENTRY (as defined in IEEE Std 11073-10700-2022) that was previously + represented by the provided handle in the MDIB with the provided @SequenceId. If the BICEPS CONTAINMENT TREE ENTRY + is absent in the current MDIB, it shall be inserted and its handle in the current MDIB shall be returned. + If the BICEPS CONTAINMENT TREE ENTRY is already present in the current MDIB, only its handle shall be returned, + no further action is required. - Hint: Devices which use static handles for descriptors do not have to lookup the previous handles since - they stay the same. + Hint: Devices which use static handles for descriptors do not have to look up the entity that was previously + represented by the requested handle, since they stay the same between the changes of the @SequenceId. It is + sufficient to ensure the descriptor is present and return the handle. Example 1: returning the same handle for the Metric - device presented an MDIB with the Metric handle "metric_1" in @SequenceID "123" - device changes @SequenceID to "789" and presents a new MDIB - - metric with the handle "metric_1" is still present in the current MDIB + - metric with the handle "metric_1" is still present in the current MDIB and represents the *same* metric + as in @SequenceID "123" - InsertContainmentTreeEntryForSequenceId with handle="metric_1" and sequence_id="123" is executed - - "metric_1" is returned since the descriptor with this handle it is still available in the current MDIB + - the handle "metric_1" is returned as the descriptor with this handle it is still available in the current MDIB - no further action from the device is required Example 2: returning a new handle for the MDS: - device presented an MDIB with MDS handle "mds0" in @SequenceID "123" - device changes @SequenceID to "789" and presents a new MDIB - - MDS with the handle "mds0" is still present in the current MDIB but it's handle changed to "mds10" + - MDS which had the Handle "mds0" in @SequenceId "123" is still present in the current MDIB, but it's Handle + changed to "mds10" - InsertContainmentTreeEntryForSequenceId with handle="mds0" and sequence_id="123" is executed - - "mds10" is returned since the descriptor handle for that MDS has changed + - the handle "mds10" is returned as the descriptor handle for that MDS has changed - no further action from the device is required Example 3: inserting the Channel into the current MDIB and returning the (new) handle: - device presented the Channel with handle "channel123" in @SequenceID "123" - device changes @SequenceID to "789" and presents a new MDIB - - channel with handle "channel123" is no longer present in the current MDIB + - Channel which had the Handle "channel123" in @SequenceId "123" is no longer present in the current MDIB - InsertContainmentTreeEntryForSequenceId with handle="channel123" and sequence_id="123" is executed - - channel is inserted into the device's current MDIB - - the (new) handle of the inserted channel is returned + - Channel is inserted into the device's current MDIB with the handle "channel789" + - the handle "channel789" is returned */ rpc InsertContainmentTreeEntryForSequenceId (InsertContainmentTreeEntryForSequenceIdRequest) returns (InsertContainmentTreeEntryForSequenceIdResponse); From a1979e5cc567a60a4fa4d4d6af15ab65573ba8d9 Mon Sep 17 00:00:00 2001 From: Ilja Antipov Date: Wed, 18 Sep 2024 09:15:05 +0200 Subject: [PATCH 3/3] add bracket --- 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 ec8e922..68fb686 100644 --- a/src/t2iapi/device/device_responses.proto +++ b/src/t2iapi/device/device_responses.proto @@ -66,7 +66,7 @@ message GetComponentHwVersionResponse { /* Response containing the descriptor handle which is representing the requested -BICEPS CONTAINMENT TREE ENTRY (as defined in IEEE Std 11073-10700-2022 in the device's current MDIB. +BICEPS CONTAINMENT TREE ENTRY (as defined in IEEE Std 11073-10700-2022) in the device's current MDIB. */ message InsertContainmentTreeEntryForSequenceIdResponse{ BasicResponse status = 1; // status of the rpc