From 8ae55745331d48829a74bc28680834c07ffcf12a Mon Sep 17 00:00:00 2001 From: Jean-Francois Penven <67962328+jepenven-silabs@users.noreply.github.com> Date: Mon, 29 May 2023 10:11:02 -0400 Subject: [PATCH 01/15] Fix matter shell with wf200 (#26845) --- examples/platform/silabs/efr32/uart.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/examples/platform/silabs/efr32/uart.cpp b/examples/platform/silabs/efr32/uart.cpp index 8fab5f11fe4b00..650f482bc65346 100644 --- a/examples/platform/silabs/efr32/uart.cpp +++ b/examples/platform/silabs/efr32/uart.cpp @@ -134,8 +134,6 @@ static uint8_t sRxFifoBuffer[MAX_BUFFER_SIZE]; static Fifo_t sReceiveFifo; static void UART_rx_callback(UARTDRV_Handle_t handle, Ecode_t transferStatus, uint8_t * data, UARTDRV_Count_t transferCount); -static void UART_tx_callback(struct UARTDRV_HandleData * handle, Ecode_t transferStatus, uint8_t * data, - UARTDRV_Count_t transferCount); static void uartSendBytes(uint8_t * buffer, uint16_t nbOfBytes); static bool InitFifo(Fifo_t * fifo, uint8_t * pDataBuffer, uint16_t bufferSize) @@ -474,14 +472,15 @@ void uartSendBytes(uint8_t * buffer, uint16_t nbOfBytes) #endif #if (defined(EFR32MG24) && defined(WF200_WIFI)) + // Blocking transmit for the MG24 + WF200 since UART TX is multiplexed with + // WF200 SPI IRQ pre_uart_transfer(); -#endif /* EFR32MG24 && WF200_WIFI */ - + UARTDRV_ForceTransmit(vcom_handle, (uint8_t *) buffer, nbOfBytes); + post_uart_transfer(); +#else + // Non Blocking Transmit UARTDRV_Transmit(vcom_handle, (uint8_t *) buffer, nbOfBytes, UART_tx_callback); ulTaskNotifyTake(pdTRUE, portMAX_DELAY); - -#if (defined(EFR32MG24) && defined(WF200_WIFI)) - post_uart_transfer(); #endif /* EFR32MG24 && WF200_WIFI */ #if defined(SL_CATALOG_POWER_MANAGER_PRESENT) From b773d0af763995ced0335c13498cdbe80e964342 Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Mon, 29 May 2023 19:57:42 +0530 Subject: [PATCH 02/15] [ESP32] Use the backward compatible option for linking wifi libs (#26923) --- config/esp32/components/chip/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index 2412e825d6c98d..316ded04afe373 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -392,7 +392,7 @@ idf_component_get_property(lwip_lib lwip COMPONENT_LIB) list(APPEND chip_libraries $) -if (CONFIG_ESP_WIFI_ENABLED) +if (CONFIG_ESP32_WIFI_ENABLED) idf_component_get_property(esp_wifi_lib esp_wifi COMPONENT_LIB) idf_component_get_property(esp_wifi_dir esp_wifi COMPONENT_DIR) list(APPEND chip_libraries $) From 7650e78f30eb123570538db2785dbee01defec13 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 29 May 2023 10:40:21 -0400 Subject: [PATCH 03/15] Add Darwin availability annotations for new Scenes attributes. (#26909) --- src/darwin/Framework/CHIP/templates/availability.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 10663dbac8e7d0..4d365e7405005c 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -7040,6 +7040,8 @@ attributes: Scenes: - EventList + - SceneTableSize + - RemainingCapacity OnOff: - EventList OnOffSwitchConfiguration: From 3fdc99cebd11175608ee8691dc443d4bf5871a2e Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 29 May 2023 10:43:13 -0400 Subject: [PATCH 04/15] Update availability annotations for Identify cluster changes. (#26903) Changes happened in https://github.com/project-chip/connectedhomeip/pull/26738. --- .../CHIP/templates/availability.yaml | 37 ++++++++++++++++--- .../CHIP/zap-generated/MTRBaseClusters.h | 34 ++++++++++------- 2 files changed, 51 insertions(+), 20 deletions(-) diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 4d365e7405005c..b2d4a4d11b3f52 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -3045,9 +3045,15 @@ - fabricIndex enums: Identify: - - IdentifyEffectIdentifier - - IdentifyEffectVariant - - IdentifyIdentifyType + # EffectIdentifierEnum, EffectVariantEnum, and IdentifyTypeEnum + # were originally named IdentifyEffectIdentifier, + # IdentifyEffectVariant, and IdentifyIdentifyType, but we generate + # the same API for the names with/without "Enum" at the end, and + # with/without the cluster name at the beginning, so the name can + # just change here. + - EffectIdentifierEnum + - EffectVariantEnum + - IdentifyTypeEnum OnOff: - OnOffDelayedAllOffEffectVariant - OnOffDyingLightEffectVariant @@ -3237,16 +3243,22 @@ - FaultType enum values: Identify: - IdentifyEffectIdentifier: + # EffectIdentifierEnum, EffectVariantEnum, and IdentifyTypeEnum + # were originally named IdentifyEffectIdentifier, + # IdentifyEffectVariant, and IdentifyIdentifyType, but we generate + # the same API for the names with/without "Enum" at the end, and + # with/without the cluster name at the beginning, so the name can + # just change here. + EffectIdentifierEnum: - Blink - Breathe - Okay - ChannelChange - FinishEffect - StopEffect - IdentifyEffectVariant: + EffectVariantEnum: - Default - IdentifyIdentifyType: + IdentifyTypeEnum: - None - VisibleLight - VisibleLED @@ -7721,6 +7733,10 @@ WiFiNetworkDiagnostics: WiFiVersionEnum: - Ah + Identify: + IdentifyTypeEnum: + - LightOutput + - VisibleIndicator bitmaps: AirQuality: - Feature @@ -7871,6 +7887,11 @@ # We apparently forgot to deprecate BridgedDeviceBasic when we # introduced BridgedDeviceBasicInformation. - BridgedDeviceBasic + enum values: + Identify: + IdentifyTypeEnum: + - VisibleLight + - VisibleLED structs: AccessControl: - Target @@ -7908,6 +7929,10 @@ MixedNTPNTS: MixedNtpNts PTP: Ptp GNSS: Gnss + Identify: + IdentifyTypeEnum: + LightOutput: VisibleLight + VisibleIndicator: VisibleLED bitmaps: Groups: Feature: GroupClusterFeature diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 4df91700c17309..204bbf829732e0 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -30210,26 +30210,32 @@ MTR_DEPRECATED("Please use MTRBaseClusterUnitTesting", ios(16.1, 16.4), macos(13 @end typedef NS_ENUM(uint8_t, MTRIdentifyEffectIdentifier) { - MTRIdentifyEffectIdentifierBlink MTR_NEWLY_AVAILABLE = 0x00, - MTRIdentifyEffectIdentifierBreathe MTR_NEWLY_AVAILABLE = 0x01, - MTRIdentifyEffectIdentifierOkay MTR_NEWLY_AVAILABLE = 0x02, - MTRIdentifyEffectIdentifierChannelChange MTR_NEWLY_AVAILABLE = 0x0B, - MTRIdentifyEffectIdentifierFinishEffect MTR_NEWLY_AVAILABLE = 0xFE, - MTRIdentifyEffectIdentifierStopEffect MTR_NEWLY_AVAILABLE = 0xFF, -} MTR_NEWLY_AVAILABLE; + MTRIdentifyEffectIdentifierBlink API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRIdentifyEffectIdentifierBreathe API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRIdentifyEffectIdentifierOkay API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRIdentifyEffectIdentifierChannelChange API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0B, + MTRIdentifyEffectIdentifierFinishEffect API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0xFE, + MTRIdentifyEffectIdentifierStopEffect API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0xFF, +} API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_ENUM(uint8_t, MTRIdentifyEffectVariant) { - MTRIdentifyEffectVariantDefault MTR_NEWLY_AVAILABLE = 0x00, -} MTR_NEWLY_AVAILABLE; + MTRIdentifyEffectVariantDefault API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, +} API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_ENUM(uint8_t, MTRIdentifyType) { - MTRIdentifyTypeNone MTR_NEWLY_AVAILABLE = 0x00, + MTRIdentifyTypeNone API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, MTRIdentifyTypeLightOutput MTR_NEWLY_AVAILABLE = 0x01, + MTRIdentifyTypeVisibleLight API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRIdentifyTypeLightOutput") + = 0x01, MTRIdentifyTypeVisibleIndicator MTR_NEWLY_AVAILABLE = 0x02, - MTRIdentifyTypeAudibleBeep MTR_NEWLY_AVAILABLE = 0x03, - MTRIdentifyTypeDisplay MTR_NEWLY_AVAILABLE = 0x04, - MTRIdentifyTypeActuator MTR_NEWLY_AVAILABLE = 0x05, -} MTR_NEWLY_AVAILABLE; + MTRIdentifyTypeVisibleLED API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRIdentifyTypeVisibleIndicator") + = 0x02, + MTRIdentifyTypeAudibleBeep API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRIdentifyTypeDisplay API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, + MTRIdentifyTypeActuator API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, +} API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_OPTIONS(uint32_t, MTRGroupsFeature) { MTRGroupsFeatureGroupNames MTR_NEWLY_AVAILABLE = 0x1, From bc7970e4f8fae53bcf03620659ad67da009cf118 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 May 2023 11:08:29 -0400 Subject: [PATCH 05/15] Bump third_party/mbedtls/repo from `247e6f0` to `45350b6` (#26919) Bumps [third_party/mbedtls/repo](https://github.com/ARMmbed/mbedtls) from `247e6f0` to `45350b6`. - [Release notes](https://github.com/ARMmbed/mbedtls/releases) - [Commits](https://github.com/ARMmbed/mbedtls/compare/247e6f088dbe19e5482e038009f45210586036c9...45350b66503b08cafc8aa4f42a2875aca0f0e062) --- updated-dependencies: - dependency-name: third_party/mbedtls/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third_party/mbedtls/repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/mbedtls/repo b/third_party/mbedtls/repo index 247e6f088dbe19..45350b66503b08 160000 --- a/third_party/mbedtls/repo +++ b/third_party/mbedtls/repo @@ -1 +1 @@ -Subproject commit 247e6f088dbe19e5482e038009f45210586036c9 +Subproject commit 45350b66503b08cafc8aa4f42a2875aca0f0e062 From df1f7a82903abc8993f55e9888553d0b0572da50 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 29 May 2023 11:24:25 -0400 Subject: [PATCH 06/15] Fix the various MessageDef EndOf* functions to return CHIP_ERROR. (#26910) Simplifies consumers and makes it clearer you're not supposed to use the object any more after the EndOf... call. Fixes https://github.com/project-chip/connectedhomeip/issues/8309 --- src/app/AttributeAccessInterface.cpp | 6 ++--- src/app/ClusterStateCache.cpp | 5 ++-- src/app/CommandHandler.cpp | 17 ++++++------ src/app/CommandSender.cpp | 6 ++--- src/app/EventManagement.cpp | 16 +++++------- src/app/MessageDef/AttributeDataIB.cpp | 4 +-- src/app/MessageDef/AttributeDataIB.h | 4 +-- src/app/MessageDef/AttributeDataIBs.cpp | 4 +-- src/app/MessageDef/AttributeDataIBs.h | 4 +-- src/app/MessageDef/AttributePathIB.cpp | 10 +++---- src/app/MessageDef/AttributePathIB.h | 4 +-- src/app/MessageDef/AttributePathIBs.cpp | 4 +-- src/app/MessageDef/AttributePathIBs.h | 4 +-- src/app/MessageDef/AttributeReportIB.cpp | 4 +-- src/app/MessageDef/AttributeReportIB.h | 4 +-- src/app/MessageDef/AttributeReportIBs.cpp | 8 +++--- src/app/MessageDef/AttributeReportIBs.h | 4 +-- src/app/MessageDef/AttributeStatusIB.cpp | 4 +-- src/app/MessageDef/AttributeStatusIB.h | 4 +-- src/app/MessageDef/AttributeStatusIBs.cpp | 4 +-- src/app/MessageDef/AttributeStatusIBs.h | 4 +-- src/app/MessageDef/ClusterPathIB.cpp | 4 +-- src/app/MessageDef/ClusterPathIB.h | 4 +-- src/app/MessageDef/CommandDataIB.cpp | 4 +-- src/app/MessageDef/CommandDataIB.h | 4 +-- src/app/MessageDef/CommandPathIB.cpp | 10 +++---- src/app/MessageDef/CommandPathIB.h | 4 +-- src/app/MessageDef/CommandStatusIB.cpp | 4 +-- src/app/MessageDef/CommandStatusIB.h | 4 +-- src/app/MessageDef/DataVersionFilterIB.cpp | 4 +-- src/app/MessageDef/DataVersionFilterIB.h | 4 +-- src/app/MessageDef/DataVersionFilterIBs.cpp | 4 +-- src/app/MessageDef/DataVersionFilterIBs.h | 4 +-- src/app/MessageDef/EventDataIB.cpp | 4 +-- src/app/MessageDef/EventDataIB.h | 4 +-- src/app/MessageDef/EventFilterIB.cpp | 4 +-- src/app/MessageDef/EventFilterIB.h | 4 +-- src/app/MessageDef/EventFilterIBs.cpp | 8 +++--- src/app/MessageDef/EventFilterIBs.h | 4 +-- src/app/MessageDef/EventPathIB.cpp | 7 +++-- src/app/MessageDef/EventPathIB.h | 4 +-- src/app/MessageDef/EventPathIBs.cpp | 4 +-- src/app/MessageDef/EventPathIBs.h | 4 +-- src/app/MessageDef/EventReportIB.cpp | 15 +++++------ src/app/MessageDef/EventReportIB.h | 4 +-- src/app/MessageDef/EventReportIBs.cpp | 4 +-- src/app/MessageDef/EventReportIBs.h | 4 +-- src/app/MessageDef/EventStatusIB.cpp | 4 +-- src/app/MessageDef/EventStatusIB.h | 4 +-- src/app/MessageDef/InvokeRequestMessage.cpp | 4 +-- src/app/MessageDef/InvokeRequestMessage.h | 4 +-- src/app/MessageDef/InvokeRequests.cpp | 4 +-- src/app/MessageDef/InvokeRequests.h | 4 +-- src/app/MessageDef/InvokeResponseIB.cpp | 4 +-- src/app/MessageDef/InvokeResponseIB.h | 4 +-- src/app/MessageDef/InvokeResponseIBs.cpp | 4 +-- src/app/MessageDef/InvokeResponseIBs.h | 4 +-- src/app/MessageDef/InvokeResponseMessage.cpp | 4 +-- src/app/MessageDef/InvokeResponseMessage.h | 4 +-- src/app/MessageDef/ReadRequestMessage.cpp | 4 +-- src/app/MessageDef/ReadRequestMessage.h | 4 +-- src/app/MessageDef/ReportDataMessage.cpp | 4 +-- src/app/MessageDef/ReportDataMessage.h | 4 +-- .../MessageDef/SubscribeRequestMessage.cpp | 4 +-- src/app/MessageDef/SubscribeRequestMessage.h | 2 +- .../MessageDef/SubscribeResponseMessage.cpp | 4 +-- src/app/MessageDef/SubscribeResponseMessage.h | 2 +- src/app/MessageDef/WriteRequestMessage.cpp | 4 +-- src/app/MessageDef/WriteRequestMessage.h | 4 +-- src/app/MessageDef/WriteResponseMessage.cpp | 4 +-- src/app/MessageDef/WriteResponseMessage.h | 4 +-- src/app/ReadClient.cpp | 18 ++++++------- src/app/ReadHandler.cpp | 3 +-- src/app/WriteClient.cpp | 11 +++----- src/app/WriteHandler.cpp | 9 +++---- src/app/reporting/Engine.cpp | 6 ++--- src/app/tests/TestCommandInteraction.cpp | 7 +++-- src/app/tests/TestMessageDef.cpp | 15 +++++------ src/app/tests/TestReadInteraction.cpp | 7 +++-- src/app/tests/TestWriteInteraction.cpp | 26 +++++++++---------- .../tests/integration/chip_im_initiator.cpp | 2 +- .../util/ember-compatibility-functions.cpp | 14 +++++----- src/app/util/mock/attribute-storage.cpp | 10 +++---- src/controller/tests/data_model/TestRead.cpp | 6 ++--- 84 files changed, 224 insertions(+), 254 deletions(-) diff --git a/src/app/AttributeAccessInterface.cpp b/src/app/AttributeAccessInterface.cpp index 0c5a85c2fe92f8..f4fbec03b34ac4 100644 --- a/src/app/AttributeAccessInterface.cpp +++ b/src/app/AttributeAccessInterface.cpp @@ -44,15 +44,15 @@ CHIP_ERROR AttributeReportBuilder::PrepareAttribute(AttributeReportIBs::Builder attributePathIBBuilder.ListIndex(DataModel::Nullable()); } - ReturnErrorOnFailure(attributePathIBBuilder.EndOfAttributePathIB().GetError()); + ReturnErrorOnFailure(attributePathIBBuilder.EndOfAttributePathIB()); return attributeDataIBBuilder.GetError(); } CHIP_ERROR AttributeReportBuilder::FinishAttribute(AttributeReportIBs::Builder & aAttributeReportIBsBuilder) { - ReturnErrorOnFailure(aAttributeReportIBsBuilder.GetAttributeReport().GetAttributeData().EndOfAttributeDataIB().GetError()); - return aAttributeReportIBsBuilder.GetAttributeReport().EndOfAttributeReportIB().GetError(); + ReturnErrorOnFailure(aAttributeReportIBsBuilder.GetAttributeReport().GetAttributeData().EndOfAttributeDataIB()); + return aAttributeReportIBsBuilder.GetAttributeReport().EndOfAttributeReportIB(); } namespace { diff --git a/src/app/ClusterStateCache.cpp b/src/app/ClusterStateCache.cpp index 2644c1a89bbbe8..7a6eed3de8576c 100644 --- a/src/app/ClusterStateCache.cpp +++ b/src/app/ClusterStateCache.cpp @@ -569,9 +569,8 @@ CHIP_ERROR ClusterStateCache::OnUpdateDataVersionFilterList(DataVersionFilterIBs SuccessOrExit(err = aDataVersionFilterIBsBuilder.GetError()); ClusterPathIB::Builder & filterPath = filterIB.CreatePath(); SuccessOrExit(err = filterIB.GetError()); - SuccessOrExit( - err = filterPath.Endpoint(filter.first.mEndpointId).Cluster(filter.first.mClusterId).EndOfClusterPathIB().GetError()); - SuccessOrExit(err = filterIB.DataVersion(filter.first.mDataVersion.Value()).EndOfDataVersionFilterIB().GetError()); + SuccessOrExit(err = filterPath.Endpoint(filter.first.mEndpointId).Cluster(filter.first.mClusterId).EndOfClusterPathIB()); + SuccessOrExit(err = filterIB.DataVersion(filter.first.mDataVersion.Value()).EndOfDataVersionFilterIB()); ChipLogProgress(DataManagement, "Update DataVersionFilter: Endpoint=%u Cluster=" ChipLogFormatMEI " Version=%" PRIu32, filter.first.mEndpointId, ChipLogValueMEI(filter.first.mClusterId), filter.first.mDataVersion.Value()); diff --git a/src/app/CommandHandler.cpp b/src/app/CommandHandler.cpp index 3fd99e9bb9ad31..a0a46f1a02e74a 100644 --- a/src/app/CommandHandler.cpp +++ b/src/app/CommandHandler.cpp @@ -516,10 +516,10 @@ CHIP_ERROR CommandHandler::FinishCommand(bool aStartDataStruct) { ReturnErrorOnFailure(commandData.GetWriter()->EndContainer(mDataElementContainerType)); } - ReturnErrorOnFailure(commandData.EndOfCommandDataIB().GetError()); - ReturnErrorOnFailure(mInvokeResponseBuilder.GetInvokeResponses().GetInvokeResponse().EndOfInvokeResponseIB().GetError()); - ReturnErrorOnFailure(mInvokeResponseBuilder.GetInvokeResponses().EndOfInvokeResponses().GetError()); - ReturnErrorOnFailure(mInvokeResponseBuilder.EndOfInvokeResponseMessage().GetError()); + ReturnErrorOnFailure(commandData.EndOfCommandDataIB()); + ReturnErrorOnFailure(mInvokeResponseBuilder.GetInvokeResponses().GetInvokeResponse().EndOfInvokeResponseIB()); + ReturnErrorOnFailure(mInvokeResponseBuilder.GetInvokeResponses().EndOfInvokeResponses()); + ReturnErrorOnFailure(mInvokeResponseBuilder.EndOfInvokeResponseMessage()); MoveToState(State::AddedCommand); return CHIP_NO_ERROR; } @@ -547,11 +547,10 @@ CHIP_ERROR CommandHandler::PrepareStatus(const ConcreteCommandPath & aCommandPat CHIP_ERROR CommandHandler::FinishStatus() { VerifyOrReturnError(mState == State::AddingCommand, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorOnFailure( - mInvokeResponseBuilder.GetInvokeResponses().GetInvokeResponse().GetStatus().EndOfCommandStatusIB().GetError()); - ReturnErrorOnFailure(mInvokeResponseBuilder.GetInvokeResponses().GetInvokeResponse().EndOfInvokeResponseIB().GetError()); - ReturnErrorOnFailure(mInvokeResponseBuilder.GetInvokeResponses().EndOfInvokeResponses().GetError()); - ReturnErrorOnFailure(mInvokeResponseBuilder.EndOfInvokeResponseMessage().GetError()); + ReturnErrorOnFailure(mInvokeResponseBuilder.GetInvokeResponses().GetInvokeResponse().GetStatus().EndOfCommandStatusIB()); + ReturnErrorOnFailure(mInvokeResponseBuilder.GetInvokeResponses().GetInvokeResponse().EndOfInvokeResponseIB()); + ReturnErrorOnFailure(mInvokeResponseBuilder.GetInvokeResponses().EndOfInvokeResponses()); + ReturnErrorOnFailure(mInvokeResponseBuilder.EndOfInvokeResponseMessage()); MoveToState(State::AddedCommand); return CHIP_NO_ERROR; } diff --git a/src/app/CommandSender.cpp b/src/app/CommandSender.cpp index 7496cec8df8194..5282f10daf39a0 100644 --- a/src/app/CommandSender.cpp +++ b/src/app/CommandSender.cpp @@ -382,9 +382,9 @@ CHIP_ERROR CommandSender::FinishCommand(bool aEndDataStruct) ReturnErrorOnFailure(commandData.GetWriter()->EndContainer(mDataElementContainerType)); } - ReturnErrorOnFailure(commandData.EndOfCommandDataIB().GetError()); - ReturnErrorOnFailure(mInvokeRequestBuilder.GetInvokeRequests().EndOfInvokeRequests().GetError()); - ReturnErrorOnFailure(mInvokeRequestBuilder.EndOfInvokeRequestMessage().GetError()); + ReturnErrorOnFailure(commandData.EndOfCommandDataIB()); + ReturnErrorOnFailure(mInvokeRequestBuilder.GetInvokeRequests().EndOfInvokeRequests()); + ReturnErrorOnFailure(mInvokeRequestBuilder.EndOfInvokeRequestMessage()); MoveToState(State::AddedCommand); diff --git a/src/app/EventManagement.cpp b/src/app/EventManagement.cpp index ccc7e89e3953b2..bdda0bfcc9cbdc 100644 --- a/src/app/EventManagement.cpp +++ b/src/app/EventManagement.cpp @@ -301,11 +301,11 @@ CHIP_ERROR EventManagement::ConstructEvent(EventLoadOutContext * apContext, Even EventPathIB::Builder & eventPathBuilder = eventDataIBBuilder.CreatePath(); ReturnErrorOnFailure(eventDataIBBuilder.GetError()); - eventPathBuilder.Endpoint(apOptions->mPath.mEndpointId) - .Cluster(apOptions->mPath.mClusterId) - .Event(apOptions->mPath.mEventId) - .EndOfEventPathIB(); - ReturnErrorOnFailure(eventPathBuilder.GetError()); + CHIP_ERROR err = eventPathBuilder.Endpoint(apOptions->mPath.mEndpointId) + .Cluster(apOptions->mPath.mClusterId) + .Event(apOptions->mPath.mEventId) + .EndOfEventPathIB(); + ReturnErrorOnFailure(err); eventDataIBBuilder.EventNumber(apContext->mCurrentEventNumber).Priority(chip::to_underlying(apContext->mPriority)); ReturnErrorOnFailure(eventDataIBBuilder.GetError()); @@ -330,10 +330,8 @@ CHIP_ERROR EventManagement::ConstructEvent(EventLoadOutContext * apContext, Even { apContext->mWriter.Put(TLV::ProfileTag(kEventManagementProfile, kFabricIndexTag), apOptions->mFabricIndex); } - eventDataIBBuilder.EndOfEventDataIB(); - ReturnErrorOnFailure(eventDataIBBuilder.GetError()); - eventReportBuilder.EndOfEventReportIB(); - ReturnErrorOnFailure(eventReportBuilder.GetError()); + ReturnErrorOnFailure(eventDataIBBuilder.EndOfEventDataIB()); + ReturnErrorOnFailure(eventReportBuilder.EndOfEventReportIB()); ReturnErrorOnFailure(apContext->mWriter.Finalize()); apContext->mFirst = false; return CHIP_NO_ERROR; diff --git a/src/app/MessageDef/AttributeDataIB.cpp b/src/app/MessageDef/AttributeDataIB.cpp index 3c6be21e0bff59..0b4cca97a0f233 100644 --- a/src/app/MessageDef/AttributeDataIB.cpp +++ b/src/app/MessageDef/AttributeDataIB.cpp @@ -127,10 +127,10 @@ AttributeDataIB::Builder & AttributeDataIB::Builder::DataVersion(const chip::Dat return *this; } -AttributeDataIB::Builder & AttributeDataIB::Builder::EndOfAttributeDataIB() +CHIP_ERROR AttributeDataIB::Builder::EndOfAttributeDataIB() { EndOfContainer(); - return *this; + return GetError(); } } // namespace app } // namespace chip diff --git a/src/app/MessageDef/AttributeDataIB.h b/src/app/MessageDef/AttributeDataIB.h index 6f019c9965b55b..9095616df2c2e2 100644 --- a/src/app/MessageDef/AttributeDataIB.h +++ b/src/app/MessageDef/AttributeDataIB.h @@ -101,9 +101,9 @@ class Builder : public StructBuilder /** * @brief Mark the end of this AttributeDataIB * - * @return A reference to *this + * @return Our The builder's final status. */ - AttributeDataIB::Builder & EndOfAttributeDataIB(); + CHIP_ERROR EndOfAttributeDataIB(); private: AttributePathIB::Builder mPath; diff --git a/src/app/MessageDef/AttributeDataIBs.cpp b/src/app/MessageDef/AttributeDataIBs.cpp index 5a736ad9d87cb1..7081953c3235fc 100644 --- a/src/app/MessageDef/AttributeDataIBs.cpp +++ b/src/app/MessageDef/AttributeDataIBs.cpp @@ -101,11 +101,11 @@ AttributeDataIB::Builder & AttributeDataIBs::Builder::GetAttributeDataIBBuilder( return mAttributeDataIBBuilder; } -AttributeDataIBs::Builder & AttributeDataIBs::Builder::EndOfAttributeDataIBs() +CHIP_ERROR AttributeDataIBs::Builder::EndOfAttributeDataIBs() { EndOfContainer(); - return *this; + return GetError(); } }; // namespace app diff --git a/src/app/MessageDef/AttributeDataIBs.h b/src/app/MessageDef/AttributeDataIBs.h index e444eefc1b6b7f..16d606efd0bacd 100644 --- a/src/app/MessageDef/AttributeDataIBs.h +++ b/src/app/MessageDef/AttributeDataIBs.h @@ -60,9 +60,9 @@ class Builder : public ArrayBuilder /** * @brief Mark the end of this AttributeDataIBs * - * @return A reference to *this + * @return The builder's final status. */ - AttributeDataIBs::Builder & EndOfAttributeDataIBs(); + CHIP_ERROR EndOfAttributeDataIBs(); private: AttributeDataIB::Builder mAttributeDataIBBuilder; diff --git a/src/app/MessageDef/AttributePathIB.cpp b/src/app/MessageDef/AttributePathIB.cpp index 57b6e049a4fcf0..12aec2a242da94 100644 --- a/src/app/MessageDef/AttributePathIB.cpp +++ b/src/app/MessageDef/AttributePathIB.cpp @@ -336,10 +336,10 @@ AttributePathIB::Builder & AttributePathIB::Builder::ListIndex(const chip::ListI return *this; } -AttributePathIB::Builder & AttributePathIB::Builder::EndOfAttributePathIB() +CHIP_ERROR AttributePathIB::Builder::EndOfAttributePathIB() { EndOfContainer(); - return *this; + return GetError(); } CHIP_ERROR AttributePathIB::Builder::Encode(const AttributePathParams & aAttributePathParams) @@ -364,8 +364,7 @@ CHIP_ERROR AttributePathIB::Builder::Encode(const AttributePathParams & aAttribu ListIndex(aAttributePathParams.mListIndex); } - EndOfAttributePathIB(); - return GetError(); + return EndOfAttributePathIB(); } CHIP_ERROR AttributePathIB::Builder::Encode(const ConcreteDataAttributePath & aAttributePath) @@ -388,8 +387,7 @@ CHIP_ERROR AttributePathIB::Builder::Encode(const ConcreteDataAttributePath & aA return CHIP_ERROR_INVALID_ARGUMENT; } - EndOfAttributePathIB(); - return GetError(); + return EndOfAttributePathIB(); } } // namespace app diff --git a/src/app/MessageDef/AttributePathIB.h b/src/app/MessageDef/AttributePathIB.h index 906fd319a4113f..6441b18ec59eb9 100644 --- a/src/app/MessageDef/AttributePathIB.h +++ b/src/app/MessageDef/AttributePathIB.h @@ -227,9 +227,9 @@ class Builder : public ListBuilder /** * @brief Mark the end of this AttributePathIB * - * @return A reference to *this + * @return The builder's final status. */ - AttributePathIB::Builder & EndOfAttributePathIB(); + CHIP_ERROR EndOfAttributePathIB(); CHIP_ERROR Encode(const AttributePathParams & aAttributePathParams); CHIP_ERROR Encode(const ConcreteDataAttributePath & aAttributePathParams); diff --git a/src/app/MessageDef/AttributePathIBs.cpp b/src/app/MessageDef/AttributePathIBs.cpp index 2a171956fe9c40..997335290a26f3 100644 --- a/src/app/MessageDef/AttributePathIBs.cpp +++ b/src/app/MessageDef/AttributePathIBs.cpp @@ -82,10 +82,10 @@ AttributePathIB::Builder & AttributePathIBs::Builder::CreatePath() } // Mark the end of this array and recover the type for outer container -AttributePathIBs::Builder & AttributePathIBs::Builder::EndOfAttributePathIBs() +CHIP_ERROR AttributePathIBs::Builder::EndOfAttributePathIBs() { EndOfContainer(); - return *this; + return GetError(); } } // namespace app } // namespace chip diff --git a/src/app/MessageDef/AttributePathIBs.h b/src/app/MessageDef/AttributePathIBs.h index 8026e2783bc76c..7845e7d21e3ea6 100644 --- a/src/app/MessageDef/AttributePathIBs.h +++ b/src/app/MessageDef/AttributePathIBs.h @@ -53,9 +53,9 @@ class Builder : public ArrayBuilder /** * @brief Mark the end of this AttributePathIB * - * @return A reference to *this + * @return The builder's final status. */ - AttributePathIBs::Builder & EndOfAttributePathIBs(); + CHIP_ERROR EndOfAttributePathIBs(); private: AttributePathIB::Builder mAttributePath; diff --git a/src/app/MessageDef/AttributeReportIB.cpp b/src/app/MessageDef/AttributeReportIB.cpp index 8abf45b34f0e6f..727958e94b5b87 100644 --- a/src/app/MessageDef/AttributeReportIB.cpp +++ b/src/app/MessageDef/AttributeReportIB.cpp @@ -118,10 +118,10 @@ AttributeDataIB::Builder & AttributeReportIB::Builder::CreateAttributeData() return mAttributeData; } -AttributeReportIB::Builder & AttributeReportIB::Builder::EndOfAttributeReportIB() +CHIP_ERROR AttributeReportIB::Builder::EndOfAttributeReportIB() { EndOfContainer(); - return *this; + return GetError(); } } // namespace app } // namespace chip diff --git a/src/app/MessageDef/AttributeReportIB.h b/src/app/MessageDef/AttributeReportIB.h index 857ba3297a86f0..f5f8335bd4f4cf 100644 --- a/src/app/MessageDef/AttributeReportIB.h +++ b/src/app/MessageDef/AttributeReportIB.h @@ -89,9 +89,9 @@ class Builder : public StructBuilder /** * @brief Mark the end of this AttributeReportIB * - * @return A reference to *this + * @return The builder's final status. */ - AttributeReportIB::Builder & EndOfAttributeReportIB(); + CHIP_ERROR EndOfAttributeReportIB(); private: AttributeStatusIB::Builder mAttributeStatus; diff --git a/src/app/MessageDef/AttributeReportIBs.cpp b/src/app/MessageDef/AttributeReportIBs.cpp index 144fc8102593f6..1b025c82ca801a 100644 --- a/src/app/MessageDef/AttributeReportIBs.cpp +++ b/src/app/MessageDef/AttributeReportIBs.cpp @@ -78,10 +78,10 @@ AttributeReportIB::Builder & AttributeReportIBs::Builder::CreateAttributeReport( return mAttributeReport; } -AttributeReportIBs::Builder & AttributeReportIBs::Builder::EndOfAttributeReportIBs() +CHIP_ERROR AttributeReportIBs::Builder::EndOfAttributeReportIBs() { EndOfContainer(); - return *this; + return GetError(); } CHIP_ERROR AttributeReportIBs::Builder::EncodeAttributeStatus(const ConcreteReadAttributePath & aPath, const StatusIB & aStatus) @@ -103,8 +103,8 @@ CHIP_ERROR AttributeReportIBs::Builder::EncodeAttributeStatus(const ConcreteRead statusIBBuilder.EncodeStatusIB(aStatus); ReturnErrorOnFailure(statusIBBuilder.GetError()); - ReturnErrorOnFailure(attributeStatusIBBuilder.EndOfAttributeStatusIB().GetError()); - return attributeReport.EndOfAttributeReportIB().GetError(); + ReturnErrorOnFailure(attributeStatusIBBuilder.EndOfAttributeStatusIB()); + return attributeReport.EndOfAttributeReportIB(); } } // namespace app diff --git a/src/app/MessageDef/AttributeReportIBs.h b/src/app/MessageDef/AttributeReportIBs.h index cf0846ae209e8c..422a639cce459b 100644 --- a/src/app/MessageDef/AttributeReportIBs.h +++ b/src/app/MessageDef/AttributeReportIBs.h @@ -62,9 +62,9 @@ class Builder : public ArrayBuilder /** * @brief Mark the end of this AttributeReportIBs * - * @return A reference to *this + * @return The builder's final status. */ - AttributeReportIBs::Builder & EndOfAttributeReportIBs(); + CHIP_ERROR EndOfAttributeReportIBs(); /** * Encode an AttributeReportIB containing an AttributeStatus. diff --git a/src/app/MessageDef/AttributeStatusIB.cpp b/src/app/MessageDef/AttributeStatusIB.cpp index 749ad7dc6027be..aa829174bd6ebe 100644 --- a/src/app/MessageDef/AttributeStatusIB.cpp +++ b/src/app/MessageDef/AttributeStatusIB.cpp @@ -117,10 +117,10 @@ StatusIB::Builder & AttributeStatusIB::Builder::CreateErrorStatus() return mErrorStatus; } -AttributeStatusIB::Builder & AttributeStatusIB::Builder::EndOfAttributeStatusIB() +CHIP_ERROR AttributeStatusIB::Builder::EndOfAttributeStatusIB() { EndOfContainer(); - return *this; + return GetError(); } } // namespace app } // namespace chip diff --git a/src/app/MessageDef/AttributeStatusIB.h b/src/app/MessageDef/AttributeStatusIB.h index 85c4dfbb6c2414..cf959041b6c977 100644 --- a/src/app/MessageDef/AttributeStatusIB.h +++ b/src/app/MessageDef/AttributeStatusIB.h @@ -88,9 +88,9 @@ class Builder : public StructBuilder /** * @brief Mark the end of this AttributeStatusIB * - * @return A reference to *this + * @return The builder's final status. */ - AttributeStatusIB::Builder & EndOfAttributeStatusIB(); + CHIP_ERROR EndOfAttributeStatusIB(); private: AttributePathIB::Builder mPath; diff --git a/src/app/MessageDef/AttributeStatusIBs.cpp b/src/app/MessageDef/AttributeStatusIBs.cpp index 88484fd28eb02f..57b92734383ed9 100644 --- a/src/app/MessageDef/AttributeStatusIBs.cpp +++ b/src/app/MessageDef/AttributeStatusIBs.cpp @@ -38,10 +38,10 @@ AttributeStatusIB::Builder & AttributeStatusIBs::Builder::CreateAttributeStatus( return mAttributeStatus; } -AttributeStatusIBs::Builder & AttributeStatusIBs::Builder::EndOfAttributeStatuses() +CHIP_ERROR AttributeStatusIBs::Builder::EndOfAttributeStatuses() { EndOfContainer(); - return *this; + return GetError(); } #if CHIP_CONFIG_IM_PRETTY_PRINT diff --git a/src/app/MessageDef/AttributeStatusIBs.h b/src/app/MessageDef/AttributeStatusIBs.h index bed5a23ab32589..03b1d00653463d 100644 --- a/src/app/MessageDef/AttributeStatusIBs.h +++ b/src/app/MessageDef/AttributeStatusIBs.h @@ -45,9 +45,9 @@ class Builder : public ArrayBuilder /** * @brief Mark the end of this AttributeStatusIBs * - * @return A reference to *this + * @return The builder's final status. */ - AttributeStatusIBs::Builder & EndOfAttributeStatuses(); + CHIP_ERROR EndOfAttributeStatuses(); private: AttributeStatusIB::Builder mAttributeStatus; diff --git a/src/app/MessageDef/ClusterPathIB.cpp b/src/app/MessageDef/ClusterPathIB.cpp index b44f57f8aacba4..5f9ec4695b0b19 100644 --- a/src/app/MessageDef/ClusterPathIB.cpp +++ b/src/app/MessageDef/ClusterPathIB.cpp @@ -142,10 +142,10 @@ ClusterPathIB::Builder & ClusterPathIB::Builder::Cluster(const ClusterId aCluste return *this; } -ClusterPathIB::Builder & ClusterPathIB::Builder::EndOfClusterPathIB() +CHIP_ERROR ClusterPathIB::Builder::EndOfClusterPathIB() { EndOfContainer(); - return *this; + return GetError(); } } // namespace app } // namespace chip diff --git a/src/app/MessageDef/ClusterPathIB.h b/src/app/MessageDef/ClusterPathIB.h index e58d27f2d800a4..8e78408e9d9c87 100644 --- a/src/app/MessageDef/ClusterPathIB.h +++ b/src/app/MessageDef/ClusterPathIB.h @@ -112,9 +112,9 @@ class Builder : public ListBuilder /** * @brief Mark the end of this ClusterPathIB * - * @return A reference to *this + * @return The builder's final status. */ - ClusterPathIB::Builder & EndOfClusterPathIB(); + CHIP_ERROR EndOfClusterPathIB(); }; } // namespace ClusterPathIB } // namespace app diff --git a/src/app/MessageDef/CommandDataIB.cpp b/src/app/MessageDef/CommandDataIB.cpp index 0267899e16096d..4222c4d919719b 100644 --- a/src/app/MessageDef/CommandDataIB.cpp +++ b/src/app/MessageDef/CommandDataIB.cpp @@ -102,10 +102,10 @@ CommandPathIB::Builder & CommandDataIB::Builder::CreatePath() return mPath; } -CommandDataIB::Builder & CommandDataIB::Builder::EndOfCommandDataIB() +CHIP_ERROR CommandDataIB::Builder::EndOfCommandDataIB() { EndOfContainer(); - return *this; + return GetError(); } } // namespace app } // namespace chip diff --git a/src/app/MessageDef/CommandDataIB.h b/src/app/MessageDef/CommandDataIB.h index d7b0adf411118d..c3cce65f2e8511 100644 --- a/src/app/MessageDef/CommandDataIB.h +++ b/src/app/MessageDef/CommandDataIB.h @@ -81,9 +81,9 @@ class Builder : public StructBuilder /** * @brief Mark the end of this CommandDataIB * - * @return A reference to *this + * @return The builder's final status. */ - CommandDataIB::Builder & EndOfCommandDataIB(); + CHIP_ERROR EndOfCommandDataIB(); private: CommandPathIB::Builder mPath; diff --git a/src/app/MessageDef/CommandPathIB.cpp b/src/app/MessageDef/CommandPathIB.cpp index f1534e831d5e64..70aab0dc3f1765 100644 --- a/src/app/MessageDef/CommandPathIB.cpp +++ b/src/app/MessageDef/CommandPathIB.cpp @@ -144,10 +144,10 @@ CommandPathIB::Builder & CommandPathIB::Builder::CommandId(const chip::CommandId return *this; } -CommandPathIB::Builder & CommandPathIB::Builder::EndOfCommandPathIB() +CHIP_ERROR CommandPathIB::Builder::EndOfCommandPathIB() { EndOfContainer(); - return *this; + return GetError(); } CHIP_ERROR CommandPathIB::Builder::Encode(const CommandPathParams & aCommandPathParams) @@ -157,17 +157,15 @@ CHIP_ERROR CommandPathIB::Builder::Encode(const CommandPathParams & aCommandPath EndpointId(aCommandPathParams.mEndpointId); } - ClusterId(aCommandPathParams.mClusterId).CommandId(aCommandPathParams.mCommandId).EndOfCommandPathIB(); - return GetError(); + return ClusterId(aCommandPathParams.mClusterId).CommandId(aCommandPathParams.mCommandId).EndOfCommandPathIB(); } CHIP_ERROR CommandPathIB::Builder::Encode(const ConcreteCommandPath & aConcreteCommandPath) { - EndpointId(aConcreteCommandPath.mEndpointId) + return EndpointId(aConcreteCommandPath.mEndpointId) .ClusterId(aConcreteCommandPath.mClusterId) .CommandId(aConcreteCommandPath.mCommandId) .EndOfCommandPathIB(); - return GetError(); } }; // namespace app diff --git a/src/app/MessageDef/CommandPathIB.h b/src/app/MessageDef/CommandPathIB.h index af2a80f71fd48b..5362b65eefc7e6 100644 --- a/src/app/MessageDef/CommandPathIB.h +++ b/src/app/MessageDef/CommandPathIB.h @@ -114,9 +114,9 @@ class Builder : public ListBuilder /** * @brief Mark the end of this CommandPathIB * - * @return A reference to *this + * @return The builder's final status. */ - CommandPathIB::Builder & EndOfCommandPathIB(); + CHIP_ERROR EndOfCommandPathIB(); CHIP_ERROR Encode(const CommandPathParams & aCommandPathParams); CHIP_ERROR Encode(const ConcreteCommandPath & aConcreteCommandPath); diff --git a/src/app/MessageDef/CommandStatusIB.cpp b/src/app/MessageDef/CommandStatusIB.cpp index b9201002bff47a..4f38bb292e657e 100644 --- a/src/app/MessageDef/CommandStatusIB.cpp +++ b/src/app/MessageDef/CommandStatusIB.cpp @@ -126,10 +126,10 @@ StatusIB::Builder & CommandStatusIB::Builder::CreateErrorStatus() return mErrorStatus; } -CommandStatusIB::Builder & CommandStatusIB::Builder::EndOfCommandStatusIB() +CHIP_ERROR CommandStatusIB::Builder::EndOfCommandStatusIB() { EndOfContainer(); - return *this; + return GetError(); } } // namespace app } // namespace chip diff --git a/src/app/MessageDef/CommandStatusIB.h b/src/app/MessageDef/CommandStatusIB.h index 68150b994fe0b2..8574937291375d 100644 --- a/src/app/MessageDef/CommandStatusIB.h +++ b/src/app/MessageDef/CommandStatusIB.h @@ -89,9 +89,9 @@ class Builder : public StructBuilder /** * @brief Mark the end of this CommandStatusIB * - * @return A reference to *this + * @return The builder's final status. */ - CommandStatusIB::Builder & EndOfCommandStatusIB(); + CHIP_ERROR EndOfCommandStatusIB(); private: CommandPathIB::Builder mPath; diff --git a/src/app/MessageDef/DataVersionFilterIB.cpp b/src/app/MessageDef/DataVersionFilterIB.cpp index 53806c1278b2ca..242a9d81211d7b 100644 --- a/src/app/MessageDef/DataVersionFilterIB.cpp +++ b/src/app/MessageDef/DataVersionFilterIB.cpp @@ -121,10 +121,10 @@ DataVersionFilterIB::Builder & DataVersionFilterIB::Builder::DataVersion(const c return *this; } -DataVersionFilterIB::Builder & DataVersionFilterIB::Builder::EndOfDataVersionFilterIB() +CHIP_ERROR DataVersionFilterIB::Builder::EndOfDataVersionFilterIB() { EndOfContainer(); - return *this; + return GetError(); } } // namespace app } // namespace chip diff --git a/src/app/MessageDef/DataVersionFilterIB.h b/src/app/MessageDef/DataVersionFilterIB.h index c4f2864b74ee71..33988384482020 100644 --- a/src/app/MessageDef/DataVersionFilterIB.h +++ b/src/app/MessageDef/DataVersionFilterIB.h @@ -89,9 +89,9 @@ class Builder : public StructBuilder /** * @brief Mark the end of this DataVersionFilterIB * - * @return A reference to *this + * @return The builder's final status. */ - DataVersionFilterIB::Builder & EndOfDataVersionFilterIB(); + CHIP_ERROR EndOfDataVersionFilterIB(); private: ClusterPathIB::Builder mPath; diff --git a/src/app/MessageDef/DataVersionFilterIBs.cpp b/src/app/MessageDef/DataVersionFilterIBs.cpp index 04eac1d1c24047..ca6008975d7992 100644 --- a/src/app/MessageDef/DataVersionFilterIBs.cpp +++ b/src/app/MessageDef/DataVersionFilterIBs.cpp @@ -69,10 +69,10 @@ DataVersionFilterIB::Builder & DataVersionFilterIBs::Builder::CreateDataVersionF return mDataVersionFilter; } -DataVersionFilterIBs::Builder & DataVersionFilterIBs::Builder::EndOfDataVersionFilterIBs() +CHIP_ERROR DataVersionFilterIBs::Builder::EndOfDataVersionFilterIBs() { EndOfContainer(); - return *this; + return GetError(); } } // namespace app } // namespace chip diff --git a/src/app/MessageDef/DataVersionFilterIBs.h b/src/app/MessageDef/DataVersionFilterIBs.h index adc55d2e50af48..91be119d84452e 100644 --- a/src/app/MessageDef/DataVersionFilterIBs.h +++ b/src/app/MessageDef/DataVersionFilterIBs.h @@ -57,9 +57,9 @@ class Builder : public ArrayBuilder /** * @brief Mark the end of this DataVersionFilterIBs * - * @return A reference to *this + * @return The builder's final status. */ - DataVersionFilterIBs::Builder & EndOfDataVersionFilterIBs(); + CHIP_ERROR EndOfDataVersionFilterIBs(); private: DataVersionFilterIB::Builder mDataVersionFilter; diff --git a/src/app/MessageDef/EventDataIB.cpp b/src/app/MessageDef/EventDataIB.cpp index bfcaacbd28ad44..471ccfae07e54f 100644 --- a/src/app/MessageDef/EventDataIB.cpp +++ b/src/app/MessageDef/EventDataIB.cpp @@ -362,10 +362,10 @@ EventDataIB::Builder & EventDataIB::Builder::DeltaSystemTimestamp(const uint64_t } // Mark the end of this element and recover the type for outer container -EventDataIB::Builder & EventDataIB::Builder::EndOfEventDataIB() +CHIP_ERROR EventDataIB::Builder::EndOfEventDataIB() { EndOfContainer(); - return *this; + return GetError(); } } // namespace app } // namespace chip diff --git a/src/app/MessageDef/EventDataIB.h b/src/app/MessageDef/EventDataIB.h index d43505b1b0886e..1086a89634c45e 100644 --- a/src/app/MessageDef/EventDataIB.h +++ b/src/app/MessageDef/EventDataIB.h @@ -227,9 +227,9 @@ class Builder : public StructBuilder /** * @brief Mark the end of this EventDataIB * - * @return A reference to *this + * @return The builder's final status. */ - EventDataIB::Builder & EndOfEventDataIB(); + CHIP_ERROR EndOfEventDataIB(); private: EventPathIB::Builder mPath; diff --git a/src/app/MessageDef/EventFilterIB.cpp b/src/app/MessageDef/EventFilterIB.cpp index 61af5a3297f4c0..b4ad035a2b48b1 100644 --- a/src/app/MessageDef/EventFilterIB.cpp +++ b/src/app/MessageDef/EventFilterIB.cpp @@ -119,10 +119,10 @@ EventFilterIB::Builder & EventFilterIB::Builder::EventMin(const uint64_t aEventM return *this; } -EventFilterIB::Builder & EventFilterIB::Builder::EndOfEventFilterIB() +CHIP_ERROR EventFilterIB::Builder::EndOfEventFilterIB() { EndOfContainer(); - return *this; + return GetError(); } }; // namespace app }; // namespace chip diff --git a/src/app/MessageDef/EventFilterIB.h b/src/app/MessageDef/EventFilterIB.h index b103d507398184..914874684642a3 100644 --- a/src/app/MessageDef/EventFilterIB.h +++ b/src/app/MessageDef/EventFilterIB.h @@ -96,9 +96,9 @@ class Builder : public StructBuilder /** * @brief Mark the end of this EventFilterIB * - * @return A reference to *this + * @return The builder's final status. */ - EventFilterIB::Builder & EndOfEventFilterIB(); + CHIP_ERROR EndOfEventFilterIB(); }; }; // namespace EventFilterIB }; // namespace app diff --git a/src/app/MessageDef/EventFilterIBs.cpp b/src/app/MessageDef/EventFilterIBs.cpp index 8bc51ff5d19edb..9f6b1432931f7b 100644 --- a/src/app/MessageDef/EventFilterIBs.cpp +++ b/src/app/MessageDef/EventFilterIBs.cpp @@ -69,18 +69,18 @@ EventFilterIB::Builder & EventFilterIBs::Builder::CreateEventFilter() return mEventFilter; } -EventFilterIBs::Builder & EventFilterIBs::Builder::EndOfEventFilters() +CHIP_ERROR EventFilterIBs::Builder::EndOfEventFilters() { EndOfContainer(); - return *this; + return GetError(); } CHIP_ERROR EventFilterIBs::Builder::GenerateEventFilter(EventNumber aEventNumber) { EventFilterIB::Builder & eventFilter = CreateEventFilter(); ReturnErrorOnFailure(GetError()); - ReturnErrorOnFailure(eventFilter.EventMin(aEventNumber).EndOfEventFilterIB().GetError()); - ReturnErrorOnFailure(EndOfEventFilters().GetError()); + ReturnErrorOnFailure(eventFilter.EventMin(aEventNumber).EndOfEventFilterIB()); + ReturnErrorOnFailure(EndOfEventFilters()); return CHIP_NO_ERROR; } diff --git a/src/app/MessageDef/EventFilterIBs.h b/src/app/MessageDef/EventFilterIBs.h index d48576f5a55f01..e3b216c126f483 100644 --- a/src/app/MessageDef/EventFilterIBs.h +++ b/src/app/MessageDef/EventFilterIBs.h @@ -57,9 +57,9 @@ class Builder : public ArrayBuilder /** * @brief Mark the end of this EventFilterIBs * - * @return A reference to *this + * @return The builder's final status. */ - EventFilterIBs::Builder & EndOfEventFilters(); + CHIP_ERROR EndOfEventFilters(); /** * @brief Generate single event filter diff --git a/src/app/MessageDef/EventPathIB.cpp b/src/app/MessageDef/EventPathIB.cpp index fedd40fbebbacc..5a135388854238 100644 --- a/src/app/MessageDef/EventPathIB.cpp +++ b/src/app/MessageDef/EventPathIB.cpp @@ -251,10 +251,10 @@ EventPathIB::Builder & EventPathIB::Builder::IsUrgent(const bool aIsUrgent) return *this; } -EventPathIB::Builder & EventPathIB::Builder::EndOfEventPathIB() +CHIP_ERROR EventPathIB::Builder::EndOfEventPathIB() { EndOfContainer(); - return *this; + return GetError(); } CHIP_ERROR EventPathIB::Builder::Encode(const EventPathParams & aEventPathParams) @@ -278,8 +278,7 @@ CHIP_ERROR EventPathIB::Builder::Encode(const EventPathParams & aEventPathParams { IsUrgent(aEventPathParams.mIsUrgentEvent); } - EndOfEventPathIB(); - return GetError(); + return EndOfEventPathIB(); } } // namespace app } // namespace chip diff --git a/src/app/MessageDef/EventPathIB.h b/src/app/MessageDef/EventPathIB.h index 0df812f012bbff..2a136631d831a4 100644 --- a/src/app/MessageDef/EventPathIB.h +++ b/src/app/MessageDef/EventPathIB.h @@ -175,9 +175,9 @@ class Builder : public ListBuilder /** * @brief Mark the end of this EventPath * - * @return A reference to *this + * @return The builder's final status. */ - EventPathIB::Builder & EndOfEventPathIB(); + CHIP_ERROR EndOfEventPathIB(); CHIP_ERROR Encode(const EventPathParams & aEventPathParams); }; diff --git a/src/app/MessageDef/EventPathIBs.cpp b/src/app/MessageDef/EventPathIBs.cpp index 0a6277e2e22ae3..4b91d745acba87 100644 --- a/src/app/MessageDef/EventPathIBs.cpp +++ b/src/app/MessageDef/EventPathIBs.cpp @@ -77,10 +77,10 @@ EventPathIB::Builder & EventPathIBs::Builder::CreatePath() return mEventPath; } -EventPathIBs::Builder & EventPathIBs::Builder::EndOfEventPaths() +CHIP_ERROR EventPathIBs::Builder::EndOfEventPaths() { EndOfContainer(); - return *this; + return GetError(); } }; // namespace app }; // namespace chip diff --git a/src/app/MessageDef/EventPathIBs.h b/src/app/MessageDef/EventPathIBs.h index 0f4a4612298fd4..9ce2e308d0d5ee 100644 --- a/src/app/MessageDef/EventPathIBs.h +++ b/src/app/MessageDef/EventPathIBs.h @@ -54,9 +54,9 @@ class Builder : public ArrayBuilder /** * @brief Mark the end of this EventPathIBs * - * @return A reference to *this + * @return The builder's final status. */ - EventPathIBs::Builder & EndOfEventPaths(); + CHIP_ERROR EndOfEventPaths(); private: EventPathIB::Builder mEventPath; diff --git a/src/app/MessageDef/EventReportIB.cpp b/src/app/MessageDef/EventReportIB.cpp index 0c63b7497e7340..b6bb94bc414f89 100644 --- a/src/app/MessageDef/EventReportIB.cpp +++ b/src/app/MessageDef/EventReportIB.cpp @@ -118,10 +118,10 @@ EventDataIB::Builder & EventReportIB::Builder::CreateEventData() return mEventData; } -EventReportIB::Builder & EventReportIB::Builder::EndOfEventReportIB() +CHIP_ERROR EventReportIB::Builder::EndOfEventReportIB() { EndOfContainer(); - return *this; + return GetError(); } CHIP_ERROR EventReportIB::ConstructEventStatusIB(TLV::TLVWriter & aWriter, const ConcreteEventPath & aEvent, StatusIB aStatus) @@ -132,16 +132,13 @@ CHIP_ERROR EventReportIB::ConstructEventStatusIB(TLV::TLVWriter & aWriter, const ReturnErrorOnFailure(eventReportIBBuilder.GetError()); EventPathIB::Builder & eventPathIBBuilder = eventStatusIBBuilder.CreatePath(); ReturnErrorOnFailure(eventStatusIBBuilder.GetError()); - ReturnErrorOnFailure(eventPathIBBuilder.Endpoint(aEvent.mEndpointId) - .Cluster(aEvent.mClusterId) - .Event(aEvent.mEventId) - .EndOfEventPathIB() - .GetError()); + ReturnErrorOnFailure( + eventPathIBBuilder.Endpoint(aEvent.mEndpointId).Cluster(aEvent.mClusterId).Event(aEvent.mEventId).EndOfEventPathIB()); ReturnErrorOnFailure(eventStatusIBBuilder.CreateErrorStatus().EncodeStatusIB(aStatus).GetError()); - ReturnErrorOnFailure(eventStatusIBBuilder.EndOfEventStatusIB().GetError()); - ReturnErrorOnFailure(eventReportIBBuilder.EndOfEventReportIB().GetError()); + ReturnErrorOnFailure(eventStatusIBBuilder.EndOfEventStatusIB()); + ReturnErrorOnFailure(eventReportIBBuilder.EndOfEventReportIB()); ReturnErrorOnFailure(aWriter.Finalize()); return CHIP_NO_ERROR; } diff --git a/src/app/MessageDef/EventReportIB.h b/src/app/MessageDef/EventReportIB.h index e91ec6f1c3a6c6..efafdbef9bf065 100644 --- a/src/app/MessageDef/EventReportIB.h +++ b/src/app/MessageDef/EventReportIB.h @@ -88,9 +88,9 @@ class Builder : public StructBuilder /** * @brief Mark the end of this EventReportIB * - * @return A reference to *this + * @return The builder's final status. */ - EventReportIB::Builder & EndOfEventReportIB(); + CHIP_ERROR EndOfEventReportIB(); private: EventStatusIB::Builder mEventStatus; diff --git a/src/app/MessageDef/EventReportIBs.cpp b/src/app/MessageDef/EventReportIBs.cpp index 57a61c164c11c6..23b7c8386340ae 100644 --- a/src/app/MessageDef/EventReportIBs.cpp +++ b/src/app/MessageDef/EventReportIBs.cpp @@ -78,10 +78,10 @@ EventReportIB::Builder & EventReportIBs::Builder::CreateEventReport() return mEventReport; } -EventReportIBs::Builder & EventReportIBs::Builder::EndOfEventReports() +CHIP_ERROR EventReportIBs::Builder::EndOfEventReports() { EndOfContainer(); - return *this; + return GetError(); } } // namespace app } // namespace chip diff --git a/src/app/MessageDef/EventReportIBs.h b/src/app/MessageDef/EventReportIBs.h index eacad665f08fc1..ebaa12f4647c28 100644 --- a/src/app/MessageDef/EventReportIBs.h +++ b/src/app/MessageDef/EventReportIBs.h @@ -58,9 +58,9 @@ class Builder : public ArrayBuilder /** * @brief Mark the end of this EventReportIBs * - * @return A reference to *this + * @return The builder's final status. */ - EventReportIBs::Builder & EndOfEventReports(); + CHIP_ERROR EndOfEventReports(); private: EventReportIB::Builder mEventReport; diff --git a/src/app/MessageDef/EventStatusIB.cpp b/src/app/MessageDef/EventStatusIB.cpp index f867aceaa0edea..8ed58a37364c03 100644 --- a/src/app/MessageDef/EventStatusIB.cpp +++ b/src/app/MessageDef/EventStatusIB.cpp @@ -117,10 +117,10 @@ StatusIB::Builder & EventStatusIB::Builder::CreateErrorStatus() return mErrorStatus; } -EventStatusIB::Builder & EventStatusIB::Builder::EndOfEventStatusIB() +CHIP_ERROR EventStatusIB::Builder::EndOfEventStatusIB() { EndOfContainer(); - return *this; + return GetError(); } } // namespace app } // namespace chip diff --git a/src/app/MessageDef/EventStatusIB.h b/src/app/MessageDef/EventStatusIB.h index d7a44044fa39c7..8abce827ad6ca8 100644 --- a/src/app/MessageDef/EventStatusIB.h +++ b/src/app/MessageDef/EventStatusIB.h @@ -88,9 +88,9 @@ class Builder : public StructBuilder /** * @brief Mark the end of this EventStatusIB * - * @return A reference to *this + * @return The builder's final status. */ - EventStatusIB::Builder & EndOfEventStatusIB(); + CHIP_ERROR EndOfEventStatusIB(); private: EventPathIB::Builder mPath; diff --git a/src/app/MessageDef/InvokeRequestMessage.cpp b/src/app/MessageDef/InvokeRequestMessage.cpp index ce2cf98cb767c8..3cd3066f03e4ef 100644 --- a/src/app/MessageDef/InvokeRequestMessage.cpp +++ b/src/app/MessageDef/InvokeRequestMessage.cpp @@ -140,7 +140,7 @@ InvokeRequests::Builder & InvokeRequestMessage::Builder::CreateInvokeRequests() return mInvokeRequests; } -InvokeRequestMessage::Builder & InvokeRequestMessage::Builder::EndOfInvokeRequestMessage() +CHIP_ERROR InvokeRequestMessage::Builder::EndOfInvokeRequestMessage() { if (mError == CHIP_NO_ERROR) { @@ -150,7 +150,7 @@ InvokeRequestMessage::Builder & InvokeRequestMessage::Builder::EndOfInvokeReques { EndOfContainer(); } - return *this; + return GetError(); } }; // namespace app }; // namespace chip diff --git a/src/app/MessageDef/InvokeRequestMessage.h b/src/app/MessageDef/InvokeRequestMessage.h index 82d11fddcc592d..36b32a4c15a5a7 100644 --- a/src/app/MessageDef/InvokeRequestMessage.h +++ b/src/app/MessageDef/InvokeRequestMessage.h @@ -102,9 +102,9 @@ class Builder : public MessageBuilder /** * @brief Mark the end of this InvokeRequestMessage * - * @return A reference to *this + * @return The builder's final status. */ - InvokeRequestMessage::Builder & EndOfInvokeRequestMessage(); + CHIP_ERROR EndOfInvokeRequestMessage(); private: InvokeRequests::Builder mInvokeRequests; diff --git a/src/app/MessageDef/InvokeRequests.cpp b/src/app/MessageDef/InvokeRequests.cpp index a50283d69fec80..56456121de9b3d 100644 --- a/src/app/MessageDef/InvokeRequests.cpp +++ b/src/app/MessageDef/InvokeRequests.cpp @@ -79,10 +79,10 @@ CommandDataIB::Builder & InvokeRequests::Builder::CreateCommandData() return mCommandData; } -InvokeRequests::Builder & InvokeRequests::Builder::EndOfInvokeRequests() +CHIP_ERROR InvokeRequests::Builder::EndOfInvokeRequests() { EndOfContainer(); - return *this; + return GetError(); } } // namespace app } // namespace chip diff --git a/src/app/MessageDef/InvokeRequests.h b/src/app/MessageDef/InvokeRequests.h index 319d681000c431..f82a8a8fa92625 100644 --- a/src/app/MessageDef/InvokeRequests.h +++ b/src/app/MessageDef/InvokeRequests.h @@ -57,9 +57,9 @@ class Builder : public ArrayBuilder /** * @brief Mark the end of this InvokeRequests * - * @return A reference to *this + * @return The builder's final status. */ - InvokeRequests::Builder & EndOfInvokeRequests(); + CHIP_ERROR EndOfInvokeRequests(); private: CommandDataIB::Builder mCommandData; diff --git a/src/app/MessageDef/InvokeResponseIB.cpp b/src/app/MessageDef/InvokeResponseIB.cpp index 665eaa6c0ea9d6..a3050db2f5217b 100644 --- a/src/app/MessageDef/InvokeResponseIB.cpp +++ b/src/app/MessageDef/InvokeResponseIB.cpp @@ -115,10 +115,10 @@ CommandStatusIB::Builder & InvokeResponseIB::Builder::CreateStatus() return mStatus; } -InvokeResponseIB::Builder & InvokeResponseIB::Builder::EndOfInvokeResponseIB() +CHIP_ERROR InvokeResponseIB::Builder::EndOfInvokeResponseIB() { EndOfContainer(); - return *this; + return GetError(); } } // namespace app } // namespace chip diff --git a/src/app/MessageDef/InvokeResponseIB.h b/src/app/MessageDef/InvokeResponseIB.h index 3df6c190e9288b..14da578caa571f 100644 --- a/src/app/MessageDef/InvokeResponseIB.h +++ b/src/app/MessageDef/InvokeResponseIB.h @@ -96,9 +96,9 @@ class Builder : public StructBuilder /** * @brief Mark the end of this InvokeCommand * - * @return A reference to *this + * @return The builder's final status. */ - InvokeResponseIB::Builder & EndOfInvokeResponseIB(); + CHIP_ERROR EndOfInvokeResponseIB(); private: CommandDataIB::Builder mCommand; diff --git a/src/app/MessageDef/InvokeResponseIBs.cpp b/src/app/MessageDef/InvokeResponseIBs.cpp index cdadf64d00043d..536d18abb25687 100644 --- a/src/app/MessageDef/InvokeResponseIBs.cpp +++ b/src/app/MessageDef/InvokeResponseIBs.cpp @@ -79,10 +79,10 @@ InvokeResponseIB::Builder & InvokeResponseIBs::Builder::CreateInvokeResponse() return mInvokeResponse; } -InvokeResponseIBs::Builder & InvokeResponseIBs::Builder::EndOfInvokeResponses() +CHIP_ERROR InvokeResponseIBs::Builder::EndOfInvokeResponses() { EndOfContainer(); - return *this; + return GetError(); } } // namespace app } // namespace chip diff --git a/src/app/MessageDef/InvokeResponseIBs.h b/src/app/MessageDef/InvokeResponseIBs.h index 8fc36a40f510ad..1712c6fd22de8b 100644 --- a/src/app/MessageDef/InvokeResponseIBs.h +++ b/src/app/MessageDef/InvokeResponseIBs.h @@ -57,9 +57,9 @@ class Builder : public ArrayBuilder /** * @brief Mark the end of this InvokeResponseIBs * - * @return A reference to *this + * @return The builder's final status. */ - InvokeResponseIBs::Builder & EndOfInvokeResponses(); + CHIP_ERROR EndOfInvokeResponses(); private: InvokeResponseIB::Builder mInvokeResponse; diff --git a/src/app/MessageDef/InvokeResponseMessage.cpp b/src/app/MessageDef/InvokeResponseMessage.cpp index dd3959617d5e88..225f2c3dc4acac 100644 --- a/src/app/MessageDef/InvokeResponseMessage.cpp +++ b/src/app/MessageDef/InvokeResponseMessage.cpp @@ -116,7 +116,7 @@ InvokeResponseIBs::Builder & InvokeResponseMessage::Builder::CreateInvokeRespons return mInvokeResponses; } -InvokeResponseMessage::Builder & InvokeResponseMessage::Builder::EndOfInvokeResponseMessage() +CHIP_ERROR InvokeResponseMessage::Builder::EndOfInvokeResponseMessage() { if (mError == CHIP_NO_ERROR) { @@ -126,7 +126,7 @@ InvokeResponseMessage::Builder & InvokeResponseMessage::Builder::EndOfInvokeResp { EndOfContainer(); } - return *this; + return GetError(); } } // namespace app } // namespace chip diff --git a/src/app/MessageDef/InvokeResponseMessage.h b/src/app/MessageDef/InvokeResponseMessage.h index 3e916354d8b910..1399f747a507b5 100644 --- a/src/app/MessageDef/InvokeResponseMessage.h +++ b/src/app/MessageDef/InvokeResponseMessage.h @@ -89,9 +89,9 @@ class Builder : public MessageBuilder /** * @brief Mark the end of this InvokeResponseMessage * - * @return A reference to *this + * @return The builder's final status. */ - InvokeResponseMessage::Builder & EndOfInvokeResponseMessage(); + CHIP_ERROR EndOfInvokeResponseMessage(); private: InvokeResponseIBs::Builder mInvokeResponses; diff --git a/src/app/MessageDef/ReadRequestMessage.cpp b/src/app/MessageDef/ReadRequestMessage.cpp index 45a5088def0383..8b96b044d774c5 100644 --- a/src/app/MessageDef/ReadRequestMessage.cpp +++ b/src/app/MessageDef/ReadRequestMessage.cpp @@ -196,7 +196,7 @@ ReadRequestMessage::Builder & ReadRequestMessage::Builder::IsFabricFiltered(cons return *this; } -ReadRequestMessage::Builder & ReadRequestMessage::Builder::EndOfReadRequestMessage() +CHIP_ERROR ReadRequestMessage::Builder::EndOfReadRequestMessage() { if (mError == CHIP_NO_ERROR) { @@ -206,7 +206,7 @@ ReadRequestMessage::Builder & ReadRequestMessage::Builder::EndOfReadRequestMessa { EndOfContainer(); } - return *this; + return GetError(); } } // namespace app } // namespace chip diff --git a/src/app/MessageDef/ReadRequestMessage.h b/src/app/MessageDef/ReadRequestMessage.h index f35fd96ad3da92..880ad9d8bd4d52 100644 --- a/src/app/MessageDef/ReadRequestMessage.h +++ b/src/app/MessageDef/ReadRequestMessage.h @@ -135,9 +135,9 @@ class Builder : public MessageBuilder /** * @brief Mark the end of this ReadRequestMessage * - * @return A reference to *this + * @return The builder's final status. */ - ReadRequestMessage::Builder & EndOfReadRequestMessage(); + CHIP_ERROR EndOfReadRequestMessage(); private: AttributePathIBs::Builder mAttributeRequests; diff --git a/src/app/MessageDef/ReportDataMessage.cpp b/src/app/MessageDef/ReportDataMessage.cpp index a1f61f06480d83..c3c569572ae9fe 100644 --- a/src/app/MessageDef/ReportDataMessage.cpp +++ b/src/app/MessageDef/ReportDataMessage.cpp @@ -212,7 +212,7 @@ ReportDataMessage::Builder & ReportDataMessage::Builder::MoreChunkedMessages(con return *this; } -ReportDataMessage::Builder & ReportDataMessage::Builder::EndOfReportDataMessage() +CHIP_ERROR ReportDataMessage::Builder::EndOfReportDataMessage() { if (mError == CHIP_NO_ERROR) { @@ -222,7 +222,7 @@ ReportDataMessage::Builder & ReportDataMessage::Builder::EndOfReportDataMessage( { EndOfContainer(); } - return *this; + return GetError(); } } // namespace app } // namespace chip diff --git a/src/app/MessageDef/ReportDataMessage.h b/src/app/MessageDef/ReportDataMessage.h index 2250986ecbe4b1..a515635ae8500a 100644 --- a/src/app/MessageDef/ReportDataMessage.h +++ b/src/app/MessageDef/ReportDataMessage.h @@ -158,9 +158,9 @@ class Builder : public MessageBuilder /** * @brief Mark the end of this ReportDataMessage * - * @return A reference to *this + * @return The builder's final status. */ - ReportDataMessage::Builder & EndOfReportDataMessage(); + CHIP_ERROR EndOfReportDataMessage(); private: AttributeReportIBs::Builder mAttributeReportIBsBuilder; diff --git a/src/app/MessageDef/SubscribeRequestMessage.cpp b/src/app/MessageDef/SubscribeRequestMessage.cpp index 62b99c90c6c28f..b536570891bade 100644 --- a/src/app/MessageDef/SubscribeRequestMessage.cpp +++ b/src/app/MessageDef/SubscribeRequestMessage.cpp @@ -261,7 +261,7 @@ SubscribeRequestMessage::Builder & SubscribeRequestMessage::Builder::IsFabricFil return *this; } -SubscribeRequestMessage::Builder & SubscribeRequestMessage::Builder::EndOfSubscribeRequestMessage() +CHIP_ERROR SubscribeRequestMessage::Builder::EndOfSubscribeRequestMessage() { if (mError == CHIP_NO_ERROR) { @@ -271,7 +271,7 @@ SubscribeRequestMessage::Builder & SubscribeRequestMessage::Builder::EndOfSubscr { EndOfContainer(); } - return *this; + return GetError(); } } // namespace app } // namespace chip diff --git a/src/app/MessageDef/SubscribeRequestMessage.h b/src/app/MessageDef/SubscribeRequestMessage.h index efe300e5ae6083..3eeb6686da7c8c 100644 --- a/src/app/MessageDef/SubscribeRequestMessage.h +++ b/src/app/MessageDef/SubscribeRequestMessage.h @@ -140,7 +140,7 @@ class Builder : public MessageBuilder /** * @brief Mark the end of this SubscribeRequestMessage */ - SubscribeRequestMessage::Builder & EndOfSubscribeRequestMessage(); + CHIP_ERROR EndOfSubscribeRequestMessage(); private: AttributePathIBs::Builder mAttributeRequests; diff --git a/src/app/MessageDef/SubscribeResponseMessage.cpp b/src/app/MessageDef/SubscribeResponseMessage.cpp index 92a01dcf00daa8..99528895e49796 100644 --- a/src/app/MessageDef/SubscribeResponseMessage.cpp +++ b/src/app/MessageDef/SubscribeResponseMessage.cpp @@ -107,7 +107,7 @@ SubscribeResponseMessage::Builder & SubscribeResponseMessage::Builder::MaxInterv return *this; } -SubscribeResponseMessage::Builder & SubscribeResponseMessage::Builder::EndOfSubscribeResponseMessage() +CHIP_ERROR SubscribeResponseMessage::Builder::EndOfSubscribeResponseMessage() { if (mError == CHIP_NO_ERROR) { @@ -117,7 +117,7 @@ SubscribeResponseMessage::Builder & SubscribeResponseMessage::Builder::EndOfSubs { EndOfContainer(); } - return *this; + return GetError(); } } // namespace app } // namespace chip diff --git a/src/app/MessageDef/SubscribeResponseMessage.h b/src/app/MessageDef/SubscribeResponseMessage.h index b7651a7af38fb2..9d331f7d303020 100644 --- a/src/app/MessageDef/SubscribeResponseMessage.h +++ b/src/app/MessageDef/SubscribeResponseMessage.h @@ -74,7 +74,7 @@ class Builder : public MessageBuilder /** * @brief Mark the end of this SubscribeResponseMessage */ - SubscribeResponseMessage::Builder & EndOfSubscribeResponseMessage(); + CHIP_ERROR EndOfSubscribeResponseMessage(); }; } // namespace SubscribeResponseMessage } // namespace app diff --git a/src/app/MessageDef/WriteRequestMessage.cpp b/src/app/MessageDef/WriteRequestMessage.cpp index 36f78dc921b7d2..8cf3d4048d9b2f 100644 --- a/src/app/MessageDef/WriteRequestMessage.cpp +++ b/src/app/MessageDef/WriteRequestMessage.cpp @@ -172,7 +172,7 @@ WriteRequestMessage::Builder & WriteRequestMessage::Builder::MoreChunkedMessages return *this; } -WriteRequestMessage::Builder & WriteRequestMessage::Builder::EndOfWriteRequestMessage() +CHIP_ERROR WriteRequestMessage::Builder::EndOfWriteRequestMessage() { if (mError == CHIP_NO_ERROR) { @@ -182,7 +182,7 @@ WriteRequestMessage::Builder & WriteRequestMessage::Builder::EndOfWriteRequestMe { EndOfContainer(); } - return *this; + return GetError(); } } // namespace app } // namespace chip diff --git a/src/app/MessageDef/WriteRequestMessage.h b/src/app/MessageDef/WriteRequestMessage.h index d083efbeca5f9e..b6a0bcb7ef613f 100644 --- a/src/app/MessageDef/WriteRequestMessage.h +++ b/src/app/MessageDef/WriteRequestMessage.h @@ -125,9 +125,9 @@ class Builder : public MessageBuilder /** * @brief Mark the end of this WriteRequestMessage * - * @return A reference to *this + * @return The builder's final status. */ - WriteRequestMessage::Builder & EndOfWriteRequestMessage(); + CHIP_ERROR EndOfWriteRequestMessage(); private: AttributeDataIBs::Builder mWriteRequests; diff --git a/src/app/MessageDef/WriteResponseMessage.cpp b/src/app/MessageDef/WriteResponseMessage.cpp index 56a4dd22584a33..4426d5e3db7c5e 100644 --- a/src/app/MessageDef/WriteResponseMessage.cpp +++ b/src/app/MessageDef/WriteResponseMessage.cpp @@ -98,7 +98,7 @@ AttributeStatusIBs::Builder & WriteResponseMessage::Builder::GetWriteResponses() return mWriteResponses; } -WriteResponseMessage::Builder & WriteResponseMessage::Builder::EndOfWriteResponseMessage() +CHIP_ERROR WriteResponseMessage::Builder::EndOfWriteResponseMessage() { if (mError == CHIP_NO_ERROR) { @@ -108,7 +108,7 @@ WriteResponseMessage::Builder & WriteResponseMessage::Builder::EndOfWriteRespons { EndOfContainer(); } - return *this; + return GetError(); } } // namespace app } // namespace chip diff --git a/src/app/MessageDef/WriteResponseMessage.h b/src/app/MessageDef/WriteResponseMessage.h index e57551e3c0c23b..a8857fb20b1060 100644 --- a/src/app/MessageDef/WriteResponseMessage.h +++ b/src/app/MessageDef/WriteResponseMessage.h @@ -71,9 +71,9 @@ class Builder : public MessageBuilder /** * @brief Mark the end of this WriteResponseMessage * - * @return A reference to *this + * @return The builder's final status. */ - WriteResponseMessage::Builder & EndOfWriteResponseMessage(); + CHIP_ERROR EndOfWriteResponseMessage(); private: AttributeStatusIBs::Builder mWriteResponses; diff --git a/src/app/ReadClient.cpp b/src/app/ReadClient.cpp index 6ccc913f38b8db..acfa30a5e0701d 100644 --- a/src/app/ReadClient.cpp +++ b/src/app/ReadClient.cpp @@ -306,14 +306,14 @@ CHIP_ERROR ReadClient::SendReadRequest(ReadPrepareParams & aReadPrepareParams) ReturnErrorOnFailure(dataVersionFilterListBuilder.GetWriter()->UnreserveBuffer(kReservedSizeForTLVEncodingOverhead)); if (encodedDataVersionList) { - ReturnErrorOnFailure(dataVersionFilterListBuilder.EndOfDataVersionFilterIBs().GetError()); + ReturnErrorOnFailure(dataVersionFilterListBuilder.EndOfDataVersionFilterIBs()); } else { request.Rollback(backup); } - ReturnErrorOnFailure(request.EndOfReadRequestMessage().GetError()); + ReturnErrorOnFailure(request.EndOfReadRequestMessage()); ReturnErrorOnFailure(writer.Finalize(&msgBuf)); VerifyOrReturnError(aReadPrepareParams.mSessionHolder, CHIP_ERROR_MISSING_SECURE_SESSION); @@ -351,8 +351,7 @@ CHIP_ERROR ReadClient::GenerateEventPaths(EventPathIBs::Builder & aEventPathsBui ReturnErrorOnFailure(path.Encode(event)); } - aEventPathsBuilder.EndOfEventPaths(); - return aEventPathsBuilder.GetError(); + return aEventPathsBuilder.EndOfEventPaths(); } CHIP_ERROR ReadClient::GenerateAttributePaths(AttributePathIBs::Builder & aAttributePathIBsBuilder, @@ -366,8 +365,7 @@ CHIP_ERROR ReadClient::GenerateAttributePaths(AttributePathIBs::Builder & aAttri ReturnErrorOnFailure(path.Encode(attribute)); } - aAttributePathIBsBuilder.EndOfAttributePathIBs(); - return aAttributePathIBsBuilder.GetError(); + return aAttributePathIBsBuilder.EndOfAttributePathIBs(); } CHIP_ERROR ReadClient::BuildDataVersionFilterList(DataVersionFilterIBs::Builder & aDataVersionFilterIBsBuilder, @@ -399,9 +397,9 @@ CHIP_ERROR ReadClient::BuildDataVersionFilterList(DataVersionFilterIBs::Builder ReturnErrorOnFailure(aDataVersionFilterIBsBuilder.GetError()); ClusterPathIB::Builder & path = filterIB.CreatePath(); ReturnErrorOnFailure(filterIB.GetError()); - ReturnErrorOnFailure(path.Endpoint(filter.mEndpointId).Cluster(filter.mClusterId).EndOfClusterPathIB().GetError()); + ReturnErrorOnFailure(path.Endpoint(filter.mEndpointId).Cluster(filter.mClusterId).EndOfClusterPathIB()); VerifyOrReturnError(filter.mDataVersion.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(filterIB.DataVersion(filter.mDataVersion.Value()).EndOfDataVersionFilterIB().GetError()); + ReturnErrorOnFailure(filterIB.DataVersion(filter.mDataVersion.Value()).EndOfDataVersionFilterIB()); aEncodedDataVersionList = true; } return CHIP_NO_ERROR; @@ -1014,14 +1012,14 @@ CHIP_ERROR ReadClient::SendSubscribeRequestImpl(const ReadPrepareParams & aReadP ReturnErrorOnFailure(dataVersionFilterListBuilder.GetWriter()->UnreserveBuffer(kReservedSizeForTLVEncodingOverhead)); if (encodedDataVersionList) { - ReturnErrorOnFailure(dataVersionFilterListBuilder.EndOfDataVersionFilterIBs().GetError()); + ReturnErrorOnFailure(dataVersionFilterListBuilder.EndOfDataVersionFilterIBs()); } else { request.Rollback(backup); } - ReturnErrorOnFailure(request.EndOfSubscribeRequestMessage().GetError()); + ReturnErrorOnFailure(request.EndOfSubscribeRequestMessage()); ReturnErrorOnFailure(writer.Finalize(&msgBuf)); VerifyOrReturnError(aReadPrepareParams.mSessionHolder, CHIP_ERROR_MISSING_SECURE_SESSION); diff --git a/src/app/ReadHandler.cpp b/src/app/ReadHandler.cpp index ef594e3badd163..1c2511b497b0f2 100644 --- a/src/app/ReadHandler.cpp +++ b/src/app/ReadHandler.cpp @@ -629,8 +629,7 @@ CHIP_ERROR ReadHandler::SendSubscribeResponse() SubscribeResponseMessage::Builder response; ReturnErrorOnFailure(response.Init(&writer)); - response.SubscriptionId(mSubscriptionId).MaxInterval(mMaxInterval).EndOfSubscribeResponseMessage(); - ReturnErrorOnFailure(response.GetError()); + ReturnErrorOnFailure(response.SubscriptionId(mSubscriptionId).MaxInterval(mMaxInterval).EndOfSubscribeResponseMessage()); ReturnErrorOnFailure(writer.Finalize(&packet)); VerifyOrReturnLogError(mExchangeCtx, CHIP_ERROR_INCORRECT_STATE); diff --git a/src/app/WriteClient.cpp b/src/app/WriteClient.cpp index 3391fd63579bb7..b8ddf5400fcb9e 100644 --- a/src/app/WriteClient.cpp +++ b/src/app/WriteClient.cpp @@ -118,7 +118,7 @@ CHIP_ERROR WriteClient::PrepareAttributeIB(const ConcreteDataAttributePath & aPa return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } } - ReturnErrorOnFailure(path.EndOfAttributePathIB().GetError()); + ReturnErrorOnFailure(path.EndOfAttributePathIB()); return CHIP_NO_ERROR; } @@ -126,8 +126,7 @@ CHIP_ERROR WriteClient::PrepareAttributeIB(const ConcreteDataAttributePath & aPa CHIP_ERROR WriteClient::FinishAttributeIB() { AttributeDataIB::Builder & attributeDataIB = mWriteRequestBuilder.GetWriteRequests().GetAttributeDataIBBuilder(); - attributeDataIB.EndOfAttributeDataIB(); - ReturnErrorOnFailure(attributeDataIB.GetError()); + ReturnErrorOnFailure(attributeDataIB.EndOfAttributeDataIB()); MoveToState(State::AddAttribute); return CHIP_NO_ERROR; } @@ -146,11 +145,9 @@ CHIP_ERROR WriteClient::FinalizeMessage(bool aHasMoreChunks) ReturnErrorCodeIf(writer == nullptr, CHIP_ERROR_INCORRECT_STATE); ReturnErrorOnFailure(writer->UnreserveBuffer(kReservedSizeForTLVEncodingOverhead)); - AttributeDataIBs::Builder & attributeDataIBsBuilder = mWriteRequestBuilder.GetWriteRequests().EndOfAttributeDataIBs(); - ReturnErrorOnFailure(attributeDataIBsBuilder.GetError()); + ReturnErrorOnFailure(mWriteRequestBuilder.GetWriteRequests().EndOfAttributeDataIBs()); - mWriteRequestBuilder.MoreChunkedMessages(aHasMoreChunks).EndOfWriteRequestMessage(); - ReturnErrorOnFailure(mWriteRequestBuilder.GetError()); + ReturnErrorOnFailure(mWriteRequestBuilder.MoreChunkedMessages(aHasMoreChunks).EndOfWriteRequestMessage()); ReturnErrorOnFailure(mMessageWriter.Finalize(&packet)); mChunks.AddToEnd(std::move(packet)); return CHIP_NO_ERROR; diff --git a/src/app/WriteHandler.cpp b/src/app/WriteHandler.cpp index b4dca470a33219..d262dd522d5525 100644 --- a/src/app/WriteHandler.cpp +++ b/src/app/WriteHandler.cpp @@ -159,10 +159,8 @@ void WriteHandler::OnResponseTimeout(Messaging::ExchangeContext * apExchangeCont CHIP_ERROR WriteHandler::FinalizeMessage(System::PacketBufferTLVWriter && aMessageWriter, System::PacketBufferHandle & packet) { VerifyOrReturnError(mState == State::AddStatus, CHIP_ERROR_INCORRECT_STATE); - AttributeStatusIBs::Builder & attributeStatusIBs = mWriteResponseBuilder.GetWriteResponses().EndOfAttributeStatuses(); - ReturnErrorOnFailure(attributeStatusIBs.GetError()); - mWriteResponseBuilder.EndOfWriteResponseMessage(); - ReturnErrorOnFailure(mWriteResponseBuilder.GetError()); + ReturnErrorOnFailure(mWriteResponseBuilder.GetWriteResponses().EndOfAttributeStatuses()); + ReturnErrorOnFailure(mWriteResponseBuilder.EndOfWriteResponseMessage()); ReturnErrorOnFailure(aMessageWriter.Finalize(&packet)); return CHIP_NO_ERROR; } @@ -639,8 +637,7 @@ CHIP_ERROR WriteHandler::AddStatus(const ConcreteDataAttributePath & aPath, cons ReturnErrorOnFailure(attributeStatusIB.GetError()); statusIBBuilder.EncodeStatusIB(aStatus); ReturnErrorOnFailure(statusIBBuilder.GetError()); - attributeStatusIB.EndOfAttributeStatusIB(); - ReturnErrorOnFailure(attributeStatusIB.GetError()); + ReturnErrorOnFailure(attributeStatusIB.EndOfAttributeStatusIB()); MoveToState(State::AddStatus); return CHIP_NO_ERROR; diff --git a/src/app/reporting/Engine.cpp b/src/app/reporting/Engine.cpp index 757f32126a0fa2..909d3a8022445b 100644 --- a/src/app/reporting/Engine.cpp +++ b/src/app/reporting/Engine.cpp @@ -260,8 +260,7 @@ CHIP_ERROR Engine::BuildSingleReportDataAttributeReportIBs(ReportDataMessage::Bu { attributeReportIBs.GetWriter()->UnreserveBuffer(kReservedSizeEndOfReportIBs); - attributeReportIBs.EndOfAttributeReportIBs(); - err = attributeReportIBs.GetError(); + err = attributeReportIBs.EndOfAttributeReportIBs(); // // We reserved space for this earlier - consequently, the call to end the ReportIBs should @@ -413,8 +412,7 @@ CHIP_ERROR Engine::BuildSingleReportDataEventReports(ReportDataMessage::Builder } SuccessOrExit(err = eventReportIBs.GetWriter()->UnreserveBuffer(kReservedSizeEndOfReportIBs)); - eventReportIBs.EndOfEventReports(); - SuccessOrExit(err = eventReportIBs.GetError()); + SuccessOrExit(err = eventReportIBs.EndOfEventReports()); } ChipLogDetail(DataManagement, "Fetched %u events", static_cast(eventCount)); diff --git a/src/app/tests/TestCommandInteraction.cpp b/src/app/tests/TestCommandInteraction.cpp index 800f304854fbd4..d90ce4d97b3d7c 100644 --- a/src/app/tests/TestCommandInteraction.cpp +++ b/src/app/tests/TestCommandInteraction.cpp @@ -1364,12 +1364,11 @@ void TestCommandInteraction::TestCommandHandlerRejectMultipleCommands(nlTestSuit NL_TEST_ASSERT(apSuite, CHIP_NO_ERROR == invokeRequest.GetWriter()->PutBoolean(chip::TLV::ContextTag(1), true)); NL_TEST_ASSERT(apSuite, CHIP_NO_ERROR == invokeRequest.GetWriter()->EndContainer(commandSender.mDataElementContainerType)); - NL_TEST_ASSERT(apSuite, CHIP_NO_ERROR == invokeRequest.EndOfCommandDataIB().GetError()); + NL_TEST_ASSERT(apSuite, CHIP_NO_ERROR == invokeRequest.EndOfCommandDataIB()); } - NL_TEST_ASSERT(apSuite, - CHIP_NO_ERROR == commandSender.mInvokeRequestBuilder.GetInvokeRequests().EndOfInvokeRequests().GetError()); - NL_TEST_ASSERT(apSuite, CHIP_NO_ERROR == commandSender.mInvokeRequestBuilder.EndOfInvokeRequestMessage().GetError()); + NL_TEST_ASSERT(apSuite, CHIP_NO_ERROR == commandSender.mInvokeRequestBuilder.GetInvokeRequests().EndOfInvokeRequests()); + NL_TEST_ASSERT(apSuite, CHIP_NO_ERROR == commandSender.mInvokeRequestBuilder.EndOfInvokeRequestMessage()); commandSender.MoveToState(app::CommandSender::State::AddedCommand); } diff --git a/src/app/tests/TestMessageDef.cpp b/src/app/tests/TestMessageDef.cpp index 78f4be39b1b9a6..16f7db862ff692 100644 --- a/src/app/tests/TestMessageDef.cpp +++ b/src/app/tests/TestMessageDef.cpp @@ -232,14 +232,13 @@ void ParseEventFilters(nlTestSuite * apSuite, chip::TLV::TLVReader & aReader) void BuildAttributePathIB(nlTestSuite * apSuite, AttributePathIB::Builder & aAttributePathBuilder) { CHIP_ERROR err = CHIP_NO_ERROR; - aAttributePathBuilder.EnableTagCompression(false) - .Node(1) - .Endpoint(2) - .Cluster(3) - .Attribute(4) - .ListIndex(5) - .EndOfAttributePathIB(); - err = aAttributePathBuilder.GetError(); + err = aAttributePathBuilder.EnableTagCompression(false) + .Node(1) + .Endpoint(2) + .Cluster(3) + .Attribute(4) + .ListIndex(5) + .EndOfAttributePathIB(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); } diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index f893aa93b5e50b..249e5e991f83fa 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -279,9 +279,8 @@ CHIP_ERROR ReadSingleClusterData(const Access::SubjectDescriptor & aSubjectDescr ReturnErrorOnFailure(attributeStatus.GetError()); errorStatus.EncodeStatusIB(StatusIB(Protocols::InteractionModel::Status::UnsupportedAttribute)); ReturnErrorOnFailure(errorStatus.GetError()); - attributeStatus.EndOfAttributeStatusIB(); - ReturnErrorOnFailure(attributeStatus.GetError()); - return attributeReport.EndOfAttributeReportIB().GetError(); + ReturnErrorOnFailure(attributeStatus.EndOfAttributeStatusIB()); + return attributeReport.EndOfAttributeReportIB(); } return AttributeValueEncoder(aAttributeReports, 0, aPath, 0).Encode(kTestFieldValue1); @@ -3867,7 +3866,7 @@ void TestReadInteraction::TestReadHandlerMalformedReadRequest2(nlTestSuite * apS chip::app::InitWriterWithSpaceReserved(writer, 0); err = request.Init(&writer); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - NL_TEST_ASSERT(apSuite, request.EndOfReadRequestMessage().GetError() == CHIP_NO_ERROR); + NL_TEST_ASSERT(apSuite, request.EndOfReadRequestMessage() == CHIP_NO_ERROR); err = writer.Finalize(&msgBuf); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); auto exchange = readClient.mpExchangeMgr->NewContext(readPrepareParams.mSessionHolder.Get().Value(), &readClient); diff --git a/src/app/tests/TestWriteInteraction.cpp b/src/app/tests/TestWriteInteraction.cpp index 98765789e317d3..95cb83eaf21d65 100644 --- a/src/app/tests/TestWriteInteraction.cpp +++ b/src/app/tests/TestWriteInteraction.cpp @@ -160,13 +160,12 @@ void TestWriteInteraction::GenerateWriteRequest(nlTestSuite * apSuite, void * ap NL_TEST_ASSERT(apSuite, attributeDataIBBuilder.GetError() == CHIP_NO_ERROR); AttributePathIB::Builder & attributePathBuilder = attributeDataIBBuilder.CreatePath(); NL_TEST_ASSERT(apSuite, attributePathBuilder.GetError() == CHIP_NO_ERROR); - attributePathBuilder.Node(1) - .Endpoint(2) - .Cluster(3) - .Attribute(4) - .ListIndex(DataModel::Nullable()) - .EndOfAttributePathIB(); - err = attributePathBuilder.GetError(); + err = attributePathBuilder.Node(1) + .Endpoint(2) + .Cluster(3) + .Attribute(4) + .ListIndex(DataModel::Nullable()) + .EndOfAttributePathIB(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); // Construct attribute data @@ -211,13 +210,12 @@ void TestWriteInteraction::GenerateWriteResponse(nlTestSuite * apSuite, void * a AttributePathIB::Builder & attributePathBuilder = attributeStatusIBBuilder.CreatePath(); NL_TEST_ASSERT(apSuite, attributePathBuilder.GetError() == CHIP_NO_ERROR); - attributePathBuilder.Node(1) - .Endpoint(2) - .Cluster(3) - .Attribute(4) - .ListIndex(DataModel::Nullable()) - .EndOfAttributePathIB(); - err = attributePathBuilder.GetError(); + err = attributePathBuilder.Node(1) + .Endpoint(2) + .Cluster(3) + .Attribute(4) + .ListIndex(DataModel::Nullable()) + .EndOfAttributePathIB(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); StatusIB::Builder & statusIBBuilder = attributeStatusIBBuilder.CreateErrorStatus(); diff --git a/src/app/tests/integration/chip_im_initiator.cpp b/src/app/tests/integration/chip_im_initiator.cpp index bbc65055c9ebb7..f9160e2326bc75 100644 --- a/src/app/tests/integration/chip_im_initiator.cpp +++ b/src/app/tests/integration/chip_im_initiator.cpp @@ -644,7 +644,7 @@ CHIP_ERROR ReadSingleClusterData(const Access::SubjectDescriptor & aSubjectDescr ReturnErrorOnFailure(errorStatus.GetError()); attributeStatus.EndOfAttributeStatusIB(); ReturnErrorOnFailure(attributeStatus.GetError()); - return attributeReport.EndOfAttributeReportIB().GetError(); + return attributeReport.EndOfAttributeReportIB(); } const EmberAfAttributeMetadata * GetAttributeMetadata(const ConcreteAttributePath & aConcreteClusterPath) diff --git a/src/app/util/ember-compatibility-functions.cpp b/src/app/util/ember-compatibility-functions.cpp index d18e284bd6f134..c28eb8152a1f75 100644 --- a/src/app/util/ember-compatibility-functions.cpp +++ b/src/app/util/ember-compatibility-functions.cpp @@ -282,8 +282,8 @@ void IncreaseClusterDataVersion(const ConcreteClusterPath & aConcreteClusterPath CHIP_ERROR SendSuccessStatus(AttributeReportIB::Builder & aAttributeReport, AttributeDataIB::Builder & aAttributeDataIBBuilder) { - ReturnErrorOnFailure(aAttributeDataIBBuilder.EndOfAttributeDataIB().GetError()); - return aAttributeReport.EndOfAttributeReportIB().GetError(); + ReturnErrorOnFailure(aAttributeDataIBBuilder.EndOfAttributeDataIB()); + return aAttributeReport.EndOfAttributeReportIB(); } CHIP_ERROR SendFailureStatus(const ConcreteAttributePath & aPath, AttributeReportIBs::Builder & aAttributeReports, @@ -598,11 +598,11 @@ CHIP_ERROR ReadSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, b AttributePathIB::Builder & attributePathIBBuilder = attributeDataIBBuilder.CreatePath(); ReturnErrorOnFailure(attributeDataIBBuilder.GetError()); - attributePathIBBuilder.Endpoint(aPath.mEndpointId) - .Cluster(aPath.mClusterId) - .Attribute(aPath.mAttributeId) - .EndOfAttributePathIB(); - ReturnErrorOnFailure(attributePathIBBuilder.GetError()); + CHIP_ERROR err = attributePathIBBuilder.Endpoint(aPath.mEndpointId) + .Cluster(aPath.mClusterId) + .Attribute(aPath.mAttributeId) + .EndOfAttributePathIB(); + ReturnErrorOnFailure(err); EmberAfAttributeSearchRecord record; record.endpoint = aPath.mEndpointId; diff --git a/src/app/util/mock/attribute-storage.cpp b/src/app/util/mock/attribute-storage.cpp index edda7d6993f7eb..a1925e7e70158c 100644 --- a/src/app/util/mock/attribute-storage.cpp +++ b/src/app/util/mock/attribute-storage.cpp @@ -313,9 +313,8 @@ CHIP_ERROR ReadSingleMockClusterData(FabricIndex aAccessingFabricIndex, const Co ReturnErrorOnFailure(attributeStatus.GetError()); errorStatus.EncodeStatusIB(StatusIB(Protocols::InteractionModel::Status::UnsupportedAttribute)); ReturnErrorOnFailure(errorStatus.GetError()); - attributeStatus.EndOfAttributeStatusIB(); - ReturnErrorOnFailure(attributeStatus.GetError()); - return attributeReport.EndOfAttributeReportIB().GetError(); + ReturnErrorOnFailure(attributeStatus.EndOfAttributeStatusIB()); + return attributeReport.EndOfAttributeReportIB(); } // Attribute 4 acts as a large attribute to trigger chunking. @@ -374,9 +373,8 @@ CHIP_ERROR ReadSingleMockClusterData(FabricIndex aAccessingFabricIndex, const Co return CHIP_ERROR_KEY_NOT_FOUND; } - attributeData.EndOfAttributeDataIB(); - ReturnErrorOnFailure(attributeData.GetError()); - return attributeReport.EndOfAttributeReportIB().GetError(); + ReturnErrorOnFailure(attributeData.EndOfAttributeDataIB()); + return attributeReport.EndOfAttributeReportIB(); } } // namespace Test diff --git a/src/controller/tests/data_model/TestRead.cpp b/src/controller/tests/data_model/TestRead.cpp index aa9dd0218ed50f..b72c1fd8a0d6df 100644 --- a/src/controller/tests/data_model/TestRead.cpp +++ b/src/controller/tests/data_model/TestRead.cpp @@ -191,8 +191,8 @@ CHIP_ERROR ReadSingleClusterData(const Access::SubjectDescriptor & aSubjectDescr ReturnErrorOnFailure(attributePath.GetError()); ReturnErrorOnFailure(DataModel::Encode(*(attributeData.GetWriter()), TLV::ContextTag(AttributeDataIB::Tag::kData), value)); - ReturnErrorOnFailure(attributeData.EndOfAttributeDataIB().GetError()); - return attributeReport.EndOfAttributeReportIB().GetError(); + ReturnErrorOnFailure(attributeData.EndOfAttributeDataIB()); + return attributeReport.EndOfAttributeReportIB(); } for (size_t i = 0; i < (responseDirective == kSendTwoDataErrors ? 2 : 1); ++i) @@ -209,7 +209,7 @@ CHIP_ERROR ReadSingleClusterData(const Access::SubjectDescriptor & aSubjectDescr errorStatus.EncodeStatusIB(StatusIB(Protocols::InteractionModel::Status::Busy)); attributeStatus.EndOfAttributeStatusIB(); ReturnErrorOnFailure(attributeStatus.GetError()); - ReturnErrorOnFailure(attributeReport.EndOfAttributeReportIB().GetError()); + ReturnErrorOnFailure(attributeReport.EndOfAttributeReportIB()); } return CHIP_NO_ERROR; From 76baa662a0fd017c8039d666cd20b45e77871757 Mon Sep 17 00:00:00 2001 From: Alex Tsitsiura Date: Mon, 29 May 2023 19:19:24 +0300 Subject: [PATCH 07/15] [Telink] Fix TC-OPCREDS-3.6 and prevent writing to NVS during factory reset (#26784) * [Telink] Added storage reset in case of fabric count == 0 Signed-off-by: Misha Tkachenko * [Telink] Disable openthread before reset to prevent writing to NVS Signed-off-by: Misha Tkachenko * [Telink] remove commented code * Restyled by clang-format * [Telink]: Added a clear explanation for preventing NVS writing on shutdown Signed-off-by: Misha Tkachenko * [Telink]: Updated OpenThread finalization function Signed-off-by: Misha Tkachenko * Restyled by whitespace --------- Signed-off-by: Misha Tkachenko Co-authored-by: Misha Tkachenko Co-authored-by: Restyled.io Co-authored-by: Misha Tkachenko <36621698+mishadesh@users.noreply.github.com> --- .../telink/common/src/AppTaskCommon.cpp | 56 ++++++++++++++++++- .../telink/ThreadStackManagerImpl.cpp | 5 ++ src/platform/telink/ThreadStackManagerImpl.h | 1 + 3 files changed, 61 insertions(+), 1 deletion(-) diff --git a/examples/platform/telink/common/src/AppTaskCommon.cpp b/examples/platform/telink/common/src/AppTaskCommon.cpp index 4297d3ae3d4bad..ec45f9241d46e0 100644 --- a/examples/platform/telink/common/src/AppTaskCommon.cpp +++ b/examples/platform/telink/common/src/AppTaskCommon.cpp @@ -38,6 +38,11 @@ #include #endif +#ifdef CONFIG_CHIP_FACTORY_RESET_ERASE_NVS +#include +#include +#endif + using namespace chip::app; LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); @@ -118,7 +123,47 @@ class AppFabricTableDelegate : public FabricTable::Delegate { if (chip::Server::GetInstance().GetFabricTable().FabricCount() == 0) { - chip::Server::GetInstance().ScheduleFactoryReset(); + ChipLogProgress(DeviceLayer, "Performing erasing of settings partition"); + +#ifdef CONFIG_CHIP_FACTORY_RESET_ERASE_NVS + void * storage = nullptr; + int status = settings_storage_get(&storage); + + if (status == 0) + { + status = nvs_clear(static_cast(storage)); + } + + if (!status) + { + status = nvs_mount(static_cast(storage)); + } + + if (status) + { + ChipLogError(DeviceLayer, "Storage clearance failed: %d", status); + } +#else + const CHIP_ERROR err = PersistedStorage::KeyValueStoreMgrImpl().DoFactoryReset(); + + if (err != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "Factory reset failed: %" CHIP_ERROR_FORMAT, err.Format()); + } + + ConnectivityMgr().ErasePersistentInfo(); +#endif + } + } +}; + +class PlatformMgrDelegate : public DeviceLayer::PlatformManagerDelegate +{ + void OnShutDown() override + { + if (ThreadStackManagerImpl().IsThreadEnabled()) + { + ThreadStackManagerImpl().Finalize(); } } }; @@ -240,6 +285,15 @@ CHIP_ERROR AppTaskCommon::InitCommonParts(void) chip::app::InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(&GetICDUtil()); #endif + // We need to disable OpenThread to prevent writing to the NVS storage when factory reset occurs + // The OpenThread thread is running during factory reset. The nvs_clear function is called during + // factory reset, which makes the NVS storage innaccessible, but the OpenThread knows nothing + // about this and tries to store the parameters to NVS. Because of this the OpenThread need to be + // shut down before NVS. This delegate fixes the issue "Failed to store setting , ret -13", + // which means that the NVS is already disabled. + // For this the OnShutdown function is used + PlatformMgr().SetDelegate(new PlatformMgrDelegate); + // Add CHIP event handler and start CHIP thread. // Note that all the initialization code should happen prior to this point to avoid data races // between the main and the CHIP threads. diff --git a/src/platform/telink/ThreadStackManagerImpl.cpp b/src/platform/telink/ThreadStackManagerImpl.cpp index d6657c4ef010e9..e66735b1de68f2 100644 --- a/src/platform/telink/ThreadStackManagerImpl.cpp +++ b/src/platform/telink/ThreadStackManagerImpl.cpp @@ -136,5 +136,10 @@ CHIP_ERROR ThreadStackManagerImpl::_StartThreadScan(NetworkCommissioning::Thread return CHIP_NO_ERROR; } +void ThreadStackManagerImpl::Finalize(void) +{ + otInstanceFinalize(openthread_get_default_instance()); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/telink/ThreadStackManagerImpl.h b/src/platform/telink/ThreadStackManagerImpl.h index 870ea17c90eaed..508382332072c6 100644 --- a/src/platform/telink/ThreadStackManagerImpl.h +++ b/src/platform/telink/ThreadStackManagerImpl.h @@ -64,6 +64,7 @@ class ThreadStackManagerImpl final : public ThreadStackManager, CHIP_ERROR _InitThreadStack(); void SetRadioBlocked(bool state) { mRadioBlocked = state; } bool IsReadyToAttach(void) const { return mReadyToAttach; } + void Finalize(void); protected: // ===== Methods that implement the ThreadStackManager abstract interface. From d0d154c17cf3132e06235176d34b14bea32c3c82 Mon Sep 17 00:00:00 2001 From: Jean-Francois Penven <67962328+jepenven-silabs@users.noreply.github.com> Date: Mon, 29 May 2023 13:14:11 -0400 Subject: [PATCH 08/15] Fix limit of groups (#26837) --- examples/chip-tool/commands/common/CHIPCommand.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/chip-tool/commands/common/CHIPCommand.h b/examples/chip-tool/commands/common/CHIPCommand.h index a50fded4432244..76b01b40434ce3 100644 --- a/examples/chip-tool/commands/common/CHIPCommand.h +++ b/examples/chip-tool/commands/common/CHIPCommand.h @@ -57,8 +57,8 @@ class CHIPCommand : public Command using PeerId = ::chip::PeerId; using PeerAddress = ::chip::Transport::PeerAddress; - static constexpr uint16_t kMaxGroupsPerFabric = 5; - static constexpr uint16_t kMaxGroupKeysPerFabric = 8; + static constexpr uint16_t kMaxGroupsPerFabric = 50; + static constexpr uint16_t kMaxGroupKeysPerFabric = 25; CHIPCommand(const char * commandName, CredentialIssuerCommands * credIssuerCmds, const char * helpText = nullptr) : Command(commandName, helpText), mCredIssuerCmds(credIssuerCmds) From 2d26cad9a60d2ddcff784e493acb0e69dc0972c7 Mon Sep 17 00:00:00 2001 From: pankore <86098180+pankore@users.noreply.github.com> Date: Tue, 30 May 2023 01:28:31 +0800 Subject: [PATCH 09/15] [Shell] Add vTaskDelay to release CPU usage (#26864) * [Shell] Add vTaskDelay to free cpu * add delay in matter shell loop --- src/lib/shell/MainLoopAmeba.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/shell/MainLoopAmeba.cpp b/src/lib/shell/MainLoopAmeba.cpp index 0526980e7f6080..b8476a5dd9a9f0 100644 --- a/src/lib/shell/MainLoopAmeba.cpp +++ b/src/lib/shell/MainLoopAmeba.cpp @@ -146,6 +146,7 @@ void Engine::RunMainLoop() ProcessShellLine(reinterpret_cast(line)); #endif } + vTaskDelay(pdMS_TO_TICKS(10)); // delay 10ms } } From 6fcc57498aa0c67922e7086a95f09d21359ac43d Mon Sep 17 00:00:00 2001 From: yzm157 <35371923+yzm157@users.noreply.github.com> Date: Tue, 30 May 2023 01:29:20 +0800 Subject: [PATCH 10/15] - fixed error event priority level (#26872) - fixed the EventHeader could not be generated when unsuccessful - fixed memory leak --- .../python/chip/clusters/Attribute.py | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/controller/python/chip/clusters/Attribute.py b/src/controller/python/chip/clusters/Attribute.py index d007253a10cbf0..5967cbc386de8f 100644 --- a/src/controller/python/chip/clusters/Attribute.py +++ b/src/controller/python/chip/clusters/Attribute.py @@ -47,9 +47,9 @@ class EventTimestampType(Enum): @unique class EventPriority(Enum): - DEBUG = 1 - INFO = 2 - CRITICAL = 3 + DEBUG = 0 + INFO = 1 + CRITICAL = 2 @dataclass @@ -535,7 +535,7 @@ def Callback(transaction: SubscriptionTransaction, errorEncountered: int, nextRe self._onResubscriptionAttemptedCb = callback self._onResubscriptionAttemptedCb_isAsync = isAsync - def SetResubscriptionSucceededCallback(self, callback: Callback[[SubscriptionTransaction], None], isAsync=False): + def SetResubscriptionSucceededCallback(self, callback: Callable[[SubscriptionTransaction], None], isAsync=False): ''' Sets the callback function that gets invoked when a re-subscription attempt succeeds. The callback is expected to have the following signature: @@ -886,8 +886,13 @@ def _OnReadAttributeDataCallback(closure, dataVersion: int, endpoint: int, clust def _OnReadEventDataCallback(closure, endpoint: int, cluster: int, event: c_uint64, number: int, priority: int, timestamp: int, timestampType: int, data, len, status): dataBytes = ctypes.string_at(data, len) path = EventPath(ClusterId=cluster, EventId=event) - closure.handleEventData(EventHeader( - EndpointId=endpoint, ClusterId=cluster, EventId=event, EventNumber=number, Priority=EventPriority(priority), Timestamp=timestamp, TimestampType=EventTimestampType(timestampType)), path, dataBytes[:], status) + + # EventHeader is valid only when successful + eventHeader = None + if status == chip.interaction_model.Status.Success.value: + eventHeader = EventHeader( + EndpointId=endpoint, ClusterId=cluster, EventId=event, EventNumber=number, Priority=EventPriority(priority), Timestamp=timestamp, TimestampType=EventTimestampType(timestampType)) + closure.handleEventData(eventHeader, path, dataBytes[:], status) @_OnSubscriptionEstablishedCallbackFunct @@ -1079,10 +1084,6 @@ def Read(future: Future, eventLoop, device, devCtrl, attributes: List[AttributeP path = chip.interaction_model.EventPathIBstruct.build(path) readargs.append(ctypes.c_char_p(path)) - ctypes.pythonapi.Py_IncRef(ctypes.py_object(transaction)) - minInterval = 0 - maxInterval = 0 - readClientObj = ctypes.POINTER(c_void_p)() readCallbackObj = ctypes.POINTER(c_void_p)() From 38013f3a125852cdd1824a57d93557f9d796c042 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 29 May 2023 13:30:05 -0400 Subject: [PATCH 11/15] Fix thread names for k32w's DiagnosticDataProvider. (#26892) The old code was copying in N-1 chars, then creating a string of length N from them, so ending up with a random byte in the string, which could lead to the string not being valid UTF-8. Fixes https://github.com/project-chip/connectedhomeip/issues/26891 --- src/platform/nxp/k32w/k32w0/DiagnosticDataProviderImpl.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/platform/nxp/k32w/k32w0/DiagnosticDataProviderImpl.cpp b/src/platform/nxp/k32w/k32w0/DiagnosticDataProviderImpl.cpp index 5d0f48b010680a..34ef40e47b1351 100644 --- a/src/platform/nxp/k32w/k32w0/DiagnosticDataProviderImpl.cpp +++ b/src/platform/nxp/k32w/k32w0/DiagnosticDataProviderImpl.cpp @@ -110,8 +110,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetThreadMetrics(ThreadMetrics ** threadM { ThreadMetrics * thread = (ThreadMetrics *) pvPortMalloc(sizeof(ThreadMetrics)); - strncpy(thread->NameBuf, taskStatusArray[x].pcTaskName, kMaxThreadNameLength - 1); - thread->NameBuf[kMaxThreadNameLength] = '\0'; + Platform::CopyString(thread->NameBuf, taskStatusArray[x].pcTaskName); thread->name.Emplace(CharSpan::fromCharString(thread->NameBuf)); thread->id = taskStatusArray[x].xTaskNumber; From 71744793fc7b35c8ef76b3f9f648fc48d064228e Mon Sep 17 00:00:00 2001 From: Alex Tsitsiura Date: Mon, 29 May 2023 20:47:03 +0300 Subject: [PATCH 12/15] [Telink]: Update button manager to new gpio IRQ system (#26785) * [Telink]: Updated button manager to new gpio IRQ system Signed-off-by: Misha Tkachenko * Restyled by whitespace * Restyled by clang-format * [Telink]: Fixed window app build Signed-off-by: Misha Tkachenko * Restyled by clang-format --------- Signed-off-by: Misha Tkachenko Co-authored-by: Misha Tkachenko Co-authored-by: Restyled.io --- .../telink/common/include/AppConfigCommon.h | 17 ++++-- .../telink/common/src/AppTaskCommon.cpp | 32 ++++++++--- .../telink/util/include/ButtonManager.h | 16 +++--- .../telink/util/src/ButtonManager.cpp | 57 ++++++++----------- examples/window-app/telink/src/AppTask.cpp | 21 +++++-- src/platform/telink/tlsr9518adk80d.overlay | 33 ++++++++++- 6 files changed, 117 insertions(+), 59 deletions(-) mode change 100755 => 100644 examples/platform/telink/common/include/AppConfigCommon.h diff --git a/examples/platform/telink/common/include/AppConfigCommon.h b/examples/platform/telink/common/include/AppConfigCommon.h old mode 100755 new mode 100644 index 6af3da6bb213cc..b8850a76b6301c --- a/examples/platform/telink/common/include/AppConfigCommon.h +++ b/examples/platform/telink/common/include/AppConfigCommon.h @@ -19,12 +19,17 @@ #pragma once // Buttons config -#define BUTTON_PORT DEVICE_DT_GET(DT_NODELABEL(gpioc)) - -#define BUTTON_PIN_1 2 -#define BUTTON_PIN_3 3 -#define BUTTON_PIN_4 1 -#define BUTTON_PIN_2 0 +#if CONFIG_CHIP_BUTTON_MANAGER_IRQ_MODE +#define BUTTON_FACTORY_RESET GPIO_DT_SPEC_GET(DT_NODELABEL(key_1), gpios) +#define BUTTON_BLE_START GPIO_DT_SPEC_GET(DT_NODELABEL(key_2), gpios) +#define BUTTON_THREAD_START GPIO_DT_SPEC_GET(DT_NODELABEL(key_3), gpios) +#define BUTTON_EXAMPLE_ACTION GPIO_DT_SPEC_GET(DT_NODELABEL(key_4), gpios) +#else +#define BUTTON_COL_1 GPIO_DT_SPEC_GET(DT_NODELABEL(key_matrix_col1), gpios) +#define BUTTON_COL_2 GPIO_DT_SPEC_GET(DT_NODELABEL(key_matrix_col2), gpios) +#define BUTTON_ROW_1 GPIO_DT_SPEC_GET(DT_NODELABEL(key_matrix_row1), gpios) +#define BUTTON_ROW_2 GPIO_DT_SPEC_GET(DT_NODELABEL(key_matrix_row2), gpios) +#endif // LEDs config #define LEDS_PORT DEVICE_DT_GET(DT_NODELABEL(gpiob)) diff --git a/examples/platform/telink/common/src/AppTaskCommon.cpp b/examples/platform/telink/common/src/AppTaskCommon.cpp index ec45f9241d46e0..6f9aae5f4ca5d6 100644 --- a/examples/platform/telink/common/src/AppTaskCommon.cpp +++ b/examples/platform/telink/common/src/AppTaskCommon.cpp @@ -52,6 +52,22 @@ constexpr int kFactoryResetCalcTimeout = 3000; constexpr int kFactoryResetTriggerCntr = 3; constexpr int kAppEventQueueSize = 10; +#if CONFIG_CHIP_BUTTON_MANAGER_IRQ_MODE +const struct gpio_dt_spec sFactoryResetButtonDt = BUTTON_FACTORY_RESET; +const struct gpio_dt_spec sBleStartButtonDt = BUTTON_BLE_START; +#if APP_USE_THREAD_START_BUTTON +const struct gpio_dt_spec sThreadStartButtonDt = BUTTON_THREAD_START; +#endif +#if APP_USE_EXAMPLE_START_BUTTON +const struct gpio_dt_spec sExampleActionButtonDt = BUTTON_EXAMPLE_ACTION; +#endif +#else +const struct gpio_dt_spec sButtonCol1Dt = BUTTON_COL_1; +const struct gpio_dt_spec sButtonCol2Dt = BUTTON_COL_2; +const struct gpio_dt_spec sButtonRow1Dt = BUTTON_ROW_1; +const struct gpio_dt_spec sButtonRow2Dt = BUTTON_ROW_2; +#endif + #if APP_USE_IDENTIFY_PWM constexpr uint32_t kIdentifyBlinkRateMs = 200; constexpr uint32_t kIdentifyOkayOnRateMs = 50; @@ -312,28 +328,28 @@ CHIP_ERROR AppTaskCommon::InitCommonParts(void) void AppTaskCommon::InitButtons(void) { #if CONFIG_CHIP_BUTTON_MANAGER_IRQ_MODE - sFactoryResetButton.Configure(BUTTON_PORT, BUTTON_PIN_1, FactoryResetButtonEventHandler); - sBleAdvStartButton.Configure(BUTTON_PORT, BUTTON_PIN_4, StartBleAdvButtonEventHandler); + sFactoryResetButton.Configure(&sFactoryResetButtonDt, FactoryResetButtonEventHandler); + sBleAdvStartButton.Configure(&sBleStartButtonDt, StartBleAdvButtonEventHandler); #if APP_USE_EXAMPLE_START_BUTTON if (ExampleActionEventHandler) { - sExampleActionButton.Configure(BUTTON_PORT, BUTTON_PIN_2, ExampleActionButtonEventHandler); + sExampleActionButton.Configure(&sExampleActionButtonDt, ExampleActionButtonEventHandler); } #endif #if APP_USE_THREAD_START_BUTTON - sThreadStartButton.Configure(BUTTON_PORT, BUTTON_PIN_3, StartThreadButtonEventHandler); + sThreadStartButton.Configure(&sThreadStartButtonDt, StartThreadButtonEventHandler); #endif #else - sFactoryResetButton.Configure(BUTTON_PORT, BUTTON_PIN_3, BUTTON_PIN_1, FactoryResetButtonEventHandler); - sBleAdvStartButton.Configure(BUTTON_PORT, BUTTON_PIN_4, BUTTON_PIN_2, StartBleAdvButtonEventHandler); + sFactoryResetButton.Configure(&sButtonRow1Dt, &sButtonCol1Dt, FactoryResetButtonEventHandler); + sBleAdvStartButton.Configure(&sButtonRow2Dt, &sButtonCol2Dt, StartBleAdvButtonEventHandler); #if APP_USE_EXAMPLE_START_BUTTON if (ExampleActionEventHandler) { - sExampleActionButton.Configure(BUTTON_PORT, BUTTON_PIN_4, BUTTON_PIN_1, ExampleActionButtonEventHandler); + sExampleActionButton.Configure(&sButtonRow1Dt, &sButtonCol2Dt, ExampleActionButtonEventHandler); } #endif #if APP_USE_THREAD_START_BUTTON - sThreadStartButton.Configure(BUTTON_PORT, BUTTON_PIN_3, BUTTON_PIN_2, StartThreadButtonEventHandler); + sThreadStartButton.Configure(&sButtonRow2Dt, &sButtonCol1Dt, StartThreadButtonEventHandler); #endif #endif diff --git a/examples/platform/telink/util/include/ButtonManager.h b/examples/platform/telink/util/include/ButtonManager.h index d78837477e1918..e9ea1b60b17816 100644 --- a/examples/platform/telink/util/include/ButtonManager.h +++ b/examples/platform/telink/util/include/ButtonManager.h @@ -26,20 +26,20 @@ class Button { public: - void Configure(const struct device * port, gpio_pin_t outPin, gpio_pin_t inPin, void (*callback)(void)); - void Configure(const struct device * port, gpio_pin_t inPin, void (*callback)(void)); + void Configure(const gpio_dt_spec * input_button_dt, const gpio_dt_spec * output_button_dt, void (*callback)(void)); + void Configure(const gpio_dt_spec * input_button_dt, void (*callback)(void)); void Poll(Button * previous); - void PollIRQ(void); + void PollIRQ(const struct device * dev, uint32_t pins); void SetCallback(void (*callback)(void)); private: int Init(void); int Deinit(void); - const struct device * mPort; - gpio_pin_t mOutPin; - gpio_pin_t mInPin; - int mPreviousState = STATE_LOW; + const struct gpio_dt_spec * mInput_button; + const struct gpio_dt_spec * mOutput_matrix_pin; + int mPreviousState = STATE_LOW; + struct gpio_callback mButton_cb_data; void (*mCallback)(void) = NULL; }; @@ -48,7 +48,7 @@ class ButtonManager public: void Init(void); void Poll(void); - void PollIRQ(void); + void PollIRQ(const struct device * dev, uint32_t pins); void AddButton(Button & button); void SetCallback(unsigned int index, void (*callback)(void)); diff --git a/examples/platform/telink/util/src/ButtonManager.cpp b/examples/platform/telink/util/src/ButtonManager.cpp index bdfa0b812a1ad4..3805a2640e193c 100644 --- a/examples/platform/telink/util/src/ButtonManager.cpp +++ b/examples/platform/telink/util/src/ButtonManager.cpp @@ -29,21 +29,19 @@ LOG_MODULE_REGISTER(ButtonManager); ButtonManager ButtonManager::sInstance; #if CONFIG_CHIP_BUTTON_MANAGER_IRQ_MODE -static struct gpio_callback button_cb_data; void button_pressed(const struct device * dev, struct gpio_callback * cb, uint32_t pins); #endif -void Button::Configure(const struct device * port, gpio_pin_t outPin, gpio_pin_t inPin, void (*callback)(void)) +void Button::Configure(const gpio_dt_spec * input_button_dt, const gpio_dt_spec * output_button_dt, void (*callback)(void)) { - if (!device_is_ready(port)) + if (!device_is_ready(input_button_dt->port)) { - LOG_ERR("%s is not ready\n", port->name); + LOG_ERR("Input port %s is not ready\n", input_button_dt->port->name); } - mPort = port; - mOutPin = outPin; - mInPin = inPin; - mCallback = callback; + mInput_button = input_button_dt; + mOutput_matrix_pin = output_button_dt; + mCallback = callback; } int Button::Init(void) @@ -51,22 +49,22 @@ int Button::Init(void) int ret = 0; #if CONFIG_CHIP_BUTTON_MANAGER_IRQ_MODE - ret = gpio_pin_configure(mPort, mInPin, GPIO_INPUT | GPIO_PULL_UP); + ret = gpio_pin_configure_dt(mInput_button, GPIO_INPUT); if (ret < 0) { LOG_ERR("Config in pin err: %d", ret); return ret; } - ret = gpio_pin_interrupt_configure(mPort, mInPin, GPIO_INT_EDGE_FALLING); + ret = gpio_pin_interrupt_configure_dt(mInput_button, GPIO_INT_EDGE_TO_ACTIVE); if (ret < 0) { LOG_ERR("Config irq pin err: %d", ret); return ret; } - gpio_init_callback(&button_cb_data, button_pressed, mInPin); - ret = gpio_add_callback(mPort, &button_cb_data); + gpio_init_callback(&mButton_cb_data, button_pressed, BIT(mInput_button->pin)); + ret = gpio_add_callback(mInput_button->port, &mButton_cb_data); if (ret < 0) { LOG_ERR("Config gpio_init_callback err: %d", ret); @@ -74,14 +72,14 @@ int Button::Init(void) } #else - ret = gpio_pin_configure(mPort, mOutPin, GPIO_OUTPUT_ACTIVE); + ret = gpio_pin_configure_dt(mOutput_matrix_pin, GPIO_OUTPUT_ACTIVE); if (ret < 0) { LOG_ERR("Config out pin err: %d", ret); return ret; } - ret = gpio_pin_configure(mPort, mInPin, GPIO_INPUT | GPIO_PULL_DOWN); + ret = gpio_pin_configure_dt(mInput_button, GPIO_INPUT); if (ret < 0) { LOG_ERR("Config in pin err: %d", ret); @@ -97,7 +95,7 @@ int Button::Deinit(void) int ret = 0; /* Reconfigure output key pin to input */ - ret = gpio_pin_configure(mPort, mOutPin, GPIO_INPUT | GPIO_PULL_DOWN); + ret = gpio_pin_configure(mOutput_matrix_pin->port, mOutput_matrix_pin->pin, GPIO_INPUT | GPIO_PULL_DOWN); if (ret < 0) { LOG_ERR("Reconfig out pin err: %d", ret); @@ -120,7 +118,7 @@ void Button::Poll(Button * previous) ret = Init(); assert(ret >= 0); - ret = gpio_pin_get(mPort, mInPin); + ret = gpio_pin_get_dt(mInput_button); assert(ret >= 0); if (ret == STATE_HIGH && ret != mPreviousState) @@ -183,39 +181,34 @@ void ButtonEntry(void * param1, void * param2, void * param3) void button_pressed(const struct device * dev, struct gpio_callback * cb, uint32_t pins) { ButtonManager & sInstance = ButtonManagerInst(); - sInstance.PollIRQ(); + sInstance.PollIRQ(dev, pins); } -void ButtonManager::PollIRQ(void) +void ButtonManager::PollIRQ(const struct device * dev, uint32_t pins) { for (unsigned int i = 0; i < mButtons.size(); i++) { - mButtons[i].PollIRQ(); + mButtons[i].PollIRQ(dev, pins); } } -void Button::PollIRQ() +void Button::PollIRQ(const struct device * dev, uint32_t pins) { - int ret = gpio_pin_get(mPort, mInPin); - if (ret == STATE_LOW) + if ((BIT(mInput_button->pin) & pins) && (mCallback != NULL) && (dev == mInput_button->port)) { - if (mCallback != NULL) - { - mCallback(); - } + mCallback(); } } -void Button::Configure(const struct device * port, gpio_pin_t inPin, void (*callback)(void)) +void Button::Configure(const gpio_dt_spec * input_button_dt, void (*callback)(void)) { - if (!device_is_ready(port)) + if (!device_is_ready(input_button_dt->port)) { - LOG_ERR("%s is not ready\n", port->name); + LOG_ERR("%s is not ready\n", input_button_dt->port->name); } - mPort = port; - mInPin = inPin; - mCallback = callback; + mInput_button = input_button_dt; + mCallback = callback; Init(); } diff --git a/examples/window-app/telink/src/AppTask.cpp b/examples/window-app/telink/src/AppTask.cpp index e79e03cc5b4058..12415839b6425c 100644 --- a/examples/window-app/telink/src/AppTask.cpp +++ b/examples/window-app/telink/src/AppTask.cpp @@ -27,6 +27,19 @@ constexpr int kToggleMoveTypeTriggerTimeout = 700; k_timer sToggleMoveTypeTimer; +#if CONFIG_CHIP_BUTTON_MANAGER_IRQ_MODE +#define OPEN_WINDOW_BUTTON BUTTON_EXAMPLE_ACTION +#define CLOSE_WINDOW_BUTTON BUTTON_THREAD_START + +const struct gpio_dt_spec sOpenWindowButtonDt = OPEN_WINDOW_BUTTON; +const struct gpio_dt_spec sCloseWindowButtonDt = CLOSE_WINDOW_BUTTON; +#else +const struct gpio_dt_spec sButtonCol1Dt = BUTTON_COL_1; +const struct gpio_dt_spec sButtonCol2Dt = BUTTON_COL_2; +const struct gpio_dt_spec sButtonRow1Dt = BUTTON_ROW_1; +const struct gpio_dt_spec sButtonRow2Dt = BUTTON_ROW_2; +#endif + Button sOpenButton; Button sCloseButton; @@ -40,11 +53,11 @@ CHIP_ERROR AppTask::Init(void) InitCommonParts(); #if CONFIG_CHIP_BUTTON_MANAGER_IRQ_MODE - sOpenButton.Configure(BUTTON_PORT, BUTTON_PIN_2, OpenActionAndToggleMoveTypeButtonEventHandler); - sCloseButton.Configure(BUTTON_PORT, BUTTON_PIN_3, CloseActionButtonEventHandler); + sOpenButton.Configure(&sOpenWindowButtonDt, OpenActionAndToggleMoveTypeButtonEventHandler); + sCloseButton.Configure(&sCloseWindowButtonDt, CloseActionButtonEventHandler); #else - sOpenButton.Configure(BUTTON_PORT, BUTTON_PIN_4, BUTTON_PIN_1, OpenActionAndToggleMoveTypeButtonEventHandler); - sCloseButton.Configure(BUTTON_PORT, BUTTON_PIN_3, BUTTON_PIN_2, CloseActionButtonEventHandler); + sOpenButton.Configure(&sButtonRow1Dt, &sButtonCol2Dt, OpenActionAndToggleMoveTypeButtonEventHandler); + sCloseButton.Configure(&sButtonRow2Dt, &sButtonCol1Dt, CloseActionButtonEventHandler); #endif ButtonManagerInst().AddButton(sOpenButton); ButtonManagerInst().AddButton(sCloseButton); diff --git a/src/platform/telink/tlsr9518adk80d.overlay b/src/platform/telink/tlsr9518adk80d.overlay index 6a9d70c32fb32c..9ff6b2bc3ebbf1 100644 --- a/src/platform/telink/tlsr9518adk80d.overlay +++ b/src/platform/telink/tlsr9518adk80d.overlay @@ -25,6 +25,37 @@ label = "PWM IDENTIFY LED Green"; }; }; + + keys { + /delete-node/ button_1; + /delete-node/ button_3; + compatible = "gpio-keys"; + key_1: button_1 { + gpios = <&gpioc 2 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; + }; + key_2: button_2 { + gpios = <&gpioc 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; + }; + key_3: button_3 { + gpios = <&gpioc 3 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; + }; + key_4: button_4 { + gpios = <&gpioc 1 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; + }; + + key_matrix_col1: key_matrix_col1 { + gpios = <&gpioc 3 GPIO_ACTIVE_HIGH>; + }; + key_matrix_col2: key_matrix_col2 { + gpios = <&gpioc 1 GPIO_ACTIVE_HIGH>; + }; + key_matrix_row1: key_matrix_row1 { + gpios = <&gpioc 2 GPIO_PULL_DOWN>; + }; + key_matrix_row2: key_matrix_row2 { + gpios = <&gpioc 0 GPIO_PULL_DOWN>; + }; + }; }; &pinctrl { @@ -77,4 +108,4 @@ }; /* region <0x1fe000 0x2000> is reserved for Telink B91 SDK's data */ }; -}; +}; \ No newline at end of file From ebf8d65b6d13108864c0ecae4e70f895d979c612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20BOU=C3=89?= Date: Mon, 29 May 2023 19:47:57 +0200 Subject: [PATCH 13/15] Replace CHIP by Matter in Tv app Linux README (#26818) * Update README.md Replace CHIP by Matter in tv-app/linux/README.md * Fix header link * Update README.md Restyled by prettier-markdown * Update README.md Restyled by prettier-markdown --- examples/tv-app/linux/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/tv-app/linux/README.md b/examples/tv-app/linux/README.md index 147c6c81804f55..547069f1960f37 100644 --- a/examples/tv-app/linux/README.md +++ b/examples/tv-app/linux/README.md @@ -1,13 +1,13 @@ -# CHIP TV Example +# Matter TV Example An example showing the use of CHIP on the Linux. The document will describe how -to build and run CHIP TV Example on Raspberry Pi. This doc is tested on **Ubuntu -for Raspberry Pi Server 20.04 LTS (aarch64)** and **Ubuntu for Raspberry Pi -Desktop 20.10 (aarch64)** +to build and run Matter TV Example on Raspberry Pi. This doc is tested on +**Ubuntu for Raspberry Pi Server 20.04 LTS (aarch64)** and **Ubuntu for +Raspberry Pi Desktop 20.10 (aarch64)**
-- [CHIP TV Example](#chip-tv-example) +- [Matter TV Example](#matter-tv-example) - [Building](#building) - [Exercising Commissioning](#exercising-commissioning) - [App Platform commands](#app-platform-commands) @@ -181,8 +181,8 @@ TODO 1. A Raspberry Pi 4 board 2. A USB Bluetooth Dongle, Ubuntu desktop will send Bluetooth advertisement, - which will block CHIP from connecting via BLE. On Ubuntu server, you need - to install `pi-bluetooth` via APT. + which will block Matter from connecting via BLE. On Ubuntu server, you + need to install `pi-bluetooth` via APT. 3. Ubuntu 20.04 or newer image for ARM64 platform. - Building From d0b9eb41b904fa3fdffcd46a3842a036c170bc42 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 29 May 2023 15:24:10 -0400 Subject: [PATCH 14/15] Split out java/kotlin unit tests (#26897) * Add JAVA_PATH to our dockerfile environment variables * Use matter_enable_java_compilation instead of build_java_matter_controller * Remove useless bit * Fix unit tests once we have java available * Fix seting up java deps if files already there ... this now runs in 5ms instead of 400ms * Do not re-download java dependencies every time. This moves java dependency download time from 500ms to 5ms after the initial download. If we get more dependencies, the savings should be even better. * Restyled by shellharden * Restyled by shfmt * Prepare for unit tests * Make output class directory unique for java * Restyled by gn * Undo unintentional change * Allow separate unit test runs for java * Restyled by gn * Restyled by shellharden * Restyled by shfmt * Undo unintentional change in test name * Fix yaml file * Force java path * Attempt to fix the run path ... again * Update to not use run_in_build_env and switch to multi-line run script * Do not attempt to compile pure java variant for android (keep only linux and mac generally) * Fix required jar: tlv now needs copy as the tlv content is not part of controller anymore * Ensure unit tests pretend java path is set --------- Co-authored-by: Andrei Litvin Co-authored-by: Restyled.io --- .github/workflows/java-tests.yaml | 26 +++++++++++++++-- build/chip/java/config.gni | 4 +-- build/chip/java/rules.gni | 4 +-- build/config/compiler/BUILD.gn | 2 +- examples/java-matter-controller/BUILD.gn | 4 --- scripts/build/test.py | 1 + ...n_linux-arm64-chip-tool-ipv6only-clang.txt | 3 ++ ...ux-arm64-ota-requestor-nodeps-ipv6only.txt | 3 ++ ...ry_run_linux-x64-all-clusters-coverage.txt | 3 ++ src/BUILD.gn | 7 +++++ src/controller/data_model/BUILD.gn | 6 ++-- src/controller/java/BUILD.gn | 27 +++++++++++------ src/lib/support/BUILD.gn | 4 +-- src/messaging/tests/java/BUILD.gn | 8 ++--- src/setup_payload/java/BUILD.gn | 6 ++-- third_party/java_deps/set_up_java_deps.sh | 29 +++++++++++-------- 16 files changed, 93 insertions(+), 44 deletions(-) diff --git a/.github/workflows/java-tests.yaml b/.github/workflows/java-tests.yaml index 33d267edb23a95..911c11ddbef771 100644 --- a/.github/workflows/java-tests.yaml +++ b/.github/workflows/java-tests.yaml @@ -38,13 +38,12 @@ jobs: env: TSAN_OPTIONS: "halt_on_error=1 suppressions=scripts/tests/chiptest/tsan-linux-suppressions.txt" - JAVA_PATH: /usr/lib/jvm/java-8-openjdk-amd64 if: github.actor != 'restyled-io[bot]' runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-java:0.7.3 + image: connectedhomeip/chip-build-java:0.7.15 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" @@ -79,7 +78,30 @@ jobs: path: | .environment/gn_out/.ninja_log .environment/pigweed-venv/*.log + - name: Generate unit tests + timeout-minutes: 1 + run: | + scripts/run_in_build_env.sh \ + './scripts/build/build_examples.py \ + --target linux-x64-tests \ + gen \ + ' + - name: Build unit tests + timeout-minutes: 25 + run: scripts/run_in_build_env.sh 'ninja -C out/linux-x64-tests src:java_controller_tests' + - name: Run unit tests + timeout-minutes: 10 + # TODO: this direct path loading is not maintainable. Our build system should define and + # support test classes. + run: | + $JAVA_PATH/bin/java \ + -cp 'third_party/java_deps/artifacts/*:out/linux-x64-tests/lib/src/controller/java/*' \ + org.junit.runner.JUnitCore \ + chip.tlv.TlvWriterTest \ + chip.tlv.TlvReadWriteTest \ + chip.tlv.TlvReaderTest \ + chip.jsontlv.JsonToTlvToJsonTest - name: Build Java Matter Controller and all clusters app timeout-minutes: 50 run: | diff --git a/build/chip/java/config.gni b/build/chip/java/config.gni index eb992744caf8bf..3e1f160da57b07 100644 --- a/build/chip/java/config.gni +++ b/build/chip/java/config.gni @@ -15,7 +15,7 @@ java_path = getenv("JAVA_PATH") declare_args() { java_matter_controller_dependent_paths = [] - build_java_matter_controller = false + matter_enable_java_compilation = false if (java_path != "" && current_os != "android") { java_matter_controller_dependent_paths += [ "${java_path}/include/" ] @@ -27,6 +27,6 @@ declare_args() { [ "${java_path}/include/linux/" ] } - build_java_matter_controller = true + matter_enable_java_compilation = true } } diff --git a/build/chip/java/rules.gni b/build/chip/java/rules.gni index caa66aeddf5b29..9a2075fe45046f 100644 --- a/build/chip/java/rules.gni +++ b/build/chip/java/rules.gni @@ -21,8 +21,8 @@ kotlinc_runner = "${chip_root}/build/chip/java/kotlinc_runner.py" jar_runner = "${chip_root}/build/chip/java/jar_runner.py" write_build_config = "${chip_root}/build/chip/java/write_build_config.py" -assert(android_sdk_root != "" || build_java_matter_controller, - "android_sdk_root or java_path must be specified") +assert(android_sdk_root != "" || matter_enable_java_compilation, + "android_sdk_root must be specified or JAVA_PATH must be set.") # Declare a java library target # diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index d03db67b0f2322..31f396a4574c3a 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -253,7 +253,7 @@ config("strict_warnings") { cflags += [ "-Wconversion" ] } - if (build_java_matter_controller) { + if (matter_enable_java_compilation) { cflags -= [ "-Wshadow" ] } diff --git a/examples/java-matter-controller/BUILD.gn b/examples/java-matter-controller/BUILD.gn index d61a4cf1fcc3a9..1c757260213e7c 100644 --- a/examples/java-matter-controller/BUILD.gn +++ b/examples/java-matter-controller/BUILD.gn @@ -37,11 +37,7 @@ kotlin_binary("java-matter-controller") { output_name = "java-matter-controller" deps = [ ":java", - "${chip_root}/src/controller/java:json_to_tlv_to_json_test", "${chip_root}/src/controller/java:onboarding_payload", - "${chip_root}/src/controller/java:tlv_read_write_test", - "${chip_root}/src/controller/java:tlv_reader_test", - "${chip_root}/src/controller/java:tlv_writer_test", "${chip_root}/third_party/java_deps:kotlin-stdlib", ] diff --git a/scripts/build/test.py b/scripts/build/test.py index 4156a898f153d7..70fca73f082f7b 100644 --- a/scripts/build/test.py +++ b/scripts/build/test.py @@ -47,6 +47,7 @@ def build_actual_output(root: str, out: str, args: List[str]) -> List[str]: 'NXP_K32W0_SDK_ROOT': 'TEST_NXP_K32W0_SDK_ROOT', 'IMX_SDK_ROOT': 'IMX_SDK_ROOT', 'TI_SYSCONFIG_ROOT': 'TEST_TI_SYSCONFIG_ROOT', + 'JAVA_PATH': 'TEST_JAVA_PATH', }) retval = subprocess.run([ diff --git a/scripts/build/testdata/dry_run_linux-arm64-chip-tool-ipv6only-clang.txt b/scripts/build/testdata/dry_run_linux-arm64-chip-tool-ipv6only-clang.txt index a92463b2cff716..58e095837e9a97 100644 --- a/scripts/build/testdata/dry_run_linux-arm64-chip-tool-ipv6only-clang.txt +++ b/scripts/build/testdata/dry_run_linux-arm64-chip-tool-ipv6only-clang.txt @@ -6,6 +6,9 @@ bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '"'"'--args=chip_inet_config_enable_ipv4=false is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-chip-tool-ipv6only-clang' +# Setting up Java deps +third_party/java_deps/set_up_java_deps.sh + # Building linux-arm64-chip-tool-ipv6only-clang bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ diff --git a/scripts/build/testdata/dry_run_linux-arm64-ota-requestor-nodeps-ipv6only.txt b/scripts/build/testdata/dry_run_linux-arm64-ota-requestor-nodeps-ipv6only.txt index aa6eb4dd3e8a31..cc8ec0110ec923 100644 --- a/scripts/build/testdata/dry_run_linux-arm64-ota-requestor-nodeps-ipv6only.txt +++ b/scripts/build/testdata/dry_run_linux-arm64-ota-requestor-nodeps-ipv6only.txt @@ -6,6 +6,9 @@ bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-requestor-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls" target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-ota-requestor-nodeps-ipv6only' +# Setting up Java deps +third_party/java_deps/set_up_java_deps.sh + # Building linux-arm64-ota-requestor-nodeps-ipv6only bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ diff --git a/scripts/build/testdata/dry_run_linux-x64-all-clusters-coverage.txt b/scripts/build/testdata/dry_run_linux-x64-all-clusters-coverage.txt index 94e8686b31dcf9..d2960f35542eba 100644 --- a/scripts/build/testdata/dry_run_linux-x64-all-clusters-coverage.txt +++ b/scripts/build/testdata/dry_run_linux-x64-all-clusters-coverage.txt @@ -4,5 +4,8 @@ cd "{root}" # Generating linux-x64-all-clusters-coverage gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux --args=use_coverage=true {out}/linux-x64-all-clusters-coverage +# Setting up Java deps +third_party/java_deps/set_up_java_deps.sh + # Building linux-x64-all-clusters-coverage ninja -C {out}/linux-x64-all-clusters-coverage diff --git a/src/BUILD.gn b/src/BUILD.gn index 94d3810a33f95d..b58da12e39f349 100644 --- a/src/BUILD.gn +++ b/src/BUILD.gn @@ -16,6 +16,7 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") import("${build_root}/config/compiler/compiler.gni") +import("${chip_root}/build/chip/java/config.gni") import("${chip_root}/build/chip/tests.gni") import("${chip_root}/src/ble/ble.gni") import("${chip_root}/src/lwip/lwip.gni") @@ -147,4 +148,10 @@ if (chip_build_tests) { "${chip_root}/src/crypto/tests", ] } + + if (matter_enable_java_compilation) { + group("java_controller_tests") { + deps = [ "${chip_root}/src/controller/java:unit_tests" ] + } + } } diff --git a/src/controller/data_model/BUILD.gn b/src/controller/data_model/BUILD.gn index 8d2290f0d666af..130b2fb88c195a 100644 --- a/src/controller/data_model/BUILD.gn +++ b/src/controller/data_model/BUILD.gn @@ -30,9 +30,9 @@ chip_data_model("data_model") { allow_circular_includes_from = [ "${chip_root}/src/controller" ] } -if (current_os == "android" || build_java_matter_controller) { +if (current_os == "android" || matter_enable_java_compilation) { config("java-build-config") { - if (build_java_matter_controller) { + if (matter_enable_java_compilation) { include_dirs = java_matter_controller_dependent_paths } } @@ -324,7 +324,7 @@ if (current_os == "android" || build_java_matter_controller) { "${chip_root}/src/platform", ] - if (build_java_matter_controller) { + if (matter_enable_java_compilation) { if (current_os == "mac") { deps += [ "${chip_root}/src/platform/Darwin" ] } else { diff --git a/src/controller/java/BUILD.gn b/src/controller/java/BUILD.gn index ece7ed06d2e0dd..3beb2afb26e68a 100644 --- a/src/controller/java/BUILD.gn +++ b/src/controller/java/BUILD.gn @@ -18,7 +18,7 @@ import("${chip_root}/build/chip/java/config.gni") import("${chip_root}/build/chip/java/rules.gni") import("${chip_root}/build/chip/tests.gni") -if (!build_java_matter_controller) { +if (!matter_enable_java_compilation) { import("${build_root}/config/android_abi.gni") } @@ -76,7 +76,7 @@ shared_library("jni") { "${chip_root}/src/platform", ] - if (build_java_matter_controller) { + if (matter_enable_java_compilation) { defines = [ "JAVA_MATTER_CONTROLLER_TEST" ] sources += [ @@ -123,7 +123,7 @@ if (chip_link_tests) { "${chip_root}/src/messaging/tests:helpers", ] - if (build_java_matter_controller) { + if (matter_enable_java_compilation) { defines = [ "JAVA_MATTER_CONTROLLER_TEST" ] include_dirs = java_matter_controller_dependent_paths if (current_os == "mac") { @@ -240,7 +240,7 @@ kotlin_library("json_to_tlv_to_json_test") { shared_library("jni_for_onboarding_payload") { output_name = "libOnboardingPayload" - if (build_java_matter_controller) { + if (matter_enable_java_compilation) { include_dirs = java_matter_controller_dependent_paths output_dir = "${root_out_dir}/lib/jni" } else { @@ -260,7 +260,7 @@ kotlin_library("onboarding_payload") { data_deps = [ ":jni_for_onboarding_payload" ] - if (!build_java_matter_controller) { + if (!matter_enable_java_compilation) { data_deps += [ "${chip_root}/build/chip/java:shared_cpplib" ] } @@ -272,6 +272,15 @@ kotlin_library("onboarding_payload") { ] } +group("unit_tests") { + deps = [ + ":json_to_tlv_to_json_test", + ":tlv_read_write_test", + ":tlv_reader_test", + ":tlv_writer_test", + ] +} + android_library("java") { output_name = "CHIPController.jar" @@ -337,7 +346,7 @@ android_library("java") { "zap-generated/chip/devicecontroller/ClusterInfoMapping.java", ] - if (build_java_matter_controller) { + if (matter_enable_java_compilation) { deps += [ "${chip_root}/third_party/java_deps:json", "${chip_root}/third_party/java_deps/stub_src", @@ -372,7 +381,7 @@ if (chip_link_tests) { "src/chip/devicecontroller/GetConnectedDeviceCallbackForTestJni.java", ] - if (build_java_matter_controller) { + if (matter_enable_java_compilation) { deps += [ "${chip_root}/third_party/java_deps:json", "${chip_root}/third_party/java_deps/stub_src", @@ -407,7 +416,7 @@ if (chip_link_tests) { sources = [ "tests/chip/devicecontroller/GetConnectedDeviceCallbackJniTest.java" ] - if (build_java_matter_controller) { + if (matter_enable_java_compilation) { deps += [ "${chip_root}/third_party/java_deps:json", "${chip_root}/third_party/java_deps/stub_src", @@ -425,7 +434,7 @@ if (chip_link_tests) { } } -if (!build_java_matter_controller) { +if (!matter_enable_java_compilation) { java_prebuilt("android") { jar_path = "${android_sdk_root}/platforms/android-26/android.jar" } diff --git a/src/lib/support/BUILD.gn b/src/lib/support/BUILD.gn index 724e029cbbc379..c38c52a2ed21d6 100644 --- a/src/lib/support/BUILD.gn +++ b/src/lib/support/BUILD.gn @@ -149,8 +149,8 @@ static_library("support") { "verhoeff/Verhoeff36.cpp", ] - if (current_os == "android" || build_java_matter_controller) { - if (build_java_matter_controller) { + if (current_os == "android" || matter_enable_java_compilation) { + if (matter_enable_java_compilation) { include_dirs = java_matter_controller_dependent_paths } diff --git a/src/messaging/tests/java/BUILD.gn b/src/messaging/tests/java/BUILD.gn index 25c9b950200efd..8eff7a303824ff 100644 --- a/src/messaging/tests/java/BUILD.gn +++ b/src/messaging/tests/java/BUILD.gn @@ -17,7 +17,7 @@ import("//build_overrides/chip.gni") import("${chip_root}/build/chip/java/config.gni") import("${chip_root}/build/chip/java/rules.gni") -if (!build_java_matter_controller) { +if (!matter_enable_java_compilation) { import("${build_root}/config/android_abi.gni") } @@ -29,7 +29,7 @@ shared_library("jni") { public_configs = [ "${chip_root}/src:includes" ] - if (build_java_matter_controller) { + if (matter_enable_java_compilation) { defines = [ "JAVA_MATTER_CONTROLLER_TEST" ] include_dirs = java_matter_controller_dependent_paths @@ -56,7 +56,7 @@ android_library("java") { sources = [ "src/chip/testing/MessagingContext.java" ] - if (build_java_matter_controller) { + if (matter_enable_java_compilation) { deps += [ "${chip_root}/third_party/java_deps:json", "${chip_root}/third_party/java_deps/stub_src", @@ -73,7 +73,7 @@ android_library("java") { # ..../platforms/android-26/android.jar to access BLE items) } -if (!build_java_matter_controller) { +if (!matter_enable_java_compilation) { java_prebuilt("android") { jar_path = "${android_sdk_root}/platforms/android-26/android.jar" } diff --git a/src/setup_payload/java/BUILD.gn b/src/setup_payload/java/BUILD.gn index a1c2cb21cfea90..bf4402ccdaeec6 100644 --- a/src/setup_payload/java/BUILD.gn +++ b/src/setup_payload/java/BUILD.gn @@ -17,13 +17,13 @@ import("//build_overrides/chip.gni") import("${chip_root}/build/chip/java/config.gni") import("${chip_root}/build/chip/java/rules.gni") -if (!build_java_matter_controller) { +if (!matter_enable_java_compilation) { import("${build_root}/config/android_abi.gni") } shared_library("jni") { output_name = "libSetupPayloadParser" - if (build_java_matter_controller) { + if (matter_enable_java_compilation) { include_dirs = java_matter_controller_dependent_paths output_dir = "${root_out_dir}/lib/jni" } else { @@ -43,7 +43,7 @@ android_library("java") { data_deps = [ ":jni" ] - if (!build_java_matter_controller) { + if (!matter_enable_java_compilation) { data_deps += [ "${chip_root}/build/chip/java:shared_cpplib" ] } diff --git a/third_party/java_deps/set_up_java_deps.sh b/third_party/java_deps/set_up_java_deps.sh index ad7b27415e8a11..e96e48d02e648c 100755 --- a/third_party/java_deps/set_up_java_deps.sh +++ b/third_party/java_deps/set_up_java_deps.sh @@ -20,22 +20,27 @@ set -e mkdir -p third_party/java_deps/artifacts -function download_maven_jar() { - _MAVEN_PATH=$1 - _JAR_NAME=$2 +function download_jar() { + _HOST=$1 + _MAVEN_PATH=$2 + _JAR_NAME=$3 if [ ! -f "third_party/java_deps/artifacts/$_JAR_NAME" ]; then curl --fail --location --silent --show-error \ - "https://repo1.maven.org/maven2/$_MAVEN_PATH/$_JAR_NAME" \ + "https://$_HOST/maven2/$_MAVEN_PATH/$_JAR_NAME" \ -o "third_party/java_deps/artifacts/$_JAR_NAME" fi } -download_maven_jar "com/google/code/findbugs/jsr305/3.0.2" "jsr305-3.0.2.jar" -download_maven_jar "org/json/json/20220924" "json-20220924.jar" -download_maven_jar "org/jetbrains/kotlin/kotlin-stdlib/1.8.10" "kotlin-stdlib-1.8.10.jar" -download_maven_jar "org/jetbrains/kotlin/kotlin-test/1.8.10" "kotlin-test-1.8.10.jar" -download_maven_jar "com/google/protobuf/protobuf-java/3.22.0" "protobuf-java-3.22.0.jar" -download_maven_jar "com/google/truth/truth/1.1.3" "truth-1.1.3.jar" -download_maven_jar "junit/junit/4.13.2" "junit-4.13.2.jar" -download_maven_jar "com/google/code/gson/gson/2.9.1" "gson-2.9.1.jar" +download_jar "repo1.maven.org" "com/google/code/findbugs/jsr305/3.0.2" "jsr305-3.0.2.jar" +download_jar "repo1.maven.org" "com/google/code/gson/gson/2.9.1" "gson-2.9.1.jar" +download_jar "repo1.maven.org" "com/google/protobuf/protobuf-java/3.22.0" "protobuf-java-3.22.0.jar" +download_jar "repo1.maven.org" "com/google/truth/truth/1.1.3" "truth-1.1.3.jar" +download_jar "repo1.maven.org" "junit/junit/4.13.2" "junit-4.13.2.jar" +download_jar "repo1.maven.org" "org/jetbrains/kotlin/kotlin-stdlib/1.8.10" "kotlin-stdlib-1.8.10.jar" +download_jar "repo1.maven.org" "org/jetbrains/kotlin/kotlin-test/1.8.10" "kotlin-test-1.8.10.jar" +download_jar "repo1.maven.org" "org/json/json/20220924" "json-20220924.jar" + +# Unit test requirements +download_jar "repo1.maven.org" "org/hamcrest/hamcrest-all/1.3" "hamcrest-all-1.3.jar" +download_jar "dist.wso2.org" "com/google/common/google-collect/1.0-rc1/" "google-collect-1.0-rc1.jar" From 22de5a04f7c3f3d10bc06ad20bf50823c42cfbed Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 29 May 2023 19:14:00 -0400 Subject: [PATCH 15/15] Add Darwin availability annotations for concentration measurement clusters. (#26902) --- .../CHIP/templates/availability.yaml | 1910 +++++++++++++++++ 1 file changed, 1910 insertions(+) diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index b2d4a4d11b3f52..fea8909cfb5c96 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -7034,6 +7034,7 @@ introduced: clusters: - AirQuality + # Replaceable Monitoring clusters - HEPAFilterMonitoring - ActivatedCarbonFilterMonitoring - CeramicFilterMonitoring @@ -7046,6 +7047,43 @@ - FuelTankMonitoring - InkCartridgeMonitoring - TonerCartridgeMonitoring + # Concentration Measurement clusters + - BromateConcentrationMeasurement + - BromodichloromethaneConcentrationMeasurement + - BromoformConcentrationMeasurement + - CarbonDioxideConcentrationMeasurement + - CarbonMonoxideConcentrationMeasurement + - ChloraminesConcentrationMeasurement + - ChlorineConcentrationMeasurement + - ChlorodibromomethaneConcentrationMeasurement + - ChloroformConcentrationMeasurement + - CopperConcentrationMeasurement + - DissolvedOxygenConcentrationMeasurement + - EthyleneConcentrationMeasurement + - EthyleneOxideConcentrationMeasurement + - FecalColiformEColiConcentrationMeasurement + - FluorideConcentrationMeasurement + - FormaldehydeConcentrationMeasurement + - HaloaceticAcidsConcentrationMeasurement + - HydrogenConcentrationMeasurement + - HydrogenSulfideConcentrationMeasurement + - LeadConcentrationMeasurement + - ManganeseConcentrationMeasurement + - NitricOxideConcentrationMeasurement + - NitrogenDioxideConcentrationMeasurement + - OxygenConcentrationMeasurement + - OzoneConcentrationMeasurement + - PM10ConcentrationMeasurement + - PM1ConcentrationMeasurement + - PM25ConcentrationMeasurement + - RadonConcentrationMeasurement + - SodiumConcentrationMeasurement + - SulfateConcentrationMeasurement + - SulfurDioxideConcentrationMeasurement + - TotalColiformBacteriaConcentrationMeasurement + - TotalTrihalomethanesConcentrationMeasurement + - TotalVolatileOrganicCompoundsConcentrationMeasurement + - TurbidityConcentrationMeasurement - RefrigeratorAlarm - TemperatureControl - SmokeCOAlarm @@ -7336,6 +7374,654 @@ - EventList - FeatureMap - ClusterRevision + BromateConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + BromodichloromethaneConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + BromoformConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + CarbonDioxideConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + CarbonMonoxideConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + ChloraminesConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + ChlorineConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + ChlorodibromomethaneConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + ChloroformConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + CopperConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + DissolvedOxygenConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + EthyleneConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + EthyleneOxideConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + FecalColiformEColiConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + FluorideConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + FormaldehydeConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + HaloaceticAcidsConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + HydrogenConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + HydrogenSulfideConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + LeadConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + ManganeseConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + NitricOxideConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + NitrogenDioxideConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + OxygenConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + OzoneConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + PM10ConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + PM1ConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + PM25ConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + RadonConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + SodiumConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + SulfateConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + SulfurDioxideConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + TotalColiformBacteriaConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + TotalTrihalomethanesConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + TotalVolatileOrganicCompoundsConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision + TurbidityConcentrationMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - PeakMeasuredValue + - PeakMeasuredValueWindow + - AverageMeasuredValue + - AverageMeasuredValueWindow + - Uncertainty + - MeasurementUnit + - MeasurementMedium + - LevelValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision RefrigeratorAlarm: - Mask - Latch @@ -7517,6 +8203,150 @@ TonerCartridgeMonitoring: - ChangeIndicationEnum - DegradationDirectionEnum + BromateConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + BromodichloromethaneConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + BromoformConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + CarbonDioxideConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + CarbonMonoxideConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + ChloraminesConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + ChlorineConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + ChlorodibromomethaneConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + ChloroformConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + CopperConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + DissolvedOxygenConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + EthyleneConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + EthyleneOxideConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + FecalColiformEColiConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + FluorideConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + FormaldehydeConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + HaloaceticAcidsConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + HydrogenConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + HydrogenSulfideConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + LeadConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + ManganeseConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + NitricOxideConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + NitrogenDioxideConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + OxygenConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + OzoneConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + PM10ConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + PM1ConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + PM25ConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + RadonConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + SodiumConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + SulfateConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + SulfurDioxideConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + TotalColiformBacteriaConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + TotalTrihalomethanesConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + TotalVolatileOrganicCompoundsConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum + TurbidityConcentrationMeasurement: + - LevelValueEnum + - MeasurementUnitEnum + - MeasurementMediumEnum SmokeCOAlarm: - AlarmStateEnum - ContaminationStateEnum @@ -7693,6 +8523,726 @@ DegradationDirectionEnum: - Up - Down + BromateConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + BromodichloromethaneConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + BromoformConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + CarbonDioxideConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + CarbonMonoxideConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + ChloraminesConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + ChlorineConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + ChlorodibromomethaneConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + ChloroformConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + CopperConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + DissolvedOxygenConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + EthyleneConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + EthyleneOxideConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + FecalColiformEColiConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + FluorideConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + FormaldehydeConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + HaloaceticAcidsConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + HydrogenConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + HydrogenSulfideConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + LeadConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + ManganeseConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + NitricOxideConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + NitrogenDioxideConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + OxygenConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + OzoneConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + PM10ConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + PM1ConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + PM25ConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + RadonConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + SodiumConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + SulfateConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + SulfurDioxideConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + TotalColiformBacteriaConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + TotalTrihalomethanesConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + TotalVolatileOrganicCompoundsConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil + TurbidityConcentrationMeasurement: + LevelValueEnum: + - Unknown + - Low + - Medium + - High + - Critical + MeasurementUnitEnum: + - PPM + - PPB + - PPT + - MGM3 + - UGM3 + - NGM3 + - PM3 + - BQM3 + MeasurementMediumEnum: + - Gas + - Liquid + - Soil DoorLock: DlLockState: - Unlatched @@ -7773,6 +9323,78 @@ - Feature TonerCartridgeMonitoring: - Feature + BromateConcentrationMeasurement: + - Feature + BromodichloromethaneConcentrationMeasurement: + - Feature + BromoformConcentrationMeasurement: + - Feature + CarbonDioxideConcentrationMeasurement: + - Feature + CarbonMonoxideConcentrationMeasurement: + - Feature + ChloraminesConcentrationMeasurement: + - Feature + ChlorineConcentrationMeasurement: + - Feature + ChlorodibromomethaneConcentrationMeasurement: + - Feature + ChloroformConcentrationMeasurement: + - Feature + CopperConcentrationMeasurement: + - Feature + DissolvedOxygenConcentrationMeasurement: + - Feature + EthyleneConcentrationMeasurement: + - Feature + EthyleneOxideConcentrationMeasurement: + - Feature + FecalColiformEColiConcentrationMeasurement: + - Feature + FluorideConcentrationMeasurement: + - Feature + FormaldehydeConcentrationMeasurement: + - Feature + HaloaceticAcidsConcentrationMeasurement: + - Feature + HydrogenConcentrationMeasurement: + - Feature + HydrogenSulfideConcentrationMeasurement: + - Feature + LeadConcentrationMeasurement: + - Feature + ManganeseConcentrationMeasurement: + - Feature + NitricOxideConcentrationMeasurement: + - Feature + NitrogenDioxideConcentrationMeasurement: + - Feature + OxygenConcentrationMeasurement: + - Feature + OzoneConcentrationMeasurement: + - Feature + PM10ConcentrationMeasurement: + - Feature + PM1ConcentrationMeasurement: + - Feature + PM25ConcentrationMeasurement: + - Feature + RadonConcentrationMeasurement: + - Feature + SodiumConcentrationMeasurement: + - Feature + SulfateConcentrationMeasurement: + - Feature + SulfurDioxideConcentrationMeasurement: + - Feature + TotalColiformBacteriaConcentrationMeasurement: + - Feature + TotalTrihalomethanesConcentrationMeasurement: + - Feature + TotalVolatileOrganicCompoundsConcentrationMeasurement: + - Feature + TurbidityConcentrationMeasurement: + - Feature RefrigeratorAlarm: - AlarmMap TemperatureControl: @@ -7857,6 +9479,294 @@ Feature: - Condition - Warning + BromateConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + BromodichloromethaneConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + BromoformConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + CarbonDioxideConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + CarbonMonoxideConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + ChloraminesConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + ChlorineConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + ChlorodibromomethaneConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + ChloroformConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + CopperConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + DissolvedOxygenConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + EthyleneConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + EthyleneOxideConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + FecalColiformEColiConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + FluorideConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + FormaldehydeConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + HaloaceticAcidsConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + HydrogenConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + HydrogenSulfideConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + LeadConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + ManganeseConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + NitricOxideConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + NitrogenDioxideConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + OxygenConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + OzoneConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + PM10ConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + PM1ConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + PM25ConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + RadonConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + SodiumConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + SulfateConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + SulfurDioxideConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + TotalColiformBacteriaConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + TotalTrihalomethanesConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + TotalVolatileOrganicCompoundsConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement + TurbidityConcentrationMeasurement: + Feature: + - NumericMeasurement + - LevelIndication + - MediumLevel + - CriticalLevel + - PeakMeasurement + - AverageMeasurement DoorLock: # Feature was originally named DoorLockFeature, but we generate the # same API for both of those names, so the name can just change