Skip to content

Commit 17080d3

Browse files
restyled-commitshicklin
authored andcommitted
Restyled by whitespace
1 parent 01e6975 commit 17080d3

File tree

5 files changed

+155
-155
lines changed

5 files changed

+155
-155
lines changed

examples/rvc-app/rvc-common/src/rvc-service-area-delegate.cpp

+18-18
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ CHIP_ERROR RvcServiceAreaDelegate::Init()
2626
// hardcoded fill of SUPPORTED MAPS for prototyping
2727
uint8_t supportedMapId_XX = 3;
2828
uint8_t supportedMapId_YY = 245;
29-
29+
3030
GetInstance()->AddSupportedMap(supportedMapId_XX, CharSpan::fromCharString("My Map XX"));
3131
GetInstance()->AddSupportedMap(supportedMapId_YY, CharSpan::fromCharString("My Map YY"));
3232

@@ -39,7 +39,7 @@ CHIP_ERROR RvcServiceAreaDelegate::Init()
3939

4040

4141
// Location A has name, floor number, uses map XX
42-
GetInstance()->AddSupportedLocation( supportedLocationId_A,
42+
GetInstance()->AddSupportedLocation( supportedLocationId_A,
4343
DataModel::Nullable<uint_fast8_t>(supportedMapId_XX),
4444
CharSpan::fromCharString("My Location A"),
4545
DataModel::Nullable<int16_t>(4),
@@ -50,7 +50,7 @@ CHIP_ERROR RvcServiceAreaDelegate::Init()
5050

5151

5252
// Location B has name, uses map XX
53-
GetInstance()->AddSupportedLocation( supportedLocationId_B,
53+
GetInstance()->AddSupportedLocation( supportedLocationId_B,
5454
DataModel::Nullable<uint_fast8_t>(supportedMapId_XX),
5555
CharSpan::fromCharString("My Location B"),
5656
DataModel::Nullable<int16_t>(),
@@ -63,7 +63,7 @@ CHIP_ERROR RvcServiceAreaDelegate::Init()
6363

6464

6565
// Location C has full SemData, no name, Map YY
66-
GetInstance()->AddSupportedLocation( supportedLocationId_C,
66+
GetInstance()->AddSupportedLocation( supportedLocationId_C,
6767
DataModel::Nullable<uint_fast8_t>(supportedMapId_YY),
6868
CharSpan(),
6969
DataModel::Nullable<int16_t>(-1),
@@ -73,7 +73,7 @@ CHIP_ERROR RvcServiceAreaDelegate::Init()
7373
DataModel::Nullable<ServiceArea::FloorSurfaceTag>(ServiceArea::FloorSurfaceTag::kConcrete) );
7474

7575
// Location D has null values for all HomeLocationStruct fields, Map YY
76-
GetInstance()->AddSupportedLocation( supportedLocationId_D,
76+
GetInstance()->AddSupportedLocation( supportedLocationId_D,
7777
DataModel::Nullable<uint_fast8_t>(supportedMapId_YY),
7878
CharSpan::fromCharString("My Location D"),
7979
DataModel::Nullable<int16_t>(),
@@ -125,12 +125,12 @@ bool RvcServiceAreaDelegate::IsSupportedLocationsChangeAllowed()
125125
return true; // TODO
126126
}
127127

128-
uint32_t RvcServiceAreaDelegate::GetNumberOfSupportedLocations()
128+
uint32_t RvcServiceAreaDelegate::GetNumberOfSupportedLocations()
129129
{
130130
return mSupportedLocations.size();
131131
}
132132

133-
bool RvcServiceAreaDelegate::GetSupportedLocationByIndex(uint32_t listIndex, LocationStructureWrapper & aSupportedLocation)
133+
bool RvcServiceAreaDelegate::GetSupportedLocationByIndex(uint32_t listIndex, LocationStructureWrapper & aSupportedLocation)
134134
{
135135
bool ret_value = false;
136136

@@ -198,9 +198,9 @@ bool RvcServiceAreaDelegate::ModifySupportedLocation(uint32_t listIndex, const L
198198
// The server instance (caller) is responsible for ensuring that there are no duplicate location IDs, list size not exceeded, etc.
199199

200200
// Double-check that locationID's match.
201-
VerifyOrExit((modifiedLocation.locationID == mSupportedLocations[listIndex].locationID),
202-
ChipLogError(Zcl, "ModifySupportedLocation - new locationID %u does not match existing locationID %u",
203-
modifiedLocation.locationID, mSupportedLocations[listIndex].locationID));
201+
VerifyOrExit((modifiedLocation.locationID == mSupportedLocations[listIndex].locationID),
202+
ChipLogError(Zcl, "ModifySupportedLocation - new locationID %u does not match existing locationID %u",
203+
modifiedLocation.locationID, mSupportedLocations[listIndex].locationID));
204204

205205
// checks passed, update the attribute
206206
mSupportedLocations[listIndex] = modifiedLocation;
@@ -233,12 +233,12 @@ bool RvcServiceAreaDelegate::IsSupportedMapChangeAllowed()
233233
return true; // TODO
234234
}
235235

236-
uint32_t RvcServiceAreaDelegate::GetNumberOfSupportedMaps()
236+
uint32_t RvcServiceAreaDelegate::GetNumberOfSupportedMaps()
237237
{
238238
return mSupportedMaps.size();
239239
}
240240

241-
bool RvcServiceAreaDelegate::GetSupportedMapByIndex(uint32_t listIndex, MapStructureWrapper & aSupportedMap)
241+
bool RvcServiceAreaDelegate::GetSupportedMapByIndex(uint32_t listIndex, MapStructureWrapper & aSupportedMap)
242242
{
243243
bool ret_value = false;
244244

@@ -307,7 +307,7 @@ bool RvcServiceAreaDelegate::ModifySupportedMap(uint32_t listIndex, const MapStr
307307
// Double-check that mapID's match.
308308
VerifyOrExit((modifiedMap.mapID == mSupportedMaps[listIndex].mapID),
309309
ChipLogError(Zcl, "ModifySupportedMap - mapID's do not match, new mapID %u, existing mapID %u",
310-
modifiedMap.mapID, mSupportedMaps[listIndex].mapID));
310+
modifiedMap.mapID, mSupportedMaps[listIndex].mapID));
311311

312312
// save modified map
313313
mSupportedMaps[listIndex] = modifiedMap;
@@ -391,12 +391,12 @@ bool RvcServiceAreaDelegate::ClearSelectedLocations()
391391
//*************************************************************************
392392
// Progress List accessors
393393

394-
uint32_t RvcServiceAreaDelegate::GetNumberOfProgressElements()
394+
uint32_t RvcServiceAreaDelegate::GetNumberOfProgressElements()
395395
{
396396
return mProgressList.size();
397397
}
398398

399-
bool RvcServiceAreaDelegate::GetProgressElementByIndex(uint32_t listIndex, Structs::ProgressStruct::Type & aProgressElement)
399+
bool RvcServiceAreaDelegate::GetProgressElementByIndex(uint32_t listIndex, Structs::ProgressStruct::Type & aProgressElement)
400400
{
401401
bool ret_value = false;
402402

@@ -449,20 +449,20 @@ bool RvcServiceAreaDelegate::AddProgressElement(const Structs::ProgressStruct::T
449449
}
450450
else
451451
{
452-
ChipLogError(Zcl, "AddProgressElement %u -progress list is already at maximum size %u",
452+
ChipLogError(Zcl, "AddProgressElement %u -progress list is already at maximum size %u",
453453
newProgressElement.locationID, (uint32_t)kMaxNumProgressElements);
454454
}
455455

456456
return ret_value;
457457
}
458458

459-
bool RvcServiceAreaDelegate::ModifyProgressElement(uint32_t listIndex, const Structs::ProgressStruct::Type & modifiedProgressElement)
459+
bool RvcServiceAreaDelegate::ModifyProgressElement(uint32_t listIndex, const Structs::ProgressStruct::Type & modifiedProgressElement)
460460
{
461461
bool ret_value = false;
462462

463463
// TODO
464464

465-
return ret_value;
465+
return ret_value;
466466
}
467467

468468
bool RvcServiceAreaDelegate::ClearProgress()

src/app/clusters/service-area-server/service-area-cluster-objects.h

+16-16
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct LocationStructureWrapper : public chip::app::Clusters::ServiceArea::Struc
4141
*/
4242
LocationStructureWrapper()
4343
{
44-
Set(0, 0,
44+
Set(0, 0,
4545
CharSpan(), DataModel::Nullable<int16_t>(), DataModel::Nullable<AreaTypeTag>(),
4646
DataModel::Nullable<LandmarkTag>(), DataModel::Nullable<PositionTag>(), DataModel::Nullable<FloorSurfaceTag>());
4747
}
@@ -56,37 +56,37 @@ struct LocationStructureWrapper : public chip::app::Clusters::ServiceArea::Struc
5656
* @param[in] aLandmarkTag A common namespace Landmark tag - indicates an association of the location with a home landmark.
5757
* @param[in] aPositionTag A common namespace Position tag - indicates the position of the location with respect to the landmark.
5858
* @param[in] aSurfaceTag A common namespace Floor Surface tag - indicates an association of the location with a surface type.
59-
*
59+
*
6060
* @note Requirements regarding what combinations of fields and values are valid are not checked by this class.
6161
* @note If aLocationName is larger than kLocationNameMaxSize, it will be truncated.
6262
* @note If aLocationName is an empty string and aFloorNumber and aAreaTypeTag are null, locationInfo will be set to null.
6363
*/
64-
LocationStructureWrapper( uint32_t aLocationId,
65-
const DataModel::Nullable<uint8_t> & aMapId,
64+
LocationStructureWrapper( uint32_t aLocationId,
65+
const DataModel::Nullable<uint8_t> & aMapId,
6666
const CharSpan & aLocationName,
6767
const DataModel::Nullable<int16_t> & aFloorNumber,
6868
const DataModel::Nullable<AreaTypeTag> & aAreaTypeTag,
6969
const DataModel::Nullable<LandmarkTag> & aLandmarkTag,
7070
const DataModel::Nullable<PositionTag> & aPositionTag,
7171
const DataModel::Nullable<FloorSurfaceTag> & aSurfaceTag )
7272
{
73-
Set( aLocationId, aMapId,
74-
aLocationName, aFloorNumber, aAreaTypeTag,
73+
Set( aLocationId, aMapId,
74+
aLocationName, aFloorNumber, aAreaTypeTag,
7575
aLandmarkTag, aPositionTag, aSurfaceTag);
7676
}
7777

7878
/**
7979
* @brief This is a copy constructor that initializes the location object with the values from another location object. All values are deep copied.
8080
* @param[in] aOther The location object to copy.
81-
*
81+
*
8282
* @note If the locationName is empty string and aFloorNumber and aAreaTypeTag are null, locationInfo will be set to null.
8383
*/
8484
LocationStructureWrapper(const LocationStructureWrapper & aOther) { *this = aOther; }
8585

8686
/**
8787
* @brief This is an assignment operator that initializes the location object with the values from another location object. All values are deep copied.
8888
* @param[in] aOther The location object to copy.
89-
*
89+
*
9090
* @note If the locationName is empty string and aFloorNumber and aAreaTypeTag are null, locationInfo will be set to null.
9191
*/
9292
LocationStructureWrapper & operator=(const LocationStructureWrapper & aOther)
@@ -122,8 +122,8 @@ struct LocationStructureWrapper : public chip::app::Clusters::ServiceArea::Struc
122122
* @note If aLocationName is larger than kLocationNameMaxSize, it will be truncated.
123123
* @note If aLocationName is an empty string and aFloorNumber and aAreaTypeTag are null, locationInfo will be set to null.
124124
*/
125-
void Set( uint32_t aLocationId,
126-
const DataModel::Nullable<uint8_t> & aMapId,
125+
void Set( uint32_t aLocationId,
126+
const DataModel::Nullable<uint8_t> & aMapId,
127127
const CharSpan & aLocationName,
128128
const DataModel::Nullable<int16_t> & aFloorNumber,
129129
const DataModel::Nullable<AreaTypeTag> & aAreaType,
@@ -149,7 +149,7 @@ struct LocationStructureWrapper : public chip::app::Clusters::ServiceArea::Struc
149149
{
150150
locationInfo.locationInfo.SetNull();
151151
}
152-
152+
153153
locationInfo.landmarkTag = aLandmarkTag;
154154
locationInfo.positionTag = aPositionTag;
155155
locationInfo.surfaceTag = aSurfaceTag;
@@ -185,7 +185,7 @@ struct LocationStructureWrapper : public chip::app::Clusters::ServiceArea::Struc
185185
* @brief Compare the location's name with the given text.
186186
* @param[in] aLocationName The name to compare.
187187
* @return true if the location structure's name field matches aLocationName.
188-
*
188+
*
189189
* @note if locations structure's name field is null, returns false.
190190
*/
191191
bool DoesNameMatch(const CharSpan & aLocationName) const
@@ -253,7 +253,7 @@ struct LocationStructureWrapper : public chip::app::Clusters::ServiceArea::Struc
253253
/**
254254
* @brief Get the location name (for logging).
255255
* @return The map name as a c style char string.
256-
*
256+
*
257257
* @note This is only available through the LocationStructure object (no access from base structure).
258258
*/
259259
const char* name_c_str() const
@@ -285,7 +285,7 @@ struct MapStructureWrapper : public chip::app::Clusters::ServiceArea::Structs::M
285285
* @brief This is a full constructor that initializes the map object with the given values. All values are deep copied.
286286
* @param[in] aMapId The identifier of this map.
287287
* @param[in] aMapName A human readable name (should not be empty string).
288-
*
288+
*
289289
* @note Requirements regarding what combinations of fields and values are 'valid' are not checked by this class.
290290
* @note If aMapName is larger than kMapNameMaxSize, it will be truncated.
291291
*/
@@ -318,7 +318,7 @@ struct MapStructureWrapper : public chip::app::Clusters::ServiceArea::Structs::M
318318
* @note Requirements regarding what combinations of fields and values are 'valid' are not checked by this class.
319319
* @note if aMapName is larger than kMapNameMaxSize, it will be truncated.
320320
*/
321-
void Set( uint8_t aMapId,
321+
void Set( uint8_t aMapId,
322322
const CharSpan & aMapName)
323323
{
324324
mapID = aMapId;
@@ -359,7 +359,7 @@ struct MapStructureWrapper : public chip::app::Clusters::ServiceArea::Structs::M
359359
/**
360360
* @brief Get the map name (for logging).
361361
* @return The map name as a c style char string.
362-
*
362+
*
363363
* @note This is only available through the MapStructure object (no access from base structure).
364364
*/
365365
const char* name_c_str() const

0 commit comments

Comments
 (0)