Skip to content

Commit

Permalink
Zcl remove old reporting code (#10304)
Browse files Browse the repository at this point in the history
* Remove ZCL reporting code

* Update generated content
  • Loading branch information
vivien-apple authored and pull[bot] committed Oct 20, 2021
1 parent d51d007 commit ad5c545
Show file tree
Hide file tree
Showing 76 changed files with 41 additions and 4,280 deletions.
21 changes: 10 additions & 11 deletions examples/bridge-app/esp32/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,25 +314,25 @@ void HandleDeviceStatusChanged(Device * dev, Device::Changed_t itemChangedMask)
if (itemChangedMask & Device::kChanged_Reachable)
{
uint8_t reachable = dev->IsReachable() ? 1 : 0;
InteractionModelReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID,
ZCL_REACHABLE_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, 0,
ZCL_BOOLEAN_ATTRIBUTE_TYPE, &reachable);
MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID,
ZCL_REACHABLE_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, 0, ZCL_BOOLEAN_ATTRIBUTE_TYPE,
&reachable);
}

if (itemChangedMask & Device::kChanged_State)
{
uint8_t isOn = dev->IsOn() ? 1 : 0;
InteractionModelReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID,
CLUSTER_MASK_SERVER, 0, ZCL_BOOLEAN_ATTRIBUTE_TYPE, &isOn);
MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID,
CLUSTER_MASK_SERVER, 0, ZCL_BOOLEAN_ATTRIBUTE_TYPE, &isOn);
}

if (itemChangedMask & Device::kChanged_Name)
{
uint8_t zclName[kUserLabelSize];
ToZclCharString(zclName, dev->GetName(), kUserLabelSize - 1);
InteractionModelReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID,
ZCL_USER_LABEL_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, 0,
ZCL_CHAR_STRING_ATTRIBUTE_TYPE, zclName);
MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID,
ZCL_USER_LABEL_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, 0, ZCL_CHAR_STRING_ATTRIBUTE_TYPE,
zclName);
}
if (itemChangedMask & Device::kChanged_Location)
{
Expand All @@ -343,9 +343,8 @@ void HandleDeviceStatusChanged(Device * dev, Device::Changed_t itemChangedMask)

EncodeFixedLabel("room", dev->GetLocation(), buffer, sizeof(buffer), &am);

InteractionModelReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_FIXED_LABEL_CLUSTER_ID,
ZCL_LABEL_LIST_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, 0,
ZCL_ARRAY_ATTRIBUTE_TYPE, buffer);
MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_FIXED_LABEL_CLUSTER_ID, ZCL_LABEL_LIST_ATTRIBUTE_ID,
CLUSTER_MASK_SERVER, 0, ZCL_ARRAY_ATTRIBUTE_TYPE, buffer);
}
}

Expand Down
21 changes: 10 additions & 11 deletions examples/bridge-app/linux/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,26 +207,26 @@ void HandleDeviceStatusChanged(Device * dev, Device::Changed_t itemChangedMask)
if (itemChangedMask & Device::kChanged_Reachable)
{
uint8_t reachable = dev->IsReachable() ? 1 : 0;
InteractionModelReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID,
ZCL_REACHABLE_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, 0,
ZCL_BOOLEAN_ATTRIBUTE_TYPE, &reachable);
MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID,
ZCL_REACHABLE_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, 0, ZCL_BOOLEAN_ATTRIBUTE_TYPE,
&reachable);
}

if (itemChangedMask & Device::kChanged_State)
{
uint8_t isOn = dev->IsOn() ? 1 : 0;
InteractionModelReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID,
CLUSTER_MASK_SERVER, 0, ZCL_BOOLEAN_ATTRIBUTE_TYPE, &isOn);
MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID,
CLUSTER_MASK_SERVER, 0, ZCL_BOOLEAN_ATTRIBUTE_TYPE, &isOn);
}

if (itemChangedMask & Device::kChanged_Name)
{
uint8_t zclName[kUserLabelSize];
MutableByteSpan zclNameSpan(zclName);
MakeZclCharString(zclNameSpan, dev->GetName());
InteractionModelReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID,
ZCL_USER_LABEL_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, 0,
ZCL_CHAR_STRING_ATTRIBUTE_TYPE, zclNameSpan.data());
MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID,
ZCL_USER_LABEL_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, 0, ZCL_CHAR_STRING_ATTRIBUTE_TYPE,
zclNameSpan.data());
}

if (itemChangedMask & Device::kChanged_Location)
Expand All @@ -238,9 +238,8 @@ void HandleDeviceStatusChanged(Device * dev, Device::Changed_t itemChangedMask)

EncodeFixedLabel("room", dev->GetLocation(), buffer, sizeof(buffer), &am);

InteractionModelReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_FIXED_LABEL_CLUSTER_ID,
ZCL_LABEL_LIST_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, 0,
ZCL_ARRAY_ATTRIBUTE_TYPE, buffer);
MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_FIXED_LABEL_CLUSTER_ID, ZCL_LABEL_LIST_ATTRIBUTE_ID,
CLUSTER_MASK_SERVER, 0, ZCL_ARRAY_ATTRIBUTE_TYPE, buffer);
}
}

Expand Down
2 changes: 0 additions & 2 deletions examples/lighting-app/mbed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ target_sources(${APP_TARGET} PRIVATE
${CHIP_ROOT}/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp
${CHIP_ROOT}/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp
${CHIP_ROOT}/src/app/util/DataModelHandler.cpp
${CHIP_ROOT}/src/app/reporting/reporting-default-configuration.cpp
${CHIP_ROOT}/src/app/reporting/reporting.cpp
${CHIP_ROOT}/src/app/util/af-event.cpp
${CHIP_ROOT}/src/app/util/af-main-common.cpp
${CHIP_ROOT}/src/app/util/attribute-list-byte-span.cpp
Expand Down
2 changes: 0 additions & 2 deletions examples/lighting-app/telink/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ target_sources(app PRIVATE
${CHIP_ROOT}/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp
${CHIP_ROOT}/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp
${CHIP_ROOT}/src/app/util/DataModelHandler.cpp
${CHIP_ROOT}/src/app/reporting/reporting-default-configuration.cpp
${CHIP_ROOT}/src/app/reporting/reporting.cpp
${CHIP_ROOT}/src/app/util/af-event.cpp
${CHIP_ROOT}/src/app/util/af-main-common.cpp
${CHIP_ROOT}/src/app/util/attribute-list-byte-span.cpp
Expand Down
2 changes: 0 additions & 2 deletions examples/lock-app/mbed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ target_sources(${APP_TARGET} PRIVATE
${CHIP_ROOT}/src/app/util/DataModelHandler.cpp
${CHIP_ROOT}/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp
${CHIP_ROOT}/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp
${CHIP_ROOT}/src/app/reporting/reporting-default-configuration.cpp
${CHIP_ROOT}/src/app/reporting/reporting.cpp
${CHIP_ROOT}/src/app/util/af-event.cpp
${CHIP_ROOT}/src/app/util/af-main-common.cpp
${CHIP_ROOT}/src/app/util/attribute-list-byte-span.cpp
Expand Down
2 changes: 0 additions & 2 deletions src/app/chip_data_model.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ function(chip_configure_data_model APP_TARGET)
target_sources(${APP_TARGET} PRIVATE
${CHIP_APP_BASE_DIR}/../../zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp
${CHIP_APP_BASE_DIR}/../../zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp
${CHIP_APP_BASE_DIR}/reporting/reporting-default-configuration.cpp
${CHIP_APP_BASE_DIR}/reporting/reporting.cpp
${CHIP_APP_BASE_DIR}/util/af-event.cpp
${CHIP_APP_BASE_DIR}/util/af-main-common.cpp
${CHIP_APP_BASE_DIR}/util/attribute-list-byte-span.cpp
Expand Down
3 changes: 0 additions & 3 deletions src/app/chip_data_model.gni
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ template("chip_data_model") {
"${_app_root}/clusters/zll-on-off-server/zll-on-off-server.h",
"${_app_root}/clusters/zll-scenes-server/zll-scenes-server.h",
"${_app_root}/encoder-common.cpp",
"${_app_root}/reporting/reporting-default-configuration.cpp",
"${_app_root}/reporting/reporting-tokens.h",
"${_app_root}/reporting/reporting.cpp",
"${_app_root}/reporting/reporting.h",
"${_app_root}/util/DataModelHandler.cpp",
"${_app_root}/util/af-event.cpp",
Expand Down
131 changes: 0 additions & 131 deletions src/app/reporting/reporting-default-configuration.cpp

This file was deleted.

65 changes: 0 additions & 65 deletions src/app/reporting/reporting-tokens.h

This file was deleted.

Loading

0 comments on commit ad5c545

Please sign in to comment.