@@ -373,7 +373,7 @@ void Instance::HandleSkipAreaCmd(HandlerContext & ctx, const Commands::SkipArea:
373
373
// If the Status field is set to InvalidAreaList, the StatusText field SHALL be an empty string.
374
374
if (!IsSupportedArea (req.skippedArea ))
375
375
{
376
- ChipLogError (Zcl, " SkippedArea (%u ) is not in the SupportedAreas attribute." , req.skippedArea );
376
+ ChipLogError (Zcl, " SkippedArea (%" PRIu32 " ) is not in the SupportedAreas attribute." , req.skippedArea );
377
377
exitResponse (SkipAreaStatus::kInvalidAreaList , " " _span);
378
378
return ;
379
379
}
@@ -453,7 +453,7 @@ bool Instance::IsValidSupportedArea(const AreaStructureWrapper & aArea)
453
453
// If the LandmarkInfo field is null, the LocationInfo field SHALL NOT be null.
454
454
if (aArea.areaDesc .locationInfo .IsNull () && aArea.areaDesc .landmarkInfo .IsNull ())
455
455
{
456
- ChipLogDetail (Zcl, " IsValidAsSupportedArea %u - must have locationInfo and/or LandmarkInfo" , aArea.areaID );
456
+ ChipLogDetail (Zcl, " IsValidAsSupportedArea %" PRIu32 " - must have locationInfo and/or LandmarkInfo" , aArea.areaID );
457
457
return false ;
458
458
}
459
459
@@ -464,8 +464,9 @@ bool Instance::IsValidSupportedArea(const AreaStructureWrapper & aArea)
464
464
if (aArea.areaDesc .locationInfo .Value ().locationName .empty () && aArea.areaDesc .locationInfo .Value ().floorNumber .IsNull () &&
465
465
aArea.areaDesc .locationInfo .Value ().areaType .IsNull () && aArea.areaDesc .landmarkInfo .IsNull ())
466
466
{
467
- ChipLogDetail (Zcl, " IsValidAsSupportedArea %u - AreaName is empty string, FloorNumber, AreaType, LandmarkInfo are null" ,
468
- aArea.areaID );
467
+ ChipLogDetail (
468
+ Zcl, " IsValidAsSupportedArea %" PRIu32 " - AreaName is empty string, FloorNumber, AreaType, LandmarkInfo are null" ,
469
+ aArea.areaID );
469
470
return false ;
470
471
}
471
472
}
@@ -475,14 +476,15 @@ bool Instance::IsValidSupportedArea(const AreaStructureWrapper & aArea)
475
476
{
476
477
if (aArea.mapID .IsNull ())
477
478
{
478
- ChipLogDetail (Zcl, " IsValidSupportedArea %u - map Id should not be null when there are supported maps" , aArea.areaID );
479
+ ChipLogDetail (Zcl, " IsValidSupportedArea %" PRIu32 " - map Id should not be null when there are supported maps" ,
480
+ aArea.areaID );
479
481
return false ;
480
482
}
481
483
482
484
// If the SupportedMaps attribute is not null, mapID SHALL be the ID of an entry from the SupportedMaps attribute.
483
485
if (!IsSupportedMap (aArea.mapID .Value ()))
484
486
{
485
- ChipLogError (Zcl, " IsValidSupportedArea %u - map Id %u is not in supported map list" , aArea.areaID ,
487
+ ChipLogError (Zcl, " IsValidSupportedArea %" PRIu32 " - map Id %" PRIu32 " is not in supported map list" , aArea.areaID ,
486
488
aArea.mapID .Value ());
487
489
return false ;
488
490
}
@@ -491,8 +493,8 @@ bool Instance::IsValidSupportedArea(const AreaStructureWrapper & aArea)
491
493
{
492
494
if (!aArea.mapID .IsNull ())
493
495
{
494
- ChipLogDetail (Zcl, " IsValidSupportedArea %u - map Id %u is not in empty supported map list" , aArea. areaID ,
495
- aArea.mapID .Value ());
496
+ ChipLogDetail (Zcl, " IsValidSupportedArea %" PRIu32 " - map Id %" PRIu32 " is not in empty supported map list" ,
497
+ aArea.areaID , aArea. mapID .Value ());
496
498
return false ;
497
499
}
498
500
}
@@ -578,14 +580,14 @@ bool Instance::AddSupportedArea(AreaStructureWrapper & aNewArea)
578
580
// Check there is space for the entry.
579
581
if (mDelegate ->GetNumberOfSupportedAreas () >= kMaxNumSupportedAreas )
580
582
{
581
- ChipLogError (Zcl, " AddSupportedArea %u - too many entries" , aNewArea.areaID );
583
+ ChipLogError (Zcl, " AddSupportedArea %" PRIu32 " - too many entries" , aNewArea.areaID );
582
584
return false ;
583
585
}
584
586
585
587
// Verify cluster requirements concerning valid fields and field relationships.
586
588
if (!IsValidSupportedArea (aNewArea))
587
589
{
588
- ChipLogError (Zcl, " AddSupportedArea %u - not a valid location object" , aNewArea.areaID );
590
+ ChipLogError (Zcl, " AddSupportedArea %" PRIu32 " - not a valid location object" , aNewArea.areaID );
589
591
return false ;
590
592
}
591
593
@@ -595,7 +597,7 @@ bool Instance::AddSupportedArea(AreaStructureWrapper & aNewArea)
595
597
// the AreaInfo field.
596
598
if (!IsUniqueSupportedArea (aNewArea, false ))
597
599
{
598
- ChipLogError (Zcl, " AddSupportedArea %u - not a unique location object" , aNewArea.areaID );
600
+ ChipLogError (Zcl, " AddSupportedArea %" PRIu32 " - not a unique location object" , aNewArea.areaID );
599
601
return false ;
600
602
}
601
603
@@ -619,7 +621,7 @@ bool Instance::ModifySupportedArea(AreaStructureWrapper & aNewArea)
619
621
AreaStructureWrapper supportedArea;
620
622
if (!mDelegate ->GetSupportedAreaById (aNewArea.areaID , listIndex, supportedArea))
621
623
{
622
- ChipLogError (Zcl, " ModifySupportedArea %u - not a supported areaID" , aNewArea.areaID );
624
+ ChipLogError (Zcl, " ModifySupportedArea %" PRIu32 " - not a supported areaID" , aNewArea.areaID );
623
625
return false ;
624
626
}
625
627
@@ -639,15 +641,15 @@ bool Instance::ModifySupportedArea(AreaStructureWrapper & aNewArea)
639
641
// verify cluster requirements concerning valid fields and field relationships
640
642
if (!IsValidSupportedArea (aNewArea))
641
643
{
642
- ChipLogError (Zcl, " ModifySupportedArea %u - not a valid location object" , aNewArea.areaID );
644
+ ChipLogError (Zcl, " ModifySupportedArea %" PRIu32 " - not a valid location object" , aNewArea.areaID );
643
645
return false ;
644
646
}
645
647
646
648
// Updated location description must not match another existing location description.
647
649
// We ignore comparing the area ID as one of the locations will match this one.
648
650
if (!IsUniqueSupportedArea (aNewArea, true ))
649
651
{
650
- ChipLogError (Zcl, " ModifySupportedArea %u - not a unique location object" , aNewArea.areaID );
652
+ ChipLogError (Zcl, " ModifySupportedArea %" PRIu32 " - not a unique location object" , aNewArea.areaID );
651
653
return false ;
652
654
}
653
655
@@ -701,14 +703,14 @@ bool Instance::AddSupportedMap(uint32_t aMapId, const CharSpan & aMapName)
701
703
// check max# of list entries
702
704
if (mDelegate ->GetNumberOfSupportedMaps () >= kMaxNumSupportedMaps )
703
705
{
704
- ChipLogError (Zcl, " AddSupportedMap %u - maximum number of entries" , aMapId);
706
+ ChipLogError (Zcl, " AddSupportedMap %" PRIu32 " - maximum number of entries" , aMapId);
705
707
return false ;
706
708
}
707
709
708
710
// Map name SHALL include readable text that describes the map name (cannot be empty string).
709
711
if (aMapName.empty ())
710
712
{
711
- ChipLogError (Zcl, " AddSupportedMap %u - Name must not be empty string" , aMapId);
713
+ ChipLogError (Zcl, " AddSupportedMap %" PRIu32 " - Name must not be empty string" , aMapId);
712
714
return false ;
713
715
}
714
716
@@ -721,15 +723,15 @@ bool Instance::AddSupportedMap(uint32_t aMapId, const CharSpan & aMapName)
721
723
// the name cannot be the same as an existing map
722
724
if (entry.IsNameEqual (aMapName))
723
725
{
724
- ChipLogError (Zcl, " AddSupportedMap %u - A map already exists with same name '%.*s'" , aMapId,
726
+ ChipLogError (Zcl, " AddSupportedMap %" PRIu32 " - A map already exists with same name '%.*s'" , aMapId,
725
727
static_cast <int >(entry.GetName ().size ()), entry.GetName ().data ());
726
728
return false ;
727
729
}
728
730
729
731
// Each entry in this list SHALL have a unique value for the MapID field.
730
732
if (aMapId == entry.mapID )
731
733
{
732
- ChipLogError (Zcl, " AddSupportedMap - non-unique Id %u " , aMapId);
734
+ ChipLogError (Zcl, " AddSupportedMap - non-unique Id %" PRIu32 " " , aMapId);
733
735
return false ;
734
736
}
735
737
}
@@ -757,14 +759,14 @@ bool Instance::RenameSupportedMap(uint32_t aMapId, const CharSpan & newMapName)
757
759
// get existing entry
758
760
if (!mDelegate ->GetSupportedMapById (aMapId, modifiedIndex, modifiedMap))
759
761
{
760
- ChipLogError (Zcl, " RenameSupportedMap Id %u - map does not exist" , aMapId);
762
+ ChipLogError (Zcl, " RenameSupportedMap Id %" PRIu32 " - map does not exist" , aMapId);
761
763
return false ;
762
764
}
763
765
764
766
// Map name SHALL include readable text that describes the map's name. It cannot be empty string.
765
767
if (newMapName.empty ())
766
768
{
767
- ChipLogError (Zcl, " RenameSupportedMap %u - Name must not be empty string" , aMapId);
769
+ ChipLogError (Zcl, " RenameSupportedMap %" PRIu32 " - Name must not be empty string" , aMapId);
768
770
return false ;
769
771
}
770
772
@@ -784,7 +786,7 @@ bool Instance::RenameSupportedMap(uint32_t aMapId, const CharSpan & newMapName)
784
786
785
787
if (entry.IsNameEqual (newMapName))
786
788
{
787
- ChipLogError (Zcl, " RenameSupportedMap %u - map already exists with same name '%.*s'" , aMapId,
789
+ ChipLogError (Zcl, " RenameSupportedMap %" PRIu32 " - map already exists with same name '%.*s'" , aMapId,
788
790
static_cast <int >(entry.GetName ().size ()), entry.GetName ().data ());
789
791
return false ;
790
792
}
@@ -828,21 +830,21 @@ bool Instance::AddSelectedArea(uint32_t & aSelectedArea)
828
830
// check max# of list entries
829
831
if (mDelegate ->GetNumberOfSelectedAreas () >= kMaxNumSelectedAreas )
830
832
{
831
- ChipLogError (Zcl, " AddSelectedArea %u - maximum number of entries" , aSelectedArea);
833
+ ChipLogError (Zcl, " AddSelectedArea %" PRIu32 " - maximum number of entries" , aSelectedArea);
832
834
return false ;
833
835
}
834
836
835
837
// each item in this list SHALL match the AreaID field of an entry on the SupportedAreas attribute's list
836
838
if (!IsSupportedArea (aSelectedArea))
837
839
{
838
- ChipLogError (Zcl, " AddSelectedArea %u - not a supported location" , aSelectedArea);
840
+ ChipLogError (Zcl, " AddSelectedArea %" PRIu32 " - not a supported location" , aSelectedArea);
839
841
return false ;
840
842
}
841
843
842
844
// each entry in this list SHALL have a unique value
843
845
if (mDelegate ->IsSelectedArea (aSelectedArea))
844
846
{
845
- ChipLogError (Zcl, " AddSelectedArea %u - duplicated location" , aSelectedArea);
847
+ ChipLogError (Zcl, " AddSelectedArea %" PRIu32 " - duplicated location" , aSelectedArea);
846
848
return false ;
847
849
}
848
850
@@ -852,7 +854,7 @@ bool Instance::AddSelectedArea(uint32_t & aSelectedArea)
852
854
853
855
if (!mDelegate ->IsSetSelectedAreasAllowed (locationStatusText))
854
856
{
855
- ChipLogError (Zcl, " AddSelectedArea %u - %.*s" , aSelectedArea, static_cast <int >(locationStatusText.size ()),
857
+ ChipLogError (Zcl, " AddSelectedArea %" PRIu32 " - %.*s" , aSelectedArea, static_cast <int >(locationStatusText.size ()),
856
858
locationStatusText.data ());
857
859
return false ;
858
860
}
@@ -886,7 +888,7 @@ bool Instance::SetCurrentArea(const DataModel::Nullable<uint32_t> & aCurrentArea
886
888
// list.
887
889
if ((!aCurrentArea.IsNull ()) && (!IsSupportedArea (aCurrentArea.Value ())))
888
890
{
889
- ChipLogError (Zcl, " SetCurrentArea %u - location is not supported" , aCurrentArea.Value ());
891
+ ChipLogError (Zcl, " SetCurrentArea %" PRIu32 " - location is not supported" , aCurrentArea.Value ());
890
892
return false ;
891
893
}
892
894
@@ -955,14 +957,14 @@ bool Instance::AddPendingProgressElement(uint32_t aAreaId)
955
957
// For each entry in this list, the AreaID field SHALL match an entry on the SupportedAreas attribute's list.
956
958
if (!IsSupportedArea (aAreaId))
957
959
{
958
- ChipLogError (Zcl, " AddPendingProgressElement - not a supported location %u " , aAreaId);
960
+ ChipLogError (Zcl, " AddPendingProgressElement - not a supported location %" PRIu32 " " , aAreaId);
959
961
return false ;
960
962
}
961
963
962
964
// Each entry in this list SHALL have a unique value for the AreaID field.
963
965
if (mDelegate ->IsProgressElement (aAreaId))
964
966
{
965
- ChipLogError (Zcl, " AddPendingProgressElement - progress element already exists for location %u " , aAreaId);
967
+ ChipLogError (Zcl, " AddPendingProgressElement - progress element already exists for location %" PRIu32 " " , aAreaId);
966
968
return false ;
967
969
}
968
970
@@ -984,7 +986,7 @@ bool Instance::SetProgressStatus(uint32_t aAreaId, OperationalStatusEnum opStatu
984
986
985
987
if (!mDelegate ->GetProgressElementById (aAreaId, listIndex, progressElement))
986
988
{
987
- ChipLogError (Zcl, " SetProgressStatus - progress element does not exist for location %u " , aAreaId);
989
+ ChipLogError (Zcl, " SetProgressStatus - progress element does not exist for location %" PRIu32 " " , aAreaId);
988
990
return false ;
989
991
}
990
992
@@ -1020,7 +1022,7 @@ bool Instance::SetProgressTotalOperationalTime(uint32_t aAreaId, const DataModel
1020
1022
1021
1023
if (!mDelegate ->GetProgressElementById (aAreaId, listIndex, progressElement))
1022
1024
{
1023
- ChipLogError (Zcl, " SetProgressTotalOperationalTime - progress element does not exist for location %u " , aAreaId);
1025
+ ChipLogError (Zcl, " SetProgressTotalOperationalTime - progress element does not exist for location %" PRIu32 " " , aAreaId);
1024
1026
return false ;
1025
1027
}
1026
1028
@@ -1036,7 +1038,8 @@ bool Instance::SetProgressTotalOperationalTime(uint32_t aAreaId, const DataModel
1036
1038
!aTotalOperationalTime.IsNull ())
1037
1039
{
1038
1040
ChipLogError (Zcl,
1039
- " SetProgressTotalOperationalTime - location %u opStatus value %u - can be non-null only if opStatus is "
1041
+ " SetProgressTotalOperationalTime - location %" PRIu32
1042
+ " opStatus value %u - can be non-null only if opStatus is "
1040
1043
" Completed or Skipped" ,
1041
1044
aAreaId, to_underlying (progressElement.status ));
1042
1045
return false ;
@@ -1062,7 +1065,7 @@ bool Instance::SetProgressEstimatedTime(uint32_t aAreaId, const DataModel::Nulla
1062
1065
1063
1066
if (!mDelegate ->GetProgressElementById (aAreaId, listIndex, progressElement))
1064
1067
{
1065
- ChipLogError (Zcl, " SetProgressEstimatedTime - progress element does not exist for location %u " , aAreaId);
1068
+ ChipLogError (Zcl, " SetProgressEstimatedTime - progress element does not exist for location %" PRIu32 " " , aAreaId);
1066
1069
return false ;
1067
1070
}
1068
1071
0 commit comments