Skip to content

Commit cbc0485

Browse files
committed
New cluster files generated using ./scripts/tools/zap_regen_all.py
1 parent 76405b3 commit cbc0485

File tree

4 files changed

+2619
-0
lines changed

4 files changed

+2619
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/*
2+
*
3+
* Copyright (c) 2023 Project CHIP Authors
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
package chip.devicecontroller.cluster.eventstructs
18+
19+
import chip.devicecontroller.cluster.*
20+
import matter.tlv.ContextSpecificTag
21+
import matter.tlv.Tag
22+
import matter.tlv.TlvReader
23+
import matter.tlv.TlvWriter
24+
25+
class TlsClientManagementClusterEndpointProvisionedEvent(val endpointID: UInt) {
26+
override fun toString(): String = buildString {
27+
append("TlsClientManagementClusterEndpointProvisionedEvent {\n")
28+
append("\tendpointID : $endpointID\n")
29+
append("}\n")
30+
}
31+
32+
fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
33+
tlvWriter.apply {
34+
startStructure(tlvTag)
35+
put(ContextSpecificTag(TAG_ENDPOINT_ID), endpointID)
36+
endStructure()
37+
}
38+
}
39+
40+
companion object {
41+
private const val TAG_ENDPOINT_ID = 0
42+
43+
fun fromTlv(
44+
tlvTag: Tag,
45+
tlvReader: TlvReader,
46+
): TlsClientManagementClusterEndpointProvisionedEvent {
47+
tlvReader.enterStructure(tlvTag)
48+
val endpointID = tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT_ID))
49+
50+
tlvReader.exitContainer()
51+
52+
return TlsClientManagementClusterEndpointProvisionedEvent(endpointID)
53+
}
54+
}
55+
}

0 commit comments

Comments
 (0)