Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove emberAfSetDeviceEnabled. #23851

Merged
merged 1 commit into from
Dec 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions src/app/util/af.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,16 +303,6 @@ void emberAfCopyLongString(uint8_t * dest, const uint8_t * src, size_t size);
*/
bool emberAfIsDeviceIdentifying(chip::EndpointId endpoint);

/**
* @brief Function that enables or disables an endpoint.
*
* By calling this function, you turn off all processing of incoming traffic
* for a given endpoint.
*
* @param endpoint Zigbee endpoint number
*/
void emberAfSetDeviceEnabled(chip::EndpointId endpoint, bool enabled);

/** @} END Device Control */

/** @name Miscellaneous */
Expand Down
2 changes: 0 additions & 2 deletions src/app/util/attribute-storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ EmberAfStatus emberAfSetDynamicEndpoint(uint16_t index, EndpointId id, const Emb

// Now enable the endpoint.
emberAfEndpointEnableDisable(id, true);
emberAfSetDeviceEnabled(id, true);

return EMBER_ZCL_STATUS_SUCCESS;
}
Expand All @@ -257,7 +256,6 @@ EndpointId emberAfClearDynamicEndpoint(uint16_t index)
(emberAfEndpointIndexIsEnabled(index)))
{
ep = emAfEndpoints[index].endpoint;
emberAfSetDeviceEnabled(ep, false);
emberAfEndpointEnableDisable(ep, false);
emAfEndpoints[index].endpoint = kInvalidEndpointId;
}
Expand Down
20 changes: 0 additions & 20 deletions src/app/util/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ using namespace chip;
//------------------------------------------------------------------------------
// Globals

// Storage and functions for turning on and off devices
bool afDeviceEnabled[MAX_ENDPOINT_COUNT];

#ifdef EMBER_AF_ENABLE_STATISTICS
// a variable containing the number of messages send from the utilities
// since emberAfInit was called.
Expand Down Expand Up @@ -83,21 +80,6 @@ EMBER_AF_GENERATED_PLUGIN_TICK_FUNCTION_DECLARATIONS

//------------------------------------------------------------------------------

// Device enabled/disabled functions

void emberAfSetDeviceEnabled(EndpointId endpoint, bool enabled)
{
uint16_t index = emberAfIndexFromEndpoint(endpoint);
if (index != 0xFFFF && index < sizeof(afDeviceEnabled))
{
afDeviceEnabled[index] = enabled;
}
#ifdef ZCL_USING_BASIC_CLUSTER_DEVICE_ENABLED_ATTRIBUTE
emberAfWriteServerAttribute(endpoint, app::Clusters::Basic::Id, ZCL_DEVICE_ENABLED_ATTRIBUTE_ID, (uint8_t *) &enabled,
ZCL_BOOLEAN_ATTRIBUTE_TYPE);
#endif
}

// Is the device identifying?
bool emberAfIsDeviceIdentifying(EndpointId endpoint)
{
Expand Down Expand Up @@ -167,8 +149,6 @@ void emberAfInit(chip::Messaging::ExchangeManager * exchangeMgr)
// emberAfPopNetworkIndex();
}

memset(afDeviceEnabled, true, emberAfEndpointCount());

MATTER_PLUGINS_INIT

emAfCallInits();
Expand Down