1
+ /*
2
+ *
3
+ * Copyright (c) 2025 Project CHIP Authors
4
+ * All rights reserved.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
1
18
#pragma once
2
19
#include < lib/core/TLVCircularBuffer.h>
3
20
#include < lib/support/Span.h>
@@ -29,7 +46,7 @@ class CircularDiagnosticBuffer : public chip::TLV::TLVCircularBuffer
29
46
*
30
47
* This method retrieves the stored diagnostic data and copies it into the
31
48
* provided `payload` buffer. If the buffer is too small to hold all the data,
32
- * the method returns the successfully copied entries along with an error code
49
+ * still method returns the successfully copied entries along with an error code
33
50
* indicating that the buffer was insufficient.
34
51
*
35
52
* @param payload A reference to a `MutableByteSpan` where the retrieved
@@ -39,6 +56,7 @@ class CircularDiagnosticBuffer : public chip::TLV::TLVCircularBuffer
39
56
*
40
57
* @retval CHIP_NO_ERROR If the operation succeeded and all data was copied.
41
58
* @retval CHIP_ERROR_BUFFER_TOO_SMALL If the buffer was not large enough to hold all data.
59
+ * @retval CHIP_ERROR_END_OF_TLV If the end of the TLV stream is reached.
42
60
* @retval CHIP_ERROR If any other failure occurred during the operation.
43
61
*/
44
62
CHIP_ERROR Retrieve (MutableByteSpan & payload, uint32_t & read_entries);
0 commit comments