@@ -36,7 +36,7 @@ AppTask AppTask::sAppTask;
36
36
#include < app/InteractionModelEngine.h>
37
37
38
38
int AddDeviceEndpoint (Device * dev, EmberAfEndpointType * ep, const Span<const EmberAfDeviceType> & deviceTypeList,
39
- const Span<DataVersion> & dataVersionStorage, chip::EndpointId parentEndpointId);
39
+ const Span<DataVersion> & dataVersionStorage, chip:CharSpan epUniqueId, chip: :EndpointId parentEndpointId);
40
40
CHIP_ERROR RemoveDeviceEndpoint (Device * dev);
41
41
void HandleDeviceTempSensorStatusChanged (DeviceTempSensor * dev, DeviceTempSensor::Changed_t itemChangedMask);
42
42
Protocols::InteractionModel::Status HandleReadTempMeasurementAttribute (DeviceTempSensor * dev, chip::AttributeId attributeId,
@@ -184,7 +184,7 @@ const EmberAfDeviceType gBridgedTempSensorDeviceTypes[] = { { DEVICE_TYPE_TEMP_S
184
184
{ DEVICE_TYPE_BRIDGED_NODE, DEVICE_VERSION_DEFAULT } };
185
185
186
186
int AddDeviceEndpoint (Device * dev, EmberAfEndpointType * ep, const Span<const EmberAfDeviceType> & deviceTypeList,
187
- const Span<DataVersion> & dataVersionStorage, chip::EndpointId parentEndpointId)
187
+ const Span<DataVersion> & dataVersionStorage, chip:CharSpan epUniqueId, chip: :EndpointId parentEndpointId)
188
188
{
189
189
uint8_t index = 0 ;
190
190
while (index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT)
@@ -197,7 +197,8 @@ int AddDeviceEndpoint(Device * dev, EmberAfEndpointType * ep, const Span<const E
197
197
{
198
198
dev->SetEndpointId (gCurrentEndpointId );
199
199
err =
200
- emberAfSetDynamicEndpoint (index , gCurrentEndpointId , ep, dataVersionStorage, deviceTypeList, parentEndpointId);
200
+ emberAfSetDynamicEndpoint (index , gCurrentEndpointId , ep, dataVersionStorage, deviceTypeList, epUniqueId,
201
+ parentEndpointId);
201
202
if (err == CHIP_NO_ERROR)
202
203
{
203
204
ChipLogProgress (DeviceLayer, " Added device %s to dynamic endpoint %d (index=%d)" , dev->GetName (),
@@ -452,26 +453,26 @@ void AppTask::InitServer(intptr_t context)
452
453
453
454
// Add lights 1..3 --> will be mapped to ZCL endpoints 3, 4, 5
454
455
AddDeviceEndpoint (&gLight1 , &bridgedLightEndpoint, Span<const EmberAfDeviceType>(gBridgedOnOffDeviceTypes ),
455
- Span<DataVersion>(gLight1DataVersions ), 1 );
456
+ Span<DataVersion>(gLight1DataVersions ), chip::Span (), 1 );
456
457
AddDeviceEndpoint (&gLight2 , &bridgedLightEndpoint, Span<const EmberAfDeviceType>(gBridgedOnOffDeviceTypes ),
457
- Span<DataVersion>(gLight2DataVersions ), 1 );
458
+ Span<DataVersion>(gLight2DataVersions ), chip::Span (), 1 );
458
459
AddDeviceEndpoint (&gLight3 , &bridgedLightEndpoint, Span<const EmberAfDeviceType>(gBridgedOnOffDeviceTypes ),
459
- Span<DataVersion>(gLight3DataVersions ), 1 );
460
+ Span<DataVersion>(gLight3DataVersions ), chip::Span (), 1 );
460
461
461
462
// Remove Light 2 -- Lights 1 & 3 will remain mapped to endpoints 3 & 5
462
463
RemoveDeviceEndpoint (&gLight2 );
463
464
464
465
// Add Light 4 -- > will be mapped to ZCL endpoint 6
465
466
AddDeviceEndpoint (&gLight4 , &bridgedLightEndpoint, Span<const EmberAfDeviceType>(gBridgedOnOffDeviceTypes ),
466
- Span<DataVersion>(gLight4DataVersions ), 1 );
467
+ Span<DataVersion>(gLight4DataVersions ), chip::Span (), 1 );
467
468
468
469
// Re-add Light 2 -- > will be mapped to ZCL endpoint 7
469
470
AddDeviceEndpoint (&gLight2 , &bridgedLightEndpoint, Span<const EmberAfDeviceType>(gBridgedOnOffDeviceTypes ),
470
- Span<DataVersion>(gLight2DataVersions ), 1 );
471
+ Span<DataVersion>(gLight2DataVersions ), chip::Span (), 1 );
471
472
472
473
// Add Temperature Sensor devices --> will be mapped to endpoint 8
473
474
AddDeviceEndpoint (&TempSensor1, &bridgedTempSensorEndpoint, Span<const EmberAfDeviceType>(gBridgedTempSensorDeviceTypes ),
474
- Span<DataVersion>(gTempSensor1DataVersions ), 1 );
475
+ Span<DataVersion>(gTempSensor1DataVersions ), chip::Span (), 1 );
475
476
}
476
477
477
478
void HandleDeviceTempSensorStatusChanged (DeviceTempSensor * dev, DeviceTempSensor::Changed_t itemChangedMask)
0 commit comments