18
18
19
19
#pragma once
20
20
#include < app-common/zap-generated/cluster-objects.h>
21
+ #include < app/AttributePathParams.h>
22
+ #include < app/ClusterStateCache.h>
21
23
#include < app/OperationalSessionSetup.h>
22
24
#include < controller/CommissioneeDeviceProxy.h>
23
25
#include < credentials/attestation_verifier/DeviceAttestationDelegate.h>
24
26
#include < credentials/attestation_verifier/DeviceAttestationVerifier.h>
25
27
#include < crypto/CHIPCryptoPAL.h>
28
+ #include < lib/support/Span.h>
26
29
#include < lib/support/Variant.h>
27
30
#include < matter/tracing/build_config.h>
28
31
#include < system/SystemClock.h>
@@ -591,6 +594,18 @@ class CommissioningParameters
591
594
}
592
595
void ClearICDStayActiveDurationMsec () { mICDStayActiveDurationMsec .ClearValue (); }
593
596
597
+ Span<const app::AttributePathParams> GetExtraReadPaths () const { return mExtraReadPaths ; }
598
+
599
+ // Additional attribute paths to read as part of the kReadCommissioningInfo stage.
600
+ // These values read from the device will be available in ReadCommissioningInfo.attributes.
601
+ // Clients should avoid requesting paths that are already read internally by the commissioner
602
+ // as no consolidation of internally read and extra paths provided here will be performed.
603
+ CommissioningParameters & SetExtraReadPaths (Span<const app::AttributePathParams> paths)
604
+ {
605
+ mExtraReadPaths = paths;
606
+ return *this ;
607
+ }
608
+
594
609
// Clear all members that depend on some sort of external buffer. Can be
595
610
// used to make sure that we are not holding any dangling pointers.
596
611
void ClearExternalBufferDependentValues ()
@@ -613,6 +628,7 @@ class CommissioningParameters
613
628
mDSTOffsets .ClearValue ();
614
629
mDefaultNTP .ClearValue ();
615
630
mICDSymmetricKey .ClearValue ();
631
+ mExtraReadPaths = decltype (mExtraReadPaths )();
616
632
}
617
633
618
634
private:
@@ -662,6 +678,7 @@ class CommissioningParameters
662
678
Optional<uint32_t > mICDStayActiveDurationMsec ;
663
679
ICDRegistrationStrategy mICDRegistrationStrategy = ICDRegistrationStrategy::kIgnore ;
664
680
bool mCheckForMatchingFabric = false ;
681
+ Span<const app::AttributePathParams> mExtraReadPaths ;
665
682
};
666
683
667
684
struct RequestedCertificate
@@ -762,6 +779,9 @@ struct ICDManagementClusterInfo
762
779
763
780
struct ReadCommissioningInfo
764
781
{
782
+ #if CHIP_CONFIG_ENABLE_READ_CLIENT
783
+ app::ClusterStateCache const * attributes = nullptr ;
784
+ #endif
765
785
NetworkClusters network;
766
786
BasicClusterInfo basic;
767
787
GeneralCommissioningInfo general;
0 commit comments