Skip to content

Commit ed8f58f

Browse files
restyled-commitssuneelsignify
authored andcommitted
Restyled by clang-format
1 parent 63f55ae commit ed8f58f

File tree

10 files changed

+26
-32
lines changed

10 files changed

+26
-32
lines changed

examples/bridge-app/asr/subdevice/SubDeviceManager.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,8 @@ int AddDeviceEndpoint(SubDevice * dev, EmberAfEndpointType * ep, const Span<cons
6161
while (1)
6262
{
6363
dev->SetEndpointId(gCurrentEndpointId);
64-
err =
65-
emberAfSetDynamicEndpoint(index, gCurrentEndpointId, ep, dataVersionStorage, deviceTypeList,
66-
epUniqueId, parentEndpointId);
64+
err = emberAfSetDynamicEndpoint(index, gCurrentEndpointId, ep, dataVersionStorage, deviceTypeList, epUniqueId,
65+
parentEndpointId);
6766
if (err == CHIP_NO_ERROR)
6867
{
6968
ChipLogProgress(DeviceLayer, "Added device %s to dynamic endpoint %d (index=%d)", dev->GetName(),

examples/bridge-app/esp32/main/main.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,8 @@ int AddDeviceEndpoint(Device * dev, EmberAfEndpointType * ep, const Span<const E
171171
while (true)
172172
{
173173
dev->SetEndpointId(gCurrentEndpointId);
174-
err =
175-
emberAfSetDynamicEndpoint(index, gCurrentEndpointId, ep, dataVersionStorage, deviceTypeList,
176-
epUniqueId, parentEndpointId);
174+
err = emberAfSetDynamicEndpoint(index, gCurrentEndpointId, ep, dataVersionStorage, deviceTypeList, epUniqueId,
175+
parentEndpointId);
177176
if (err == CHIP_NO_ERROR)
178177
{
179178
ChipLogProgress(DeviceLayer, "Added device %s to dynamic endpoint %d (index=%d)", dev->GetName(),

examples/bridge-app/telink/src/AppTask.cpp

+6-5
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ AppTask AppTask::sAppTask;
3636
#include <app/InteractionModelEngine.h>
3737

3838
int AddDeviceEndpoint(Device * dev, EmberAfEndpointType * ep, const Span<const EmberAfDeviceType> & deviceTypeList,
39-
const Span<DataVersion> & dataVersionStorage, chip:CharSpan epUniqueId, chip::EndpointId parentEndpointId);
39+
const Span<DataVersion> & dataVersionStorage, chip
40+
: CharSpan epUniqueId, chip::EndpointId parentEndpointId);
4041
CHIP_ERROR RemoveDeviceEndpoint(Device * dev);
4142
void HandleDeviceTempSensorStatusChanged(DeviceTempSensor * dev, DeviceTempSensor::Changed_t itemChangedMask);
4243
Protocols::InteractionModel::Status HandleReadTempMeasurementAttribute(DeviceTempSensor * dev, chip::AttributeId attributeId,
@@ -184,7 +185,8 @@ const EmberAfDeviceType gBridgedTempSensorDeviceTypes[] = { { DEVICE_TYPE_TEMP_S
184185
{ DEVICE_TYPE_BRIDGED_NODE, DEVICE_VERSION_DEFAULT } };
185186

186187
int AddDeviceEndpoint(Device * dev, EmberAfEndpointType * ep, const Span<const EmberAfDeviceType> & deviceTypeList,
187-
const Span<DataVersion> & dataVersionStorage, chip:CharSpan epUniqueId, chip::EndpointId parentEndpointId)
188+
const Span<DataVersion> & dataVersionStorage, chip
189+
: CharSpan epUniqueId, chip::EndpointId parentEndpointId)
188190
{
189191
uint8_t index = 0;
190192
while (index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT)
@@ -196,9 +198,8 @@ int AddDeviceEndpoint(Device * dev, EmberAfEndpointType * ep, const Span<const E
196198
while (true)
197199
{
198200
dev->SetEndpointId(gCurrentEndpointId);
199-
err =
200-
emberAfSetDynamicEndpoint(index, gCurrentEndpointId, ep, dataVersionStorage, deviceTypeList, epUniqueId,
201-
parentEndpointId);
201+
err = emberAfSetDynamicEndpoint(index, gCurrentEndpointId, ep, dataVersionStorage, deviceTypeList, epUniqueId,
202+
parentEndpointId);
202203
if (err == CHIP_NO_ERROR)
203204
{
204205
ChipLogProgress(DeviceLayer, "Added device %s to dynamic endpoint %d (index=%d)", dev->GetName(),

examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDeviceManager.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ class BridgedDeviceManager
6262
* @param parentEndpointId The parent endpoint ID. Defaults to an invalid endpoint ID.
6363
* @return int The index of the dynamic endpoint if successful, nullopt otherwise
6464
*/
65-
std::optional<unsigned> AddDeviceEndpoint(std::unique_ptr<BridgedDevice> dev,
66-
chip::CharSpan epUniqueId = {},
65+
std::optional<unsigned> AddDeviceEndpoint(std::unique_ptr<BridgedDevice> dev, chip::CharSpan epUniqueId = {},
6766
chip::EndpointId parentEndpointId = chip::kInvalidEndpointId);
6867

6968
/**

examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDeviceManager.cpp

+4-5
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ void BridgedDeviceManager::Init()
183183
mCurrentEndpointId = mFirstDynamicEndpointId;
184184
}
185185

186-
std::optional<unsigned> BridgedDeviceManager::AddDeviceEndpoint(std::unique_ptr<BridgedDevice> dev,
187-
chip::CharSpan epUniqueId, chip::EndpointId parentEndpointId)
186+
std::optional<unsigned> BridgedDeviceManager::AddDeviceEndpoint(std::unique_ptr<BridgedDevice> dev, chip::CharSpan epUniqueId,
187+
chip::EndpointId parentEndpointId)
188188
{
189189
EmberAfEndpointType * ep = dev->IsIcd() ? &sIcdBridgedNodeEndpoint : &sBridgedNodeEndpoint;
190190

@@ -215,9 +215,8 @@ std::optional<unsigned> BridgedDeviceManager::AddDeviceEndpoint(std::unique_ptr<
215215
DeviceLayer::StackLock lock;
216216
dev->SetEndpointId(mCurrentEndpointId);
217217
dev->SetParentEndpointId(parentEndpointId);
218-
CHIP_ERROR err =
219-
emberAfSetDynamicEndpoint(index, mCurrentEndpointId, ep, dataVersionStorage, deviceTypeList, epUniqueId,
220-
parentEndpointId);
218+
CHIP_ERROR err = emberAfSetDynamicEndpoint(index, mCurrentEndpointId, ep, dataVersionStorage, deviceTypeList,
219+
epUniqueId, parentEndpointId);
221220
if (err == CHIP_NO_ERROR)
222221
{
223222
ChipLogProgress(NotSpecified, "Added device with Id=[%d:0x" ChipLogFormatX64 "] to dynamic endpoint %d (index=%d)",

examples/fabric-sync/bridge/include/BridgedDeviceManager.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ class BridgedDeviceManager
6161
* @param parentEndpointId The parent endpoint ID. Defaults to an invalid endpoint ID.
6262
* @return uint16_t The index of the dynamic endpoint if successful, nullopt otherwise
6363
*/
64-
std::optional<uint16_t> AddDeviceEndpoint(std::unique_ptr<BridgedDevice> dev,
65-
chip::CharSpan epUniqueId = {},
64+
std::optional<uint16_t> AddDeviceEndpoint(std::unique_ptr<BridgedDevice> dev, chip::CharSpan epUniqueId = {},
6665
chip::EndpointId parentEndpointId = chip::kInvalidEndpointId);
6766

6867
/**

examples/fabric-sync/bridge/src/BridgedDeviceManager.cpp

+4-5
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ void BridgedDeviceManager::Init()
182182
mCurrentEndpointId = mFirstDynamicEndpointId;
183183
}
184184

185-
std::optional<uint16_t> BridgedDeviceManager::AddDeviceEndpoint(std::unique_ptr<BridgedDevice> dev,
186-
chip::CharSpan epUniqueId, chip::EndpointId parentEndpointId)
185+
std::optional<uint16_t> BridgedDeviceManager::AddDeviceEndpoint(std::unique_ptr<BridgedDevice> dev, chip::CharSpan epUniqueId,
186+
chip::EndpointId parentEndpointId)
187187
{
188188
EmberAfEndpointType * ep = dev->IsIcd() ? &sIcdBridgedNodeEndpoint : &sBridgedNodeEndpoint;
189189

@@ -215,9 +215,8 @@ std::optional<uint16_t> BridgedDeviceManager::AddDeviceEndpoint(std::unique_ptr<
215215
{
216216
dev->SetEndpointId(mCurrentEndpointId);
217217
dev->SetParentEndpointId(parentEndpointId);
218-
CHIP_ERROR err =
219-
emberAfSetDynamicEndpoint(index, mCurrentEndpointId, ep, dataVersionStorage, deviceTypeList, epUniqueId,
220-
parentEndpointId);
218+
CHIP_ERROR err = emberAfSetDynamicEndpoint(index, mCurrentEndpointId, ep, dataVersionStorage, deviceTypeList,
219+
epUniqueId, parentEndpointId);
221220
if (err == CHIP_NO_ERROR)
222221
{
223222
ChipLogProgress(NotSpecified, "Added device with Id=[%d:0x" ChipLogFormatX64 "] to dynamic endpoint %d (index=%d)",

examples/fabric-sync/bridge/src/FabricBridge.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ CHIP_ERROR FabricBridge::AddSynchronizedDevice(const SynchronizedDevice & data)
103103
device->SetIcd(data.isIcd.value_or(false));
104104

105105
// Add the device to the bridge manager with a parent endpoint
106-
auto result = BridgedDeviceManager::Instance().AddDeviceEndpoint(std::move(device), chip::CharSpan(), /* parentEndpointId= */ 1);
106+
auto result =
107+
BridgedDeviceManager::Instance().AddDeviceEndpoint(std::move(device), chip::CharSpan(), /* parentEndpointId= */ 1);
107108
if (!result.has_value())
108109
{
109110
ChipLogError(NotSpecified, "Failed to add device with Id=[%d:0x" ChipLogFormatX64 "]", data.id.GetFabricIndex(),

src/app/app-platform/ContentAppPlatform.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@ AppPlatformExternalAttributeWriteCallback(EndpointId endpoint, ClusterId cluster
115115

116116
EndpointId ContentAppPlatform::AddContentApp(ContentApp * app, EmberAfEndpointType * ep,
117117
const Span<DataVersion> & dataVersionStorage,
118-
const Span<const EmberAfDeviceType> & deviceTypeList,
119-
chip::CharSpan epUniqueId)
118+
const Span<const EmberAfDeviceType> & deviceTypeList, chip::CharSpan epUniqueId)
120119
{
121120
CatalogVendorApp vendorApp = app->GetApplicationBasicDelegate()->GetCatalogVendorApp();
122121

@@ -174,8 +173,7 @@ EndpointId ContentAppPlatform::AddContentApp(ContentApp * app, EmberAfEndpointTy
174173

175174
EndpointId ContentAppPlatform::AddContentApp(ContentApp * app, EmberAfEndpointType * ep,
176175
const Span<DataVersion> & dataVersionStorage,
177-
const Span<const EmberAfDeviceType> & deviceTypeList,
178-
chip::CharSpan epUniqueId,
176+
const Span<const EmberAfDeviceType> & deviceTypeList, chip::CharSpan epUniqueId,
179177
EndpointId desiredEndpointId)
180178
{
181179
CatalogVendorApp vendorApp = app->GetApplicationBasicDelegate()->GetCatalogVendorApp();

src/app/app-platform/ContentAppPlatform.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class DLL_EXPORT ContentAppPlatform
106106
// dataVersionStorage.size() needs to be at least as big as the number of
107107
// server clusters in the EmberAfEndpointType passed in.
108108
EndpointId AddContentApp(ContentApp * app, EmberAfEndpointType * ep, const Span<DataVersion> & dataVersionStorage,
109-
const Span<const EmberAfDeviceType> & deviceTypeList, chip::CharSpan ={});
109+
const Span<const EmberAfDeviceType> & deviceTypeList, chip::CharSpan = {});
110110

111111
// add apps to the platform.
112112
// This will assign the app to the desiredEndpointId (if it is not already used)
@@ -116,7 +116,7 @@ class DLL_EXPORT ContentAppPlatform
116116
// server clusters in the EmberAfEndpointType passed in.
117117
EndpointId AddContentApp(ContentApp * app, EmberAfEndpointType * ep, const Span<DataVersion> & dataVersionStorage,
118118
const Span<const EmberAfDeviceType> & deviceTypeList, chip::CharSpan epUniqueId,
119-
EndpointId desiredEndpointId);
119+
EndpointId desiredEndpointId);
120120

121121
// remove app from the platform.
122122
// returns the endpoint id where the app was, or 0 if app was not loaded

0 commit comments

Comments
 (0)