@@ -26,7 +26,7 @@ CHIP_ERROR RvcServiceAreaDelegate::Init()
26
26
// hardcoded fill of SUPPORTED MAPS for prototyping
27
27
uint8_t supportedMapId_XX = 3 ;
28
28
uint8_t supportedMapId_YY = 245 ;
29
-
29
+
30
30
GetInstance ()->AddSupportedMap (supportedMapId_XX, CharSpan::fromCharString (" My Map XX" ));
31
31
GetInstance ()->AddSupportedMap (supportedMapId_YY, CharSpan::fromCharString (" My Map YY" ));
32
32
@@ -39,7 +39,7 @@ CHIP_ERROR RvcServiceAreaDelegate::Init()
39
39
40
40
41
41
// Location A has name, floor number, uses map XX
42
- GetInstance ()->AddSupportedLocation ( supportedLocationId_A,
42
+ GetInstance ()->AddSupportedLocation ( supportedLocationId_A,
43
43
DataModel::Nullable<uint_fast8_t >(supportedMapId_XX),
44
44
CharSpan::fromCharString (" My Location A" ),
45
45
DataModel::Nullable<int16_t >(4 ),
@@ -50,7 +50,7 @@ CHIP_ERROR RvcServiceAreaDelegate::Init()
50
50
51
51
52
52
// Location B has name, uses map XX
53
- GetInstance ()->AddSupportedLocation ( supportedLocationId_B,
53
+ GetInstance ()->AddSupportedLocation ( supportedLocationId_B,
54
54
DataModel::Nullable<uint_fast8_t >(supportedMapId_XX),
55
55
CharSpan::fromCharString (" My Location B" ),
56
56
DataModel::Nullable<int16_t >(),
@@ -63,7 +63,7 @@ CHIP_ERROR RvcServiceAreaDelegate::Init()
63
63
64
64
65
65
// Location C has full SemData, no name, Map YY
66
- GetInstance ()->AddSupportedLocation ( supportedLocationId_C,
66
+ GetInstance ()->AddSupportedLocation ( supportedLocationId_C,
67
67
DataModel::Nullable<uint_fast8_t >(supportedMapId_YY),
68
68
CharSpan (),
69
69
DataModel::Nullable<int16_t >(-1 ),
@@ -73,7 +73,7 @@ CHIP_ERROR RvcServiceAreaDelegate::Init()
73
73
DataModel::Nullable<ServiceArea::FloorSurfaceTag>(ServiceArea::FloorSurfaceTag::kConcrete ) );
74
74
75
75
// Location D has null values for all HomeLocationStruct fields, Map YY
76
- GetInstance ()->AddSupportedLocation ( supportedLocationId_D,
76
+ GetInstance ()->AddSupportedLocation ( supportedLocationId_D,
77
77
DataModel::Nullable<uint_fast8_t >(supportedMapId_YY),
78
78
CharSpan::fromCharString (" My Location D" ),
79
79
DataModel::Nullable<int16_t >(),
@@ -125,12 +125,12 @@ bool RvcServiceAreaDelegate::IsSupportedLocationsChangeAllowed()
125
125
return true ; // TODO
126
126
}
127
127
128
- uint32_t RvcServiceAreaDelegate::GetNumberOfSupportedLocations ()
128
+ uint32_t RvcServiceAreaDelegate::GetNumberOfSupportedLocations ()
129
129
{
130
130
return mSupportedLocations .size ();
131
131
}
132
132
133
- bool RvcServiceAreaDelegate::GetSupportedLocationByIndex (uint32_t listIndex, LocationStructureWrapper & aSupportedLocation)
133
+ bool RvcServiceAreaDelegate::GetSupportedLocationByIndex (uint32_t listIndex, LocationStructureWrapper & aSupportedLocation)
134
134
{
135
135
bool ret_value = false ;
136
136
@@ -198,9 +198,9 @@ bool RvcServiceAreaDelegate::ModifySupportedLocation(uint32_t listIndex, const L
198
198
// The server instance (caller) is responsible for ensuring that there are no duplicate location IDs, list size not exceeded, etc.
199
199
200
200
// 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 ));
204
204
205
205
// checks passed, update the attribute
206
206
mSupportedLocations [listIndex] = modifiedLocation;
@@ -233,12 +233,12 @@ bool RvcServiceAreaDelegate::IsSupportedMapChangeAllowed()
233
233
return true ; // TODO
234
234
}
235
235
236
- uint32_t RvcServiceAreaDelegate::GetNumberOfSupportedMaps ()
236
+ uint32_t RvcServiceAreaDelegate::GetNumberOfSupportedMaps ()
237
237
{
238
238
return mSupportedMaps .size ();
239
239
}
240
240
241
- bool RvcServiceAreaDelegate::GetSupportedMapByIndex (uint32_t listIndex, MapStructureWrapper & aSupportedMap)
241
+ bool RvcServiceAreaDelegate::GetSupportedMapByIndex (uint32_t listIndex, MapStructureWrapper & aSupportedMap)
242
242
{
243
243
bool ret_value = false ;
244
244
@@ -307,7 +307,7 @@ bool RvcServiceAreaDelegate::ModifySupportedMap(uint32_t listIndex, const MapStr
307
307
// Double-check that mapID's match.
308
308
VerifyOrExit ((modifiedMap.mapID == mSupportedMaps [listIndex].mapID ),
309
309
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 ));
311
311
312
312
// save modified map
313
313
mSupportedMaps [listIndex] = modifiedMap;
@@ -391,12 +391,12 @@ bool RvcServiceAreaDelegate::ClearSelectedLocations()
391
391
// *************************************************************************
392
392
// Progress List accessors
393
393
394
- uint32_t RvcServiceAreaDelegate::GetNumberOfProgressElements ()
394
+ uint32_t RvcServiceAreaDelegate::GetNumberOfProgressElements ()
395
395
{
396
396
return mProgressList .size ();
397
397
}
398
398
399
- bool RvcServiceAreaDelegate::GetProgressElementByIndex (uint32_t listIndex, Structs::ProgressStruct::Type & aProgressElement)
399
+ bool RvcServiceAreaDelegate::GetProgressElementByIndex (uint32_t listIndex, Structs::ProgressStruct::Type & aProgressElement)
400
400
{
401
401
bool ret_value = false ;
402
402
@@ -449,20 +449,20 @@ bool RvcServiceAreaDelegate::AddProgressElement(const Structs::ProgressStruct::T
449
449
}
450
450
else
451
451
{
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" ,
453
453
newProgressElement.locationID , (uint32_t )kMaxNumProgressElements );
454
454
}
455
455
456
456
return ret_value;
457
457
}
458
458
459
- bool RvcServiceAreaDelegate::ModifyProgressElement (uint32_t listIndex, const Structs::ProgressStruct::Type & modifiedProgressElement)
459
+ bool RvcServiceAreaDelegate::ModifyProgressElement (uint32_t listIndex, const Structs::ProgressStruct::Type & modifiedProgressElement)
460
460
{
461
461
bool ret_value = false ;
462
462
463
463
// TODO
464
464
465
- return ret_value;
465
+ return ret_value;
466
466
}
467
467
468
468
bool RvcServiceAreaDelegate::ClearProgress ()
0 commit comments