Skip to content

Commit

Permalink
add OTA emberAfGetClusterServerEndpointIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
yunhanw-google committed Jul 27, 2023
1 parent 426be96 commit 4095edb
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/controller/java/CHIPDeviceController-JNI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2357,3 +2357,21 @@ CHIP_ERROR N2J_NetworkLocation(JNIEnv * env, jstring ipAddress, jint port, jint
exit:
return err;
}

namespace {
constexpr EndpointId kSupportedEndpoint = 0;
} // anonymous namespace

/**
* Called by the OTA provider cluster server to determine an index
* into its array.
*/
uint16_t emberAfGetClusterServerEndpointIndex(EndpointId endpoint, ClusterId cluster, uint16_t fixedClusterServerEndpointCount)
{
if (endpoint == kSupportedEndpoint && cluster == OtaSoftwareUpdateProvider::Id)
{
return 0;
}

return UINT16_MAX;
}

0 comments on commit 4095edb

Please sign in to comment.