@@ -121,6 +121,7 @@ DECLARE_DYNAMIC_ATTRIBUTE(Descriptor::Attributes::DeviceTypeList::Id, ARRAY, kDe
121
121
DECLARE_DYNAMIC_ATTRIBUTE (Descriptor::Attributes::ServerList::Id, ARRAY, kDescriptorAttributeArraySize , 0 ), /* server list */
122
122
DECLARE_DYNAMIC_ATTRIBUTE (Descriptor::Attributes::ClientList::Id, ARRAY, kDescriptorAttributeArraySize , 0 ), /* client list */
123
123
DECLARE_DYNAMIC_ATTRIBUTE (Descriptor::Attributes::PartsList::Id, ARRAY, kDescriptorAttributeArraySize , 0 ), /* parts list */
124
+ DECLARE_DYNAMIC_ATTRIBUTE (Descriptor::Attributes::EndpointUniqueId::Id, ARRAY, 32 , 0 ), /* parts list */
124
125
DECLARE_DYNAMIC_ATTRIBUTE_LIST_END ();
125
126
126
127
// Declare Bridged Device Basic Information cluster attributes
@@ -258,7 +259,8 @@ DataVersion gComposedTempSensor2DataVersions[MATTER_ARRAY_SIZE(bridgedTempSensor
258
259
// ---------------------------------------------------------------------------
259
260
260
261
int AddDeviceEndpoint (Device * dev, EmberAfEndpointType * ep, const Span<const EmberAfDeviceType> & deviceTypeList,
261
- const Span<DataVersion> & dataVersionStorage, chip::EndpointId parentEndpointId = chip::kInvalidEndpointId )
262
+ const Span<DataVersion> & dataVersionStorage, chip::CharSpan epUniqueId,
263
+ chip::EndpointId parentEndpointId = chip::kInvalidEndpointId )
262
264
{
263
265
uint8_t index = 0 ;
264
266
while (index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT)
@@ -274,7 +276,7 @@ int AddDeviceEndpoint(Device * dev, EmberAfEndpointType * ep, const Span<const E
274
276
dev->SetEndpointId (gCurrentEndpointId );
275
277
dev->SetParentEndpointId (parentEndpointId);
276
278
err =
277
- emberAfSetDynamicEndpoint (index , gCurrentEndpointId , ep, dataVersionStorage, deviceTypeList, parentEndpointId);
279
+ emberAfSetDynamicEndpoint (index , gCurrentEndpointId , ep, dataVersionStorage, deviceTypeList, epUniqueId, parentEndpointId);
278
280
if (err == CHIP_NO_ERROR)
279
281
{
280
282
ChipLogProgress (DeviceLayer, " Added device %s to dynamic endpoint %d (index=%d)" , dev->GetName (),
@@ -798,7 +800,7 @@ void * bridge_polling_thread(void * context)
798
800
{
799
801
// TC-BR-2 step 2, Add Light2
800
802
AddDeviceEndpoint (&Light2, &bridgedLightEndpoint, Span<const EmberAfDeviceType>(gBridgedOnOffDeviceTypes ),
801
- Span<DataVersion>(gLight2DataVersions ), 1 );
803
+ Span<DataVersion>(gLight2DataVersions ), chip::CharSpan (), 1 );
802
804
light2_added = true ;
803
805
}
804
806
else if (ch == ' 4' && light1_added == true )
@@ -811,7 +813,7 @@ void * bridge_polling_thread(void * context)
811
813
{
812
814
// TC-BR-2 step 5, Add Light 1 back
813
815
AddDeviceEndpoint (&Light1, &bridgedLightEndpoint, Span<const EmberAfDeviceType>(gBridgedOnOffDeviceTypes ),
814
- Span<DataVersion>(gLight1DataVersions ), 1 );
816
+ Span<DataVersion>(gLight1DataVersions ), chip::CharSpan (), 1 );
815
817
light1_added = true ;
816
818
}
817
819
if (ch == ' b' )
@@ -955,33 +957,37 @@ void ApplicationInit()
955
957
956
958
// Add light 1 -> will be mapped to ZCL endpoints 3
957
959
AddDeviceEndpoint (&Light1, &bridgedLightEndpoint, Span<const EmberAfDeviceType>(gBridgedOnOffDeviceTypes ),
958
- Span<DataVersion>(gLight1DataVersions ), 1 );
960
+ Span<DataVersion>(gLight1DataVersions ), chip::CharSpan (), 1 );
959
961
960
962
// Add Temperature Sensor devices --> will be mapped to endpoints 4,5
961
963
AddDeviceEndpoint (&TempSensor1, &bridgedTempSensorEndpoint, Span<const EmberAfDeviceType>(gBridgedTempSensorDeviceTypes ),
962
- Span<DataVersion>(gTempSensor1DataVersions ), 1 );
964
+ Span<DataVersion>(gTempSensor1DataVersions ), chip::CharSpan (), 1 );
963
965
AddDeviceEndpoint (&TempSensor2, &bridgedTempSensorEndpoint, Span<const EmberAfDeviceType>(gBridgedTempSensorDeviceTypes ),
964
- Span<DataVersion>(gTempSensor2DataVersions ), 1 );
966
+ Span<DataVersion>(gTempSensor2DataVersions ), chip::CharSpan (), 1 );
965
967
966
968
// Add composed Device with two temperature sensors and a power source
967
969
AddDeviceEndpoint (&gComposedDevice , &bridgedComposedDeviceEndpoint, Span<const EmberAfDeviceType>(gBridgedComposedDeviceTypes ),
968
- Span<DataVersion>(gComposedDeviceDataVersions ), 1 );
970
+ Span<DataVersion>(gComposedDeviceDataVersions ), chip::CharSpan (), 1 );
969
971
AddDeviceEndpoint (&ComposedTempSensor1, &bridgedTempSensorEndpoint,
970
972
Span<const EmberAfDeviceType>(gComposedTempSensorDeviceTypes ),
971
- Span<DataVersion>(gComposedTempSensor1DataVersions ), gComposedDevice .GetEndpointId ());
973
+ Span<DataVersion>(gComposedTempSensor1DataVersions ),
974
+ chip::CharSpan (" AABBCCDDEEFFGGHHIIJJKKLLMMNNOO01" , strlen (" AABBCCDDEEFFGGHHIIJJKKLLMMNNOO01" )),
975
+ gComposedDevice .GetEndpointId ());
972
976
AddDeviceEndpoint (&ComposedTempSensor2, &bridgedTempSensorEndpoint,
973
977
Span<const EmberAfDeviceType>(gComposedTempSensorDeviceTypes ),
974
- Span<DataVersion>(gComposedTempSensor2DataVersions ), gComposedDevice .GetEndpointId ());
978
+ Span<DataVersion>(gComposedTempSensor2DataVersions ),
979
+ chip::CharSpan (" AABBCCDDEEFFGGHHIIJJKKLLMMNNOO02" , strlen (" AABBCCDDEEFFGGHHIIJJKKLLMMNNOO02" )),
980
+ gComposedDevice .GetEndpointId ());
975
981
976
982
// Add 4 lights for the Action Clusters tests
977
983
AddDeviceEndpoint (&ActionLight1, &bridgedLightEndpoint, Span<const EmberAfDeviceType>(gBridgedOnOffDeviceTypes ),
978
- Span<DataVersion>(gActionLight1DataVersions ), 1 );
984
+ Span<DataVersion>(gActionLight1DataVersions ), chip::CharSpan (), 1 );
979
985
AddDeviceEndpoint (&ActionLight2, &bridgedLightEndpoint, Span<const EmberAfDeviceType>(gBridgedOnOffDeviceTypes ),
980
- Span<DataVersion>(gActionLight2DataVersions ), 1 );
986
+ Span<DataVersion>(gActionLight2DataVersions ), chip::CharSpan (), 1 );
981
987
AddDeviceEndpoint (&ActionLight3, &bridgedLightEndpoint, Span<const EmberAfDeviceType>(gBridgedOnOffDeviceTypes ),
982
- Span<DataVersion>(gActionLight3DataVersions ), 1 );
988
+ Span<DataVersion>(gActionLight3DataVersions ), chip::CharSpan (), 1 );
983
989
AddDeviceEndpoint (&ActionLight4, &bridgedLightEndpoint, Span<const EmberAfDeviceType>(gBridgedOnOffDeviceTypes ),
984
- Span<DataVersion>(gActionLight4DataVersions ), 1 );
990
+ Span<DataVersion>(gActionLight4DataVersions ), chip::CharSpan (), 1 );
985
991
986
992
// Because the power source is on the same endpoint as the composed device, it needs to be explicitly added
987
993
gDevices [CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT] = &ComposedPowerSource;
0 commit comments