From ebc41b5b5710a036f9ac8719902a65ab76ba917d Mon Sep 17 00:00:00 2001 From: Song Guo Date: Thu, 1 Apr 2021 16:32:45 +0800 Subject: [PATCH] [IM] Fix interaction model build & Enable IM build for Linux presubmit (#5725) * [im] Fix build * Rename to CHIP_ENABLE_INTERACTION_MODEL * Run codegen * Enable build on Linux * Restyled by gn * Fix typo Co-authored-by: Restyled.io --- .github/workflows/build.yaml | 3 +- .../all-clusters-common/gen/endpoint_config.h | 30 +-- .../lighting-app/lighting-common/BUILD.gn | 2 +- .../tv-app/tv-common/gen/endpoint_config.h | 12 +- src/app/common_flags.gni | 1 - src/app/server/BUILD.gn | 4 - src/app/server/Server.cpp | 8 +- .../templates/chip/CHIPClusters-src.zapt | 6 +- src/controller/BUILD.gn | 5 - src/controller/CHIPClusters.cpp | 178 +++++++++--------- src/controller/CHIPDevice.h | 2 +- src/controller/CHIPDeviceController.cpp | 6 +- src/lib/core/BUILD.gn | 1 + src/lib/core/core.gni | 3 + 14 files changed, 126 insertions(+), 135 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3d9b0787818415..b5b27a39e6e7af 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -24,7 +24,7 @@ jobs: strategy: matrix: - type: [gcc_debug, gcc_release, clang, mbedtls] + type: [gcc_debug, gcc_release, clang, mbedtls, clang_experimental] env: BUILD_TYPE: ${{ matrix.type }} BUILD_IMAGE: chip-build-openssl @@ -60,6 +60,7 @@ jobs: "gcc_release") GN_ARGS='is_debug=false';; "clang") GN_ARGS='is_clang=true';; "mbedtls") GN_ARGS='chip_crypto="mbedtls"';; + "clang_experimental") GN_ARGS='is_clang=true chip_enable_interaction_model=true';; *) ;; esac diff --git a/examples/all-clusters-app/all-clusters-common/gen/endpoint_config.h b/examples/all-clusters-app/all-clusters-common/gen/endpoint_config.h index db8fb2fd58e94f..6ada6d439ca6d5 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/endpoint_config.h +++ b/examples/all-clusters-app/all-clusters-common/gen/endpoint_config.h @@ -358,11 +358,11 @@ { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), \ ZAP_LONG_DEFAULTS_INDEX(176) }, /* Basic (server): SoftwareVersion */ \ { 0x000A, ZAP_TYPE(CHAR_STRING), 64, ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_LONG_DEFAULTS_INDEX(180) }, /* Basic (server): SoftwareVersionString */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* General Commissioning (server): cluster revision */ \ + ZAP_LONG_DEFAULTS_INDEX(180) }, /* Basic (server): SoftwareVersionString */ \ { 0x0000, ZAP_TYPE(OCTET_STRING), 8, 0, ZAP_LONG_DEFAULTS_INDEX(244) }, /* General Commissioning (server): FabricId */ \ { 0x0001, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_LONG_DEFAULTS_INDEX(252) }, /* General Commissioning (server): Breadcrumb */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* General Commissioning (server): cluster revision */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* Network Commissioning (server): cluster revision */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* Door Lock (server): cluster revision */ \ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* Door Lock (server): lock state */ \ @@ -450,25 +450,25 @@ { 0x0001, ZAP_TYPE(ENUM16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* IAS Zone (server): zone type */ \ { 0x0002, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* IAS Zone (server): zone status */ \ { 0x0010, ZAP_TYPE(IEEE_ADDRESS), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(514) }, /* IAS Zone (server): IAS CIE address */ \ - { 0x0011, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xff) }, /* IAS Zone (server): Zone ID */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* Low Power (server): cluster revision */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* Application Basic (server): cluster revision */ \ + ZAP_LONG_DEFAULTS_INDEX(514) }, /* IAS Zone (server): IAS CIE address */ \ + { 0x0011, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xff) }, /* IAS Zone (server): Zone ID */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* Low Power (server): cluster revision */ \ { 0x0000, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(522) }, /* Application Basic (server): vendor name */ \ { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Application Basic (server): vendor id */ \ { 0x0002, ZAP_TYPE(OCTET_STRING), 32, 0, \ - ZAP_LONG_DEFAULTS_INDEX(554) }, /* Application Basic (server): application name */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Application Basic (server): product id */ \ + ZAP_LONG_DEFAULTS_INDEX(554) }, /* Application Basic (server): application name */ \ + { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Application Basic (server): product id */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* Application Basic (server): cluster revision */ \ { 0x0005, ZAP_TYPE(OCTET_STRING), 32, 0, \ - ZAP_LONG_DEFAULTS_INDEX(586) }, /* Application Basic (server): application id */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Application Basic (server): catalog vendor id */ \ - { 0x0007, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* Application Basic (server): application satus */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* Binding (server): cluster revision */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* Group Key Management (server): cluster revision */ \ + ZAP_LONG_DEFAULTS_INDEX(586) }, /* Application Basic (server): application id */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Application Basic (server): catalog vendor id */ \ + { 0x0007, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* Application Basic (server): application satus */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* Binding (server): cluster revision */ \ { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(618) }, /* Group Key Management (server): groups */ \ { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(872) }, /* Group Key Management (server): group keys */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* On/off (server): cluster revision */ \ - { 0x0000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* On/off (server): on/off */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* Group Key Management (server): cluster revision */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* On/off (server): cluster revision */ \ + { 0x0000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* On/off (server): on/off */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), \ ZAP_SIMPLE_DEFAULT(3) }, /* Basic (server): cluster revision */ \ { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), \ diff --git a/examples/lighting-app/lighting-common/BUILD.gn b/examples/lighting-app/lighting-common/BUILD.gn index 9ea210b6586360..7080d33c57eabd 100644 --- a/examples/lighting-app/lighting-common/BUILD.gn +++ b/examples/lighting-app/lighting-common/BUILD.gn @@ -63,7 +63,7 @@ source_set("lighting-common") { "gen/callback-stub.cpp", ] - if (chip_app_use_interaction_model) { + if (chip_enable_interaction_model) { sources += [ "${chip_root}/src/app/util/ember-compatibility-functions.cpp", "gen/IMClusterCommandHandler.cpp", diff --git a/examples/tv-app/tv-common/gen/endpoint_config.h b/examples/tv-app/tv-common/gen/endpoint_config.h index 143d6e20e3bbe6..952c1dcf8363e1 100644 --- a/examples/tv-app/tv-common/gen/endpoint_config.h +++ b/examples/tv-app/tv-common/gen/endpoint_config.h @@ -316,15 +316,15 @@ { 0x0001, ZAP_TYPE(ENUM16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* IAS Zone (server): zone type */ \ { 0x0002, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* IAS Zone (server): zone status */ \ { 0x0010, ZAP_TYPE(IEEE_ADDRESS), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(498) }, /* IAS Zone (server): IAS CIE address */ \ - { 0x0011, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xff) }, /* IAS Zone (server): Zone ID */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* Low Power (server): cluster revision */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* Application Basic (server): cluster revision */ \ + ZAP_LONG_DEFAULTS_INDEX(498) }, /* IAS Zone (server): IAS CIE address */ \ + { 0x0011, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xff) }, /* IAS Zone (server): Zone ID */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* Low Power (server): cluster revision */ \ { 0x0000, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(506) }, /* Application Basic (server): vendor name */ \ { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Application Basic (server): vendor id */ \ { 0x0002, ZAP_TYPE(OCTET_STRING), 32, 0, \ - ZAP_LONG_DEFAULTS_INDEX(538) }, /* Application Basic (server): application name */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Application Basic (server): product id */ \ + ZAP_LONG_DEFAULTS_INDEX(538) }, /* Application Basic (server): application name */ \ + { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Application Basic (server): product id */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* Application Basic (server): cluster revision */ \ { 0x0005, ZAP_TYPE(OCTET_STRING), 32, 0, \ ZAP_LONG_DEFAULTS_INDEX(570) }, /* Application Basic (server): application id */ \ { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Application Basic (server): catalog vendor id */ \ diff --git a/src/app/common_flags.gni b/src/app/common_flags.gni index 80639720f8d15f..1d4309810d57e8 100644 --- a/src/app/common_flags.gni +++ b/src/app/common_flags.gni @@ -15,5 +15,4 @@ declare_args() { # Temporary flag for interaction model and echo protocols, set it to true to enable chip_app_use_echo = false - chip_app_use_interaction_model = false } diff --git a/src/app/server/BUILD.gn b/src/app/server/BUILD.gn index 498c92985d1c33..d0c924ea483d1c 100644 --- a/src/app/server/BUILD.gn +++ b/src/app/server/BUILD.gn @@ -18,10 +18,6 @@ import("${chip_root}/src/app/common_flags.gni") config("server_config") { defines = [] - if (chip_app_use_interaction_model) { - defines += [ "CHIP_APP_USE_INTERACTION_MODEL" ] - } - if (chip_app_use_echo) { defines += [ "CHIP_APP_USE_ECHO" ] } diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index bed9b61a812f7c..accdfbe5496b8c 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -406,7 +406,7 @@ class ServerCallback : public SecureSessionMgrDelegate AppDelegate * mDelegate = nullptr; }; -#if defined(CHIP_APP_USE_INTERACTION_MODEL) || defined(CHIP_APP_USE_ECHO) +#if CHIP_ENABLE_INTERACTION_MODEL || defined(CHIP_APP_USE_ECHO) Messaging::ExchangeManager gExchangeMgr; #endif ServerCallback gCallbacks; @@ -482,15 +482,15 @@ void InitServer(AppDelegate * delegate) err = gSessions.Init(chip::kTestDeviceNodeId, &DeviceLayer::SystemLayer, &gTransports, &gAdminPairings); SuccessOrExit(err); -#if defined(CHIP_APP_USE_INTERACTION_MODEL) || defined(CHIP_APP_USE_ECHO) +#if CHIP_ENABLE_INTERACTION_MODEL || defined(CHIP_APP_USE_ECHO) err = gExchangeMgr.Init(&gSessions); SuccessOrExit(err); #else gSessions.SetDelegate(&gCallbacks); #endif -#if defined(CHIP_APP_USE_INTERACTION_MODEL) - err = chip::app::InteractionModelEngine::GetInstance()->Init(&gExchangeMgr); +#if CHIP_ENABLE_INTERACTION_MODEL + err = chip::app::InteractionModelEngine::GetInstance()->Init(&gExchangeMgr, nullptr); SuccessOrExit(err); #endif diff --git a/src/app/zap-templates/templates/chip/CHIPClusters-src.zapt b/src/app/zap-templates/templates/chip/CHIPClusters-src.zapt index f5e9e7bfd68c83..c430ae2b37b85e 100644 --- a/src/app/zap-templates/templates/chip/CHIPClusters-src.zapt +++ b/src/app/zap-templates/templates/chip/CHIPClusters-src.zapt @@ -19,7 +19,7 @@ namespace Controller { {{#chip_server_cluster_commands}} CHIP_ERROR {{asCamelCased clusterName false}}Cluster::{{asCamelCased name false}}(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback{{#chip_server_cluster_command_arguments}}, {{chipType}} {{asCamelCased label}}{{/chip_server_cluster_command_arguments}}) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -38,11 +38,7 @@ CHIP_ERROR {{asCamelCased clusterName false}}Cluster::{{asCamelCased name false} uint8_t argSeqNumber = 0; {{/first}} // {{asCamelCased label}}: {{asCamelCased type}} -{{#if (isCharString type)}} - ReturnErrorOnFailure(writer.PutString(TLV::ContextTag(argSeqNumber++), {{asCamelCased label}})); -{{else}} ReturnErrorOnFailure(writer.Put(TLV::ContextTag(argSeqNumber++), {{asCamelCased label}})); -{{/if}} {{else}} // Command takes no arguments. {{/chip_server_cluster_command_arguments}} diff --git a/src/controller/BUILD.gn b/src/controller/BUILD.gn index 88a835ab848981..0f1293bd2ed486 100644 --- a/src/controller/BUILD.gn +++ b/src/controller/BUILD.gn @@ -13,7 +13,6 @@ # limitations under the License. import("//build_overrides/chip.gni") -import("${chip_root}/src/app/common_flags.gni") static_library("controller") { output_name = "libChipController" @@ -47,8 +46,4 @@ static_library("controller") { ] defines = [] - - if (chip_app_use_interaction_model) { - defines += [ "CHIP_APP_USE_INTERACTION_MODEL" ] - } } diff --git a/src/controller/CHIPClusters.cpp b/src/controller/CHIPClusters.cpp index a2bac1c5e27b0e..adb6a8dba4c3ef 100644 --- a/src/controller/CHIPClusters.cpp +++ b/src/controller/CHIPClusters.cpp @@ -107,7 +107,7 @@ CHIP_ERROR ApplicationBasicCluster::ReadAttributeClusterRevision(Callback::Cance CHIP_ERROR BarrierControlCluster::BarrierControlGoToPercent(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t percentOpen) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -141,7 +141,7 @@ CHIP_ERROR BarrierControlCluster::BarrierControlGoToPercent(Callback::Cancelable CHIP_ERROR BarrierControlCluster::BarrierControlStop(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -220,7 +220,7 @@ CHIP_ERROR BarrierControlCluster::ReadAttributeClusterRevision(Callback::Cancela // Basic Cluster Commands CHIP_ERROR BasicCluster::MfgSpecificPing(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -366,7 +366,7 @@ CHIP_ERROR BasicCluster::ReadAttributeClusterRevision(Callback::Cancelable * onS CHIP_ERROR BindingCluster::Bind(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, chip::NodeId nodeId, chip::GroupId groupId, chip::EndpointId endpointId, chip::ClusterId clusterId) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -407,7 +407,7 @@ CHIP_ERROR BindingCluster::Unbind(Callback::Cancelable * onSuccessCallback, Call chip::NodeId nodeId, chip::GroupId groupId, chip::EndpointId endpointId, chip::ClusterId clusterId) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -463,7 +463,7 @@ CHIP_ERROR BindingCluster::ReadAttributeClusterRevision(Callback::Cancelable * o CHIP_ERROR ColorControlCluster::MoveColor(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, int16_t rateX, int16_t rateY, uint8_t optionsMask, uint8_t optionsOverride) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -505,7 +505,7 @@ CHIP_ERROR ColorControlCluster::MoveColorTemperature(Callback::Cancelable * onSu uint16_t colorTemperatureMinimum, uint16_t colorTemperatureMaximum, uint8_t optionsMask, uint8_t optionsOverride) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -549,7 +549,7 @@ CHIP_ERROR ColorControlCluster::MoveColorTemperature(Callback::Cancelable * onSu CHIP_ERROR ColorControlCluster::MoveHue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t moveMode, uint8_t rate, uint8_t optionsMask, uint8_t optionsOverride) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -589,7 +589,7 @@ CHIP_ERROR ColorControlCluster::MoveHue(Callback::Cancelable * onSuccessCallback CHIP_ERROR ColorControlCluster::MoveSaturation(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t moveMode, uint8_t rate, uint8_t optionsMask, uint8_t optionsOverride) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -630,7 +630,7 @@ CHIP_ERROR ColorControlCluster::MoveToColor(Callback::Cancelable * onSuccessCall uint16_t colorX, uint16_t colorY, uint16_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -673,7 +673,7 @@ CHIP_ERROR ColorControlCluster::MoveToColorTemperature(Callback::Cancelable * on Callback::Cancelable * onFailureCallback, uint16_t colorTemperature, uint16_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -714,7 +714,7 @@ CHIP_ERROR ColorControlCluster::MoveToHue(Callback::Cancelable * onSuccessCallba uint8_t hue, uint8_t direction, uint16_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -757,7 +757,7 @@ CHIP_ERROR ColorControlCluster::MoveToHueAndSaturation(Callback::Cancelable * on Callback::Cancelable * onFailureCallback, uint8_t hue, uint8_t saturation, uint16_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -800,7 +800,7 @@ CHIP_ERROR ColorControlCluster::MoveToSaturation(Callback::Cancelable * onSucces uint8_t saturation, uint16_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -841,7 +841,7 @@ CHIP_ERROR ColorControlCluster::StepColor(Callback::Cancelable * onSuccessCallba int16_t stepX, int16_t stepY, uint16_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -885,7 +885,7 @@ CHIP_ERROR ColorControlCluster::StepColorTemperature(Callback::Cancelable * onSu uint16_t transitionTime, uint16_t colorTemperatureMinimum, uint16_t colorTemperatureMaximum, uint8_t optionsMask, uint8_t optionsOverride) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -933,7 +933,7 @@ CHIP_ERROR ColorControlCluster::StepHue(Callback::Cancelable * onSuccessCallback uint8_t stepMode, uint8_t stepSize, uint8_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -976,7 +976,7 @@ CHIP_ERROR ColorControlCluster::StepSaturation(Callback::Cancelable * onSuccessC uint8_t stepMode, uint8_t stepSize, uint8_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -1018,7 +1018,7 @@ CHIP_ERROR ColorControlCluster::StepSaturation(Callback::Cancelable * onSuccessC CHIP_ERROR ColorControlCluster::StopMoveStep(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t optionsMask, uint8_t optionsOverride) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -1657,7 +1657,7 @@ CHIP_ERROR ColorControlCluster::ReadAttributeClusterRevision(Callback::Cancelabl // DoorLock Cluster Commands CHIP_ERROR DoorLockCluster::ClearAllPins(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -1687,7 +1687,7 @@ CHIP_ERROR DoorLockCluster::ClearAllPins(Callback::Cancelable * onSuccessCallbac CHIP_ERROR DoorLockCluster::ClearAllRfids(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -1718,7 +1718,7 @@ CHIP_ERROR DoorLockCluster::ClearAllRfids(Callback::Cancelable * onSuccessCallba CHIP_ERROR DoorLockCluster::ClearHolidaySchedule(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t scheduleId) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -1751,7 +1751,7 @@ CHIP_ERROR DoorLockCluster::ClearHolidaySchedule(Callback::Cancelable * onSucces CHIP_ERROR DoorLockCluster::ClearPin(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t userId) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -1784,7 +1784,7 @@ CHIP_ERROR DoorLockCluster::ClearPin(Callback::Cancelable * onSuccessCallback, C CHIP_ERROR DoorLockCluster::ClearRfid(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t userId) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -1817,7 +1817,7 @@ CHIP_ERROR DoorLockCluster::ClearRfid(Callback::Cancelable * onSuccessCallback, CHIP_ERROR DoorLockCluster::ClearWeekdaySchedule(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t scheduleId, uint16_t userId) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -1853,7 +1853,7 @@ CHIP_ERROR DoorLockCluster::ClearWeekdaySchedule(Callback::Cancelable * onSucces CHIP_ERROR DoorLockCluster::ClearYeardaySchedule(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t scheduleId, uint16_t userId) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -1889,7 +1889,7 @@ CHIP_ERROR DoorLockCluster::ClearYeardaySchedule(Callback::Cancelable * onSucces CHIP_ERROR DoorLockCluster::GetHolidaySchedule(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t scheduleId) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -1922,7 +1922,7 @@ CHIP_ERROR DoorLockCluster::GetHolidaySchedule(Callback::Cancelable * onSuccessC CHIP_ERROR DoorLockCluster::GetLogRecord(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t logIndex) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -1955,7 +1955,7 @@ CHIP_ERROR DoorLockCluster::GetLogRecord(Callback::Cancelable * onSuccessCallbac CHIP_ERROR DoorLockCluster::GetPin(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t userId) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -1988,7 +1988,7 @@ CHIP_ERROR DoorLockCluster::GetPin(Callback::Cancelable * onSuccessCallback, Cal CHIP_ERROR DoorLockCluster::GetRfid(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t userId) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -2021,7 +2021,7 @@ CHIP_ERROR DoorLockCluster::GetRfid(Callback::Cancelable * onSuccessCallback, Ca CHIP_ERROR DoorLockCluster::GetUserType(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t userId) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -2054,7 +2054,7 @@ CHIP_ERROR DoorLockCluster::GetUserType(Callback::Cancelable * onSuccessCallback CHIP_ERROR DoorLockCluster::GetWeekdaySchedule(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t scheduleId, uint16_t userId) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -2090,7 +2090,7 @@ CHIP_ERROR DoorLockCluster::GetWeekdaySchedule(Callback::Cancelable * onSuccessC CHIP_ERROR DoorLockCluster::GetYeardaySchedule(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t scheduleId, uint16_t userId) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -2126,7 +2126,7 @@ CHIP_ERROR DoorLockCluster::GetYeardaySchedule(Callback::Cancelable * onSuccessC CHIP_ERROR DoorLockCluster::LockDoor(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, chip::ByteSpan pin) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -2142,7 +2142,7 @@ CHIP_ERROR DoorLockCluster::LockDoor(Callback::Cancelable * onSuccessCallback, C uint8_t argSeqNumber = 0; // pin: charString - ReturnErrorOnFailure(writer.PutString(TLV::ContextTag(argSeqNumber++), pin)); + ReturnErrorOnFailure(writer.Put(TLV::ContextTag(argSeqNumber++), pin)); ReturnErrorOnFailure(writer.EndContainer(dummyType)); ReturnErrorOnFailure(writer.Finalize()); @@ -2160,7 +2160,7 @@ CHIP_ERROR DoorLockCluster::SetHolidaySchedule(Callback::Cancelable * onSuccessC uint8_t scheduleId, uint32_t localStartTime, uint32_t localEndTime, uint8_t operatingModeDuringHoliday) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -2200,7 +2200,7 @@ CHIP_ERROR DoorLockCluster::SetHolidaySchedule(Callback::Cancelable * onSuccessC CHIP_ERROR DoorLockCluster::SetPin(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t userId, uint8_t userStatus, uint8_t userType, chip::ByteSpan pin) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -2222,7 +2222,7 @@ CHIP_ERROR DoorLockCluster::SetPin(Callback::Cancelable * onSuccessCallback, Cal // userType: doorLockUserType ReturnErrorOnFailure(writer.Put(TLV::ContextTag(argSeqNumber++), userType)); // pin: charString - ReturnErrorOnFailure(writer.PutString(TLV::ContextTag(argSeqNumber++), pin)); + ReturnErrorOnFailure(writer.Put(TLV::ContextTag(argSeqNumber++), pin)); ReturnErrorOnFailure(writer.EndContainer(dummyType)); ReturnErrorOnFailure(writer.Finalize()); @@ -2240,7 +2240,7 @@ CHIP_ERROR DoorLockCluster::SetPin(Callback::Cancelable * onSuccessCallback, Cal CHIP_ERROR DoorLockCluster::SetRfid(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t userId, uint8_t userStatus, uint8_t userType, chip::ByteSpan id) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -2262,7 +2262,7 @@ CHIP_ERROR DoorLockCluster::SetRfid(Callback::Cancelable * onSuccessCallback, Ca // userType: doorLockUserType ReturnErrorOnFailure(writer.Put(TLV::ContextTag(argSeqNumber++), userType)); // id: charString - ReturnErrorOnFailure(writer.PutString(TLV::ContextTag(argSeqNumber++), id)); + ReturnErrorOnFailure(writer.Put(TLV::ContextTag(argSeqNumber++), id)); ReturnErrorOnFailure(writer.EndContainer(dummyType)); ReturnErrorOnFailure(writer.Finalize()); @@ -2280,7 +2280,7 @@ CHIP_ERROR DoorLockCluster::SetRfid(Callback::Cancelable * onSuccessCallback, Ca CHIP_ERROR DoorLockCluster::SetUserType(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t userId, uint8_t userType) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -2316,7 +2316,7 @@ CHIP_ERROR DoorLockCluster::SetWeekdaySchedule(Callback::Cancelable * onSuccessC uint8_t scheduleId, uint16_t userId, uint8_t daysMask, uint8_t startHour, uint8_t startMinute, uint8_t endHour, uint8_t endMinute) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -2362,7 +2362,7 @@ CHIP_ERROR DoorLockCluster::SetWeekdaySchedule(Callback::Cancelable * onSuccessC CHIP_ERROR DoorLockCluster::SetYeardaySchedule(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t scheduleId, uint16_t userId, uint32_t localStartTime, uint32_t localEndTime) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -2402,7 +2402,7 @@ CHIP_ERROR DoorLockCluster::SetYeardaySchedule(Callback::Cancelable * onSuccessC CHIP_ERROR DoorLockCluster::UnlockDoor(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, chip::ByteSpan pin) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -2418,7 +2418,7 @@ CHIP_ERROR DoorLockCluster::UnlockDoor(Callback::Cancelable * onSuccessCallback, uint8_t argSeqNumber = 0; // pin: charString - ReturnErrorOnFailure(writer.PutString(TLV::ContextTag(argSeqNumber++), pin)); + ReturnErrorOnFailure(writer.Put(TLV::ContextTag(argSeqNumber++), pin)); ReturnErrorOnFailure(writer.EndContainer(dummyType)); ReturnErrorOnFailure(writer.Finalize()); @@ -2435,7 +2435,7 @@ CHIP_ERROR DoorLockCluster::UnlockDoor(Callback::Cancelable * onSuccessCallback, CHIP_ERROR DoorLockCluster::UnlockWithTimeout(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t timeoutInSeconds, chip::ByteSpan pin) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -2453,7 +2453,7 @@ CHIP_ERROR DoorLockCluster::UnlockWithTimeout(Callback::Cancelable * onSuccessCa // timeoutInSeconds: int16u ReturnErrorOnFailure(writer.Put(TLV::ContextTag(argSeqNumber++), timeoutInSeconds)); // pin: charString - ReturnErrorOnFailure(writer.PutString(TLV::ContextTag(argSeqNumber++), pin)); + ReturnErrorOnFailure(writer.Put(TLV::ContextTag(argSeqNumber++), pin)); ReturnErrorOnFailure(writer.EndContainer(dummyType)); ReturnErrorOnFailure(writer.Finalize()); @@ -2527,7 +2527,7 @@ CHIP_ERROR GeneralCommissioningCluster::ArmFailSafe(Callback::Cancelable * onSuc Callback::Cancelable * onFailureCallback, uint16_t expiryLengthSeconds, uint64_t breadcrumb, uint32_t timeoutMs) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -2565,7 +2565,7 @@ CHIP_ERROR GeneralCommissioningCluster::ArmFailSafe(Callback::Cancelable * onSuc CHIP_ERROR GeneralCommissioningCluster::CommissioningComplete(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -2597,7 +2597,7 @@ CHIP_ERROR GeneralCommissioningCluster::SetFabric(Callback::Cancelable * onSucce Callback::Cancelable * onFailureCallback, chip::ByteSpan fabricId, chip::ByteSpan fabricSecret, uint64_t breadcrumb, uint32_t timeoutMs) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -2711,7 +2711,7 @@ CHIP_ERROR GroupKeyManagementCluster::ReadAttributeClusterRevision(Callback::Can CHIP_ERROR GroupsCluster::AddGroup(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t groupId, chip::ByteSpan groupName) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -2729,7 +2729,7 @@ CHIP_ERROR GroupsCluster::AddGroup(Callback::Cancelable * onSuccessCallback, Cal // groupId: int16u ReturnErrorOnFailure(writer.Put(TLV::ContextTag(argSeqNumber++), groupId)); // groupName: charString - ReturnErrorOnFailure(writer.PutString(TLV::ContextTag(argSeqNumber++), groupName)); + ReturnErrorOnFailure(writer.Put(TLV::ContextTag(argSeqNumber++), groupName)); ReturnErrorOnFailure(writer.EndContainer(dummyType)); ReturnErrorOnFailure(writer.Finalize()); @@ -2746,7 +2746,7 @@ CHIP_ERROR GroupsCluster::AddGroup(Callback::Cancelable * onSuccessCallback, Cal CHIP_ERROR GroupsCluster::AddGroupIfIdentifying(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t groupId, chip::ByteSpan groupName) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -2764,7 +2764,7 @@ CHIP_ERROR GroupsCluster::AddGroupIfIdentifying(Callback::Cancelable * onSuccess // groupId: int16u ReturnErrorOnFailure(writer.Put(TLV::ContextTag(argSeqNumber++), groupId)); // groupName: charString - ReturnErrorOnFailure(writer.PutString(TLV::ContextTag(argSeqNumber++), groupName)); + ReturnErrorOnFailure(writer.Put(TLV::ContextTag(argSeqNumber++), groupName)); ReturnErrorOnFailure(writer.EndContainer(dummyType)); ReturnErrorOnFailure(writer.Finalize()); @@ -2782,7 +2782,7 @@ CHIP_ERROR GroupsCluster::AddGroupIfIdentifying(Callback::Cancelable * onSuccess CHIP_ERROR GroupsCluster::GetGroupMembership(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t groupCount, uint16_t groupList) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -2817,7 +2817,7 @@ CHIP_ERROR GroupsCluster::GetGroupMembership(Callback::Cancelable * onSuccessCal CHIP_ERROR GroupsCluster::RemoveAllGroups(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -2848,7 +2848,7 @@ CHIP_ERROR GroupsCluster::RemoveAllGroups(Callback::Cancelable * onSuccessCallba CHIP_ERROR GroupsCluster::RemoveGroup(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t groupId) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -2881,7 +2881,7 @@ CHIP_ERROR GroupsCluster::RemoveGroup(Callback::Cancelable * onSuccessCallback, CHIP_ERROR GroupsCluster::ViewGroup(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t groupId) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -3000,7 +3000,7 @@ CHIP_ERROR IasZoneCluster::ReadAttributeClusterRevision(Callback::Cancelable * o CHIP_ERROR IdentifyCluster::Identify(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t identifyTime) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -3032,7 +3032,7 @@ CHIP_ERROR IdentifyCluster::Identify(Callback::Cancelable * onSuccessCallback, C CHIP_ERROR IdentifyCluster::IdentifyQuery(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -3095,7 +3095,7 @@ CHIP_ERROR IdentifyCluster::ReadAttributeClusterRevision(Callback::Cancelable * CHIP_ERROR LevelControlCluster::Move(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t moveMode, uint8_t rate, uint8_t optionMask, uint8_t optionOverride) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -3135,7 +3135,7 @@ CHIP_ERROR LevelControlCluster::Move(Callback::Cancelable * onSuccessCallback, C CHIP_ERROR LevelControlCluster::MoveToLevel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t level, uint16_t transitionTime, uint8_t optionMask, uint8_t optionOverride) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -3176,7 +3176,7 @@ CHIP_ERROR LevelControlCluster::MoveToLevelWithOnOff(Callback::Cancelable * onSu Callback::Cancelable * onFailureCallback, uint8_t level, uint16_t transitionTime) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -3212,7 +3212,7 @@ CHIP_ERROR LevelControlCluster::MoveToLevelWithOnOff(Callback::Cancelable * onSu CHIP_ERROR LevelControlCluster::MoveWithOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t moveMode, uint8_t rate) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -3248,7 +3248,7 @@ CHIP_ERROR LevelControlCluster::Step(Callback::Cancelable * onSuccessCallback, C uint8_t stepMode, uint8_t stepSize, uint16_t transitionTime, uint8_t optionMask, uint8_t optionOverride) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -3290,7 +3290,7 @@ CHIP_ERROR LevelControlCluster::Step(Callback::Cancelable * onSuccessCallback, C CHIP_ERROR LevelControlCluster::StepWithOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t stepMode, uint8_t stepSize, uint16_t transitionTime) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -3328,7 +3328,7 @@ CHIP_ERROR LevelControlCluster::StepWithOnOff(Callback::Cancelable * onSuccessCa CHIP_ERROR LevelControlCluster::Stop(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t optionMask, uint8_t optionOverride) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -3362,7 +3362,7 @@ CHIP_ERROR LevelControlCluster::Stop(Callback::Cancelable * onSuccessCallback, C CHIP_ERROR LevelControlCluster::StopWithOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -3432,7 +3432,7 @@ CHIP_ERROR LevelControlCluster::ReadAttributeClusterRevision(Callback::Cancelabl // LowPower Cluster Commands CHIP_ERROR LowPowerCluster::Sleep(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -3480,7 +3480,7 @@ CHIP_ERROR NetworkCommissioningCluster::AddThreadNetwork(Callback::Cancelable * Callback::Cancelable * onFailureCallback, chip::ByteSpan operationalDataset, uint64_t breadcrumb, uint32_t timeoutMs) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -3519,7 +3519,7 @@ CHIP_ERROR NetworkCommissioningCluster::AddWiFiNetwork(Callback::Cancelable * on Callback::Cancelable * onFailureCallback, chip::ByteSpan ssid, chip::ByteSpan credentials, uint64_t breadcrumb, uint32_t timeoutMs) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -3560,7 +3560,7 @@ CHIP_ERROR NetworkCommissioningCluster::DisableNetwork(Callback::Cancelable * on Callback::Cancelable * onFailureCallback, chip::ByteSpan networkID, uint64_t breadcrumb, uint32_t timeoutMs) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -3599,7 +3599,7 @@ CHIP_ERROR NetworkCommissioningCluster::EnableNetwork(Callback::Cancelable * onS Callback::Cancelable * onFailureCallback, chip::ByteSpan networkID, uint64_t breadcrumb, uint32_t timeoutMs) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -3638,7 +3638,7 @@ CHIP_ERROR NetworkCommissioningCluster::GetLastNetworkCommissioningResult(Callba Callback::Cancelable * onFailureCallback, uint32_t timeoutMs) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -3673,7 +3673,7 @@ CHIP_ERROR NetworkCommissioningCluster::RemoveNetwork(Callback::Cancelable * onS Callback::Cancelable * onFailureCallback, chip::ByteSpan networkID, uint64_t breadcrumb, uint32_t timeoutMs) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -3712,7 +3712,7 @@ CHIP_ERROR NetworkCommissioningCluster::ScanNetworks(Callback::Cancelable * onSu Callback::Cancelable * onFailureCallback, chip::ByteSpan ssid, uint64_t breadcrumb, uint32_t timeoutMs) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -3752,7 +3752,7 @@ CHIP_ERROR NetworkCommissioningCluster::UpdateThreadNetwork(Callback::Cancelable chip::ByteSpan operationalDataset, uint64_t breadcrumb, uint32_t timeoutMs) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -3791,7 +3791,7 @@ CHIP_ERROR NetworkCommissioningCluster::UpdateWiFiNetwork(Callback::Cancelable * Callback::Cancelable * onFailureCallback, chip::ByteSpan ssid, chip::ByteSpan credentials, uint64_t breadcrumb, uint32_t timeoutMs) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -3847,7 +3847,7 @@ CHIP_ERROR NetworkCommissioningCluster::ReadAttributeClusterRevision(Callback::C // OnOff Cluster Commands CHIP_ERROR OnOffCluster::Off(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -3877,7 +3877,7 @@ CHIP_ERROR OnOffCluster::Off(Callback::Cancelable * onSuccessCallback, Callback: CHIP_ERROR OnOffCluster::On(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -3907,7 +3907,7 @@ CHIP_ERROR OnOffCluster::On(Callback::Cancelable * onSuccessCallback, Callback:: CHIP_ERROR OnOffCluster::Toggle(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -3976,7 +3976,7 @@ CHIP_ERROR ScenesCluster::AddScene(Callback::Cancelable * onSuccessCallback, Cal uint16_t groupId, uint8_t sceneId, uint16_t transitionTime, chip::ByteSpan sceneName, chip::ClusterId clusterId, uint8_t length, uint8_t value) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -3998,7 +3998,7 @@ CHIP_ERROR ScenesCluster::AddScene(Callback::Cancelable * onSuccessCallback, Cal // transitionTime: int16u ReturnErrorOnFailure(writer.Put(TLV::ContextTag(argSeqNumber++), transitionTime)); // sceneName: charString - ReturnErrorOnFailure(writer.PutString(TLV::ContextTag(argSeqNumber++), sceneName)); + ReturnErrorOnFailure(writer.Put(TLV::ContextTag(argSeqNumber++), sceneName)); // clusterId: clusterId ReturnErrorOnFailure(writer.Put(TLV::ContextTag(argSeqNumber++), clusterId)); // length: int8u @@ -4022,7 +4022,7 @@ CHIP_ERROR ScenesCluster::AddScene(Callback::Cancelable * onSuccessCallback, Cal CHIP_ERROR ScenesCluster::GetSceneMembership(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t groupId) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -4055,7 +4055,7 @@ CHIP_ERROR ScenesCluster::GetSceneMembership(Callback::Cancelable * onSuccessCal CHIP_ERROR ScenesCluster::RecallScene(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t groupId, uint8_t sceneId, uint16_t transitionTime) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -4093,7 +4093,7 @@ CHIP_ERROR ScenesCluster::RecallScene(Callback::Cancelable * onSuccessCallback, CHIP_ERROR ScenesCluster::RemoveAllScenes(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t groupId) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -4126,7 +4126,7 @@ CHIP_ERROR ScenesCluster::RemoveAllScenes(Callback::Cancelable * onSuccessCallba CHIP_ERROR ScenesCluster::RemoveScene(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t groupId, uint8_t sceneId) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -4161,7 +4161,7 @@ CHIP_ERROR ScenesCluster::RemoveScene(Callback::Cancelable * onSuccessCallback, CHIP_ERROR ScenesCluster::StoreScene(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t groupId, uint8_t sceneId) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; @@ -4196,7 +4196,7 @@ CHIP_ERROR ScenesCluster::StoreScene(Callback::Cancelable * onSuccessCallback, C CHIP_ERROR ScenesCluster::ViewScene(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t groupId, uint8_t sceneId) { -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); (void) onSuccessCallback; (void) onFailureCallback; diff --git a/src/controller/CHIPDevice.h b/src/controller/CHIPDevice.h index 27d40da384b458..bf3d55c4e6c5f0 100644 --- a/src/controller/CHIPDevice.h +++ b/src/controller/CHIPDevice.h @@ -112,7 +112,7 @@ class DLL_EXPORT Device mCommandSender->Shutdown(); mCommandSender = nullptr; } -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL chip::app::InteractionModelEngine::GetInstance()->NewCommandSender(&mCommandSender); #endif } diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 8fe52740900572..68a474c9a4b103 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -136,7 +136,7 @@ CHIP_ERROR DeviceController::Init(NodeId localDeviceId, PersistentStorageDelegat mTransportMgr = chip::Platform::New(); mSessionManager = chip::Platform::New(); -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL mExchangeManager = chip::Platform::New(); #endif @@ -155,10 +155,10 @@ CHIP_ERROR DeviceController::Init(NodeId localDeviceId, PersistentStorageDelegat err = mSessionManager->Init(localDeviceId, mSystemLayer, mTransportMgr, &mAdmins); SuccessOrExit(err); -#ifdef CHIP_APP_USE_INTERACTION_MODEL +#if CHIP_ENABLE_INTERACTION_MODEL err = mExchangeManager->Init(mSessionManager); SuccessOrExit(err); - err = chip::app::InteractionModelEngine::GetInstance()->Init(mExchangeManager); + err = chip::app::InteractionModelEngine::GetInstance()->Init(mExchangeManager, nullptr); SuccessOrExit(err); #else mSessionManager->SetDelegate(this); diff --git a/src/lib/core/BUILD.gn b/src/lib/core/BUILD.gn index 529c5e05a8e24b..d3ea4878df32c6 100644 --- a/src/lib/core/BUILD.gn +++ b/src/lib/core/BUILD.gn @@ -56,6 +56,7 @@ buildconfig_header("chip_buildconfig") { "CHIP_CONFIG_MEMORY_DEBUG_CHECKS=${chip_config_memory_debug_checks}", "CHIP_CONFIG_MEMORY_DEBUG_DMALLOC=${chip_config_memory_debug_dmalloc}", "CHIP_CONFIG_PROVIDE_OBSOLESCENT_INTERFACES=false", + "CHIP_ENABLE_INTERACTION_MODEL=${chip_enable_interaction_model}", ] } diff --git a/src/lib/core/core.gni b/src/lib/core/core.gni index 15d6ea268c3757..5b4b7951806aff 100644 --- a/src/lib/core/core.gni +++ b/src/lib/core/core.gni @@ -44,6 +44,9 @@ declare_args() { # Memory management debug option: use dmalloc chip_config_memory_debug_dmalloc = false + + # Overall experimental options for CHIP + chip_enable_interaction_model = false } if (chip_target_style == "") {