-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5aacb5d
commit ec16361
Showing
24 changed files
with
209 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
...ed/java/chip/devicecontroller/cluster/eventstructs/SampleMeiClusterPingCountEventEvent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* | ||
* Copyright (c) 2023 Project CHIP Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package chip.devicecontroller.cluster.eventstructs | ||
|
||
import chip.devicecontroller.cluster.* | ||
import matter.tlv.ContextSpecificTag | ||
import matter.tlv.Tag | ||
import matter.tlv.TlvReader | ||
import matter.tlv.TlvWriter | ||
|
||
class SampleMeiClusterPingCountEventEvent(val count: ULong, val fabricIndex: UInt) { | ||
override fun toString(): String = buildString { | ||
append("SampleMeiClusterPingCountEventEvent {\n") | ||
append("\tcount : $count\n") | ||
append("\tfabricIndex : $fabricIndex\n") | ||
append("}\n") | ||
} | ||
|
||
fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { | ||
tlvWriter.apply { | ||
startStructure(tlvTag) | ||
put(ContextSpecificTag(TAG_COUNT), count) | ||
put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) | ||
endStructure() | ||
} | ||
} | ||
|
||
companion object { | ||
private const val TAG_COUNT = 1 | ||
private const val TAG_FABRIC_INDEX = 254 | ||
|
||
fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SampleMeiClusterPingCountEventEvent { | ||
tlvReader.enterStructure(tlvTag) | ||
val count = tlvReader.getULong(ContextSpecificTag(TAG_COUNT)) | ||
val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) | ||
|
||
tlvReader.exitContainer() | ||
|
||
return SampleMeiClusterPingCountEventEvent(count, fabricIndex) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
.../java/matter/devicecontroller/cluster/eventstructs/SampleMeiClusterPingCountEventEvent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* | ||
* Copyright (c) 2023 Project CHIP Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package matter.devicecontroller.cluster.eventstructs | ||
|
||
import matter.devicecontroller.cluster.* | ||
import matter.tlv.ContextSpecificTag | ||
import matter.tlv.Tag | ||
import matter.tlv.TlvReader | ||
import matter.tlv.TlvWriter | ||
|
||
class SampleMeiClusterPingCountEventEvent(val count: UInt, val fabricIndex: UByte) { | ||
override fun toString(): String = buildString { | ||
append("SampleMeiClusterPingCountEventEvent {\n") | ||
append("\tcount : $count\n") | ||
append("\tfabricIndex : $fabricIndex\n") | ||
append("}\n") | ||
} | ||
|
||
fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { | ||
tlvWriter.apply { | ||
startStructure(tlvTag) | ||
put(ContextSpecificTag(TAG_COUNT), count) | ||
put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) | ||
endStructure() | ||
} | ||
} | ||
|
||
companion object { | ||
private const val TAG_COUNT = 1 | ||
private const val TAG_FABRIC_INDEX = 254 | ||
|
||
fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SampleMeiClusterPingCountEventEvent { | ||
tlvReader.enterStructure(tlvTag) | ||
val count = tlvReader.getUInt(ContextSpecificTag(TAG_COUNT)) | ||
val fabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX)) | ||
|
||
tlvReader.exitContainer() | ||
|
||
return SampleMeiClusterPingCountEventEvent(count, fabricIndex) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 16 additions & 15 deletions
31
src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.