Skip to content

Commit 1442348

Browse files
bzbarsky-applepull[bot]
authored andcommitted
Remove a bunch of just-about-dead Ember message send code. (#14571)
sendToClient in ias-zone-server is the only place all this machinery could be reached from in practice. And since at that one callsite the machinery is not going to do anything useful, there's no point in pretending like it works and keeping it.
1 parent 854d0be commit 1442348

23 files changed

+13
-1764
lines changed

examples/all-clusters-app/mbed/CMakeLists.txt

-2
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,10 @@ target_sources(${APP_TARGET} PRIVATE
7171

7272
${APP_UTIL}/DataModelHandler.cpp
7373
${APP_UTIL}/af-event.cpp
74-
${APP_UTIL}/af-main-common.cpp
7574
${APP_UTIL}/attribute-storage.cpp
7675
${APP_UTIL}/attribute-table.cpp
7776
${APP_UTIL}/attribute-size-util.cpp
7877
${APP_UTIL}/binding-table.cpp
79-
${APP_UTIL}/chip-message-send.cpp
8078
${APP_UTIL}/client-api.cpp
8179
${APP_UTIL}/ember-print.cpp
8280
${APP_UTIL}/ember-compatibility-functions.cpp

examples/lighting-app/telink/CMakeLists.txt

-2
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,10 @@ target_sources(app PRIVATE
5454
${CHIP_ROOT}/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp
5555
${CHIP_ROOT}/src/app/util/DataModelHandler.cpp
5656
${CHIP_ROOT}/src/app/util/af-event.cpp
57-
${CHIP_ROOT}/src/app/util/af-main-common.cpp
5857
${CHIP_ROOT}/src/app/util/attribute-size-util.cpp
5958
${CHIP_ROOT}/src/app/util/attribute-storage.cpp
6059
${CHIP_ROOT}/src/app/util/attribute-table.cpp
6160
${CHIP_ROOT}/src/app/util/binding-table.cpp
62-
${CHIP_ROOT}/src/app/util/chip-message-send.cpp
6361
${CHIP_ROOT}/src/app/util/client-api.cpp
6462
${CHIP_ROOT}/src/app/util/ember-compatibility-functions.cpp
6563
${CHIP_ROOT}/src/app/util/ember-print.cpp

src/app/BUILD.gn

-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ static_library("app") {
145145
"TimedRequest.h",
146146
"WriteClient.cpp",
147147
"WriteHandler.cpp",
148-
"encoder-common.cpp",
149148
"reporting/Engine.cpp",
150149
"reporting/Engine.h",
151150
]

src/app/chip-zcl-zpro-codec.h

-35
Original file line numberDiff line numberDiff line change
@@ -41,38 +41,3 @@ typedef struct
4141
uint8_t sequence;
4242
uint8_t radius;
4343
} EmberApsFrame;
44-
45-
/**
46-
* @brief Encode an APS frame into the given buffer. Returns the number of
47-
* bytes of buffer used by the encoding or 0 if the given buffer is not big
48-
* enough. If buffer is null, no encoding will happen; the function will
49-
* instead return the number of bytes that would be needed to encode the APS
50-
* frame.
51-
*
52-
* @param[in] buffer The buffer to write to. If null, the call is in "count the
53-
* bytes" mode, and no writing will happen.
54-
* @parem[in] buf_length The size of the buffer. Ignored if buffer is null.
55-
* @param[in] apsFrame The frame to encode.
56-
*
57-
* @return
58-
* - If buffer is null, the number of bytes needed to encode. If this number
59-
* does not fit in a uint16_t, 0 will be returned.
60-
* - If buffer is non-null but buf_length is not enough to hold the
61-
* EmberApsFrame, 0.
62-
* - If buffer is non-null and buf_length is large enough, the number of bytes
63-
* placed in buffer.
64-
*/
65-
uint16_t encodeApsFrame(uint8_t * buffer, uint16_t buf_length, EmberApsFrame * apsFrame);
66-
67-
/**
68-
* @brief Encode the given informations into the given BufferWriter.
69-
* Returns the number of bytes of buffer used by the encoding or 0 if
70-
* the given buffer is not big enough.
71-
*
72-
* @return
73-
* - If the buffer length is not enough to hold the EmberApsFrame, 0.
74-
* - If the buffer length is large enough, the number of bytes placed in buffer.
75-
*/
76-
uint16_t doEncodeApsFrame(chip::Encoding::LittleEndian::BufferWriter & buf, chip::ClusterId clusterId,
77-
chip::EndpointId sourceEndpoint, chip::EndpointId destinationEndpoint, EmberApsOption options,
78-
chip::GroupId groupId, uint8_t sequence, uint8_t radius, bool isMeasuring);

src/app/chip_data_model.cmake

-2
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,10 @@ function(chip_configure_data_model APP_TARGET)
8181
${CHIP_APP_BASE_DIR}/../../zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp
8282
${CHIP_APP_BASE_DIR}/../../zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp
8383
${CHIP_APP_BASE_DIR}/util/af-event.cpp
84-
${CHIP_APP_BASE_DIR}/util/af-main-common.cpp
8584
${CHIP_APP_BASE_DIR}/util/attribute-size-util.cpp
8685
${CHIP_APP_BASE_DIR}/util/attribute-storage.cpp
8786
${CHIP_APP_BASE_DIR}/util/attribute-table.cpp
8887
${CHIP_APP_BASE_DIR}/util/binding-table.cpp
89-
${CHIP_APP_BASE_DIR}/util/chip-message-send.cpp
9088
${CHIP_APP_BASE_DIR}/util/client-api.cpp
9189
${CHIP_APP_BASE_DIR}/util/DataModelHandler.cpp
9290
${CHIP_APP_BASE_DIR}/util/ember-compatibility-functions.cpp

src/app/chip_data_model.gni

-3
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,13 @@ template("chip_data_model") {
9595
"${_app_root}/clusters/zll-level-control-server/zll-level-control-server.h",
9696
"${_app_root}/clusters/zll-on-off-server/zll-on-off-server.h",
9797
"${_app_root}/clusters/zll-scenes-server/zll-scenes-server.h",
98-
"${_app_root}/encoder-common.cpp",
9998
"${_app_root}/reporting/reporting.h",
10099
"${_app_root}/util/DataModelHandler.cpp",
101100
"${_app_root}/util/af-event.cpp",
102-
"${_app_root}/util/af-main-common.cpp",
103101
"${_app_root}/util/attribute-size-util.cpp",
104102
"${_app_root}/util/attribute-storage.cpp",
105103
"${_app_root}/util/attribute-table.cpp",
106104
"${_app_root}/util/binding-table.cpp",
107-
"${_app_root}/util/chip-message-send.cpp",
108105
"${_app_root}/util/client-api.cpp",
109106
"${_app_root}/util/ember-compatibility-functions.cpp",
110107
"${_app_root}/util/ember-print.cpp",

src/app/clusters/ias-zone-server/ias-zone-server.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,15 @@ static EmberStatus sendToClient(EndpointId endpoint)
184184
// emberAfSendCommandUnicastToBindings()
185185
emberAfSetCommandEndpoints(endpoint, 0);
186186

187+
// TODO: Figure out how this sending should actually work in Matter.
188+
#if 0
187189
// A binding table entry is created on Zone Enrollment for each endpoint, so
188190
// a simple call to SendCommandUnicastToBinding will handle determining the
189191
// destination endpoint, address, etc for us.
190192
status = emberAfSendCommandUnicastToBindings();
193+
#else
194+
status = EMBER_ERR_FATAL;
195+
#endif
191196

192197
if (EMBER_SUCCESS != status)
193198
{

src/app/encoder-common.cpp

-68
This file was deleted.

0 commit comments

Comments
 (0)