-
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.
[Chef] Add Pinged event to samplemei (#30890)
* Add draft version of samplemei implementing event * Fix correct Pinged number * Fix sample * Restyled by clang-format * Fix Chef ZAP event from Pinged to PingCountEvent * zap regen * Remove files that are not to be generated anymore * Bump actions/labeler from 4 to 5 (#30911) Bumps [actions/labeler](https://github.com/actions/labeler) from 4 to 5. - [Release notes](https://github.com/actions/labeler/releases) - [Commits](actions/labeler@v4...v5) --- updated-dependencies: - dependency-name: actions/labeler dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Revert "Bump actions/labeler from 4 to 5 (#30911)" (#30922) This reverts commit e15db82. * Change the package of Kotlin cluster lib to package matter.controller.cluster.clusters (#30945) * Fix newline in the end of files.gni --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: [email protected] <[email protected]> Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Andrei Litvin <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andrei Litvin <[email protected]> Co-authored-by: Yufeng Wang <[email protected]>
- Loading branch information
Showing
25 changed files
with
499 additions
and
9 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
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
...erated/java/matter/controller/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.controller.cluster.eventstructs | ||
|
||
import matter.controller.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
42 changes: 42 additions & 0 deletions
42
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.
Oops, something went wrong.