@@ -36,14 +36,25 @@ struct Delegate
36
36
37
37
/* *
38
38
* Get an Energy Balance.
39
+ 8
40
+ * The delegate method is called by the cluster to fill out the
41
+ * values for the list in EnergyBalances attribute. Storage for
42
+ * both aOutStep and aOutLabel is provided by the caller.
43
+ *
39
44
* @param aEndpoint The endpoint to query.
40
45
* @param aIndex The index of the balance, with 0 representing the first one.
41
- * @param aOutBalance The BalanceStruct to copy the data into.
46
+ * @param aOutStep The Step value from BalanceStruct
47
+ *
48
+ * @param aOutLabel The Label value from BalanceStruct. Storage is
49
+ * provided by the caller, and is large enough to accomodate the
50
+ * longest label (64 chars), on return the size of the span is
51
+ * adjusted to reflect the length of the value.
52
+ *
42
53
* @return CHIP_ERROR_NOT_FOUND if the index is out of range.
43
54
*/
44
55
virtual CHIP_ERROR
45
56
GetEnergyBalanceAtIndex (chip::EndpointId aEndpoint, size_t aIndex,
46
- chip::app::Clusters::EnergyPreference::Structs::BalanceStruct::Type & aOutBalance ) = 0 ;
57
+ chip::Percent & aOutStep, chip::MutableCharSpan & aOutLabel ) = 0 ;
47
58
48
59
/* *
49
60
* Get an Energy Priority.
@@ -56,15 +67,26 @@ struct Delegate
56
67
chip::app::Clusters::EnergyPreference::EnergyPriorityEnum & aOutPriority) = 0;
57
68
58
69
/* *
59
- * Get a Power Sensitity Balance Struct.
70
+ * Get a Power Sensitity Balance Struct data at the specified index.
71
+ *
72
+ * The delegate method is called by the cluster to fill out the
73
+ * values for the list in LowPowerSensitivities attribute. Storage for
74
+ * both aOutStep and aOutLabel is provided by the caller.
75
+ *
60
76
* @param aEndpoint The endpoint to query.
61
77
* @param aIndex The index of the priority, with 0 representing the first one.
62
- * @param aOutBalance The BalanceStruct to copy the data into.
78
+ * @param aOutStep The Step value from BalanceStruct
79
+ *
80
+ * @param aOutLabel The Label value from BalanceStruct. Storage is
81
+ * provided by the caller, and is large enough to accomodate the
82
+ * longest label (64 chars), on return the size of the span is
83
+ * adjusted to reflect the length of the value.
84
+ *
63
85
* @return CHIP_ERROR_NOT_FOUND if the index is out of range.
64
86
*/
65
87
virtual CHIP_ERROR
66
88
GetLowPowerModeSensitivityAtIndex (chip::EndpointId aEndpoint, size_t aIndex,
67
- chip::app::Clusters::EnergyPreference::Structs::BalanceStruct::Type & aOutBalance ) = 0 ;
89
+ chip::Percent & aOutStep, chip::MutableCharSpan & aOutLabel ) = 0 ;
68
90
69
91
/* *
70
92
* Get the number of energy balances this endpoint has.
0 commit comments