Skip to content

Commit

Permalink
update xmls and TC1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
plauric committed Oct 24, 2023
1 parent d0969d8 commit 5e3cbeb
Show file tree
Hide file tree
Showing 144 changed files with 2,903 additions and 3,035 deletions.
4 changes: 2 additions & 2 deletions src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ tests:
verification: |
./chip-tool dishwashermode read cluster-revision 1 1
Verify the "ClusterRevision" value is of unit16 and reflects the highest revision number 1 on the TH(Chip-tool) and below is the sample log provided for the raspi platform:
Verify the "ClusterRevision" value is of unit16 and reflects the highest revision number (2) on the TH(Chip-tool) and below is the sample log provided for the raspi platform:
[1690365584.246794][27436:27438] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_FFFD DataVersion: 1130015440
[1690365584.246860][27436:27438] CHIP:TOO: ClusterRevision: 1
[1690365584.246860][27436:27438] CHIP:TOO: ClusterRevision: 2
disabled: true

- label: "Step 3: TH reads from the DUT the FeatureMap attribute."
Expand Down
2 changes: 1 addition & 1 deletion src/app/tests/suites/certification/Test_TC_LWM_1_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ tests:
command: "readAttribute"
attribute: "ClusterRevision"
response:
value: 1
value: 2
constraints:
type: int16u

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ tests:
command: "readAttribute"
attribute: "ClusterRevision"
response:
value: 1
value: 2
constraints:
type: int16u

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ tests:
command: "readAttribute"
attribute: "ClusterRevision"
response:
value: 1
value: 2
constraints:
type: int16u

Expand Down
2 changes: 1 addition & 1 deletion src/app/tests/suites/certification/Test_TC_TCCM_1_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ tests:
command: "readAttribute"
attribute: "ClusterRevision"
response:
value: 1
value: 2
constraints:
type: int16u

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ limitations under the License.
<client init="false" tick="false">true</client>
<server init="false" tick="false">true</server>
<description>Attributes and commands for selecting a mode from a list of supported options.</description>
<globalAttribute side="either" code="0xFFFD" value="2"/>
<!-- Base data types -->
<attribute side="server" code="0x0000" define="SUPPORTED_MODES" type="ARRAY" entryType="ModeOptionStruct" writable="false" optional="false" isNullable="false" length="255">SupportedModes</attribute>
<attribute side="server" code="0x0001" define="CURRENT_MODE" type="int8u" writable="false" optional="false" isNullable="false" reportable="true">CurrentMode</attribute>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ limitations under the License.
<client init="false" tick="false">true</client>
<server init="false" tick="false">true</server>
<description>Attributes and commands for selecting a mode from a list of supported options.</description>
<globalAttribute side="either" code="0xFFFD" value="2"/>
<!-- Base data types -->
<attribute side="server" code="0x0000" define="SUPPORTED_MODES" type="ARRAY" entryType="ModeOptionStruct" writable="false" optional="false" isNullable="false" length="255">SupportedModes</attribute>
<attribute side="server" code="0x0001" define="CURRENT_MODE" type="int8u" writable="false" optional="false" isNullable="false" reportable="true">CurrentMode</attribute>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ limitations under the License.
<client init="false" tick="false">true</client>
<server init="false" tick="false">true</server>
<description>Attributes and commands for selecting a mode from a list of supported options.</description>
<globalAttribute side="either" code="0xFFFD" value="2"/>
<!-- Base data types -->
<attribute side="server" code="0x0000" define="SUPPORTED_MODES" type="ARRAY" entryType="ModeOptionStruct" writable="false" optional="false" isNullable="false" length="255">SupportedModes</attribute>
<attribute side="server" code="0x0001" define="CURRENT_MODE" type="int8u" writable="false" optional="false" isNullable="false" reportable="true">CurrentMode</attribute>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ limitations under the License.
<client init="false" tick="false">true</client>
<server init="false" tick="false">true</server>
<description>Attributes and commands for selecting a mode from a list of supported options.</description>
<globalAttribute side="either" code="0xFFFD" value="2"/>
<!-- Base data types -->
<attribute side="server" code="0x0000" define="SUPPORTED_MODES" type="ARRAY" entryType="ModeOptionStruct" writable="false" optional="false" isNullable="false" length="255">SupportedModes</attribute>
<attribute side="server" code="0x0001" define="CURRENT_MODE" type="int8u" writable="false" optional="false" isNullable="false" reportable="true">CurrentMode</attribute>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,22 @@
package chip.devicecontroller.cluster.eventstructs

import chip.devicecontroller.cluster.*
import matter.tlv.AnonymousTag
import matter.tlv.ContextSpecificTag
import matter.tlv.Tag
import matter.tlv.TlvParsingException
import matter.tlv.TlvReader
import matter.tlv.TlvWriter

class AccessControlClusterAccessControlEntryChangedEvent(
val adminNodeID: ULong?,
val adminPasscodeID: UInt?,
val changeType: UInt,
val latestValue:
chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct?,
val fabricIndex: UInt
) {
override fun toString(): String = buildString {
import java.util.Optional

class AccessControlClusterAccessControlEntryChangedEvent (
val adminNodeID: ULong?,
val adminPasscodeID: UInt?,
val changeType: UInt,
val latestValue: chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct?,
val fabricIndex: UInt) {
override fun toString(): String = buildString {
append("AccessControlClusterAccessControlEntryChangedEvent {\n")
append("\tadminNodeID : $adminNodeID\n")
append("\tadminPasscodeID : $adminPasscodeID\n")
Expand All @@ -44,21 +46,21 @@ class AccessControlClusterAccessControlEntryChangedEvent(
tlvWriter.apply {
startStructure(tlvTag)
if (adminNodeID != null) {
put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID)
} else {
putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D))
}
put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID)
} else {
putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D))
}
if (adminPasscodeID != null) {
put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID)
} else {
putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D))
}
put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID)
} else {
putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D))
}
put(ContextSpecificTag(TAG_CHANGE_TYPE), changeType)
if (latestValue != null) {
latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this)
} else {
putNull(ContextSpecificTag(TAG_LATEST_VALUE))
}
latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this)
} else {
putNull(ContextSpecificTag(TAG_LATEST_VALUE))
}
put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex)
endStructure()
}
Expand All @@ -71,45 +73,32 @@ class AccessControlClusterAccessControlEntryChangedEvent(
private const val TAG_LATEST_VALUE = 4
private const val TAG_FABRIC_INDEX = 254

fun fromTlv(
tlvTag: Tag,
tlvReader: TlvReader
): AccessControlClusterAccessControlEntryChangedEvent {
fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlEntryChangedEvent {
tlvReader.enterStructure(tlvTag)
val adminNodeID =
if (!tlvReader.isNull()) {
tlvReader.getULong(ContextSpecificTag(TAG_ADMIN_NODE_I_D))
} else {
tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D))
null
}
val adminPasscodeID =
if (!tlvReader.isNull()) {
tlvReader.getUInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D))
} else {
tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D))
null
}
val adminNodeID = if (!tlvReader.isNull()) {
tlvReader.getULong(ContextSpecificTag(TAG_ADMIN_NODE_I_D))
} else {
tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D))
null
}
val adminPasscodeID = if (!tlvReader.isNull()) {
tlvReader.getUInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D))
} else {
tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D))
null
}
val changeType = tlvReader.getUInt(ContextSpecificTag(TAG_CHANGE_TYPE))
val latestValue =
if (!tlvReader.isNull()) {
chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct
.fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader)
} else {
tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE))
null
}
val latestValue = if (!tlvReader.isNull()) {
chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct.fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader)
} else {
tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE))
null
}
val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX))

tlvReader.exitContainer()

return AccessControlClusterAccessControlEntryChangedEvent(
adminNodeID,
adminPasscodeID,
changeType,
latestValue,
fabricIndex
)
return AccessControlClusterAccessControlEntryChangedEvent(adminNodeID, adminPasscodeID, changeType, latestValue, fabricIndex)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,22 @@
package chip.devicecontroller.cluster.eventstructs

import chip.devicecontroller.cluster.*
import matter.tlv.AnonymousTag
import matter.tlv.ContextSpecificTag
import matter.tlv.Tag
import matter.tlv.TlvParsingException
import matter.tlv.TlvReader
import matter.tlv.TlvWriter

class AccessControlClusterAccessControlExtensionChangedEvent(
val adminNodeID: ULong?,
val adminPasscodeID: UInt?,
val changeType: UInt,
val latestValue:
chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct?,
val fabricIndex: UInt
) {
override fun toString(): String = buildString {
import java.util.Optional

class AccessControlClusterAccessControlExtensionChangedEvent (
val adminNodeID: ULong?,
val adminPasscodeID: UInt?,
val changeType: UInt,
val latestValue: chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct?,
val fabricIndex: UInt) {
override fun toString(): String = buildString {
append("AccessControlClusterAccessControlExtensionChangedEvent {\n")
append("\tadminNodeID : $adminNodeID\n")
append("\tadminPasscodeID : $adminPasscodeID\n")
Expand All @@ -44,21 +46,21 @@ class AccessControlClusterAccessControlExtensionChangedEvent(
tlvWriter.apply {
startStructure(tlvTag)
if (adminNodeID != null) {
put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID)
} else {
putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D))
}
put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID)
} else {
putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D))
}
if (adminPasscodeID != null) {
put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID)
} else {
putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D))
}
put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID)
} else {
putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D))
}
put(ContextSpecificTag(TAG_CHANGE_TYPE), changeType)
if (latestValue != null) {
latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this)
} else {
putNull(ContextSpecificTag(TAG_LATEST_VALUE))
}
latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this)
} else {
putNull(ContextSpecificTag(TAG_LATEST_VALUE))
}
put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex)
endStructure()
}
Expand All @@ -71,45 +73,32 @@ class AccessControlClusterAccessControlExtensionChangedEvent(
private const val TAG_LATEST_VALUE = 4
private const val TAG_FABRIC_INDEX = 254

fun fromTlv(
tlvTag: Tag,
tlvReader: TlvReader
): AccessControlClusterAccessControlExtensionChangedEvent {
fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlExtensionChangedEvent {
tlvReader.enterStructure(tlvTag)
val adminNodeID =
if (!tlvReader.isNull()) {
tlvReader.getULong(ContextSpecificTag(TAG_ADMIN_NODE_I_D))
} else {
tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D))
null
}
val adminPasscodeID =
if (!tlvReader.isNull()) {
tlvReader.getUInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D))
} else {
tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D))
null
}
val adminNodeID = if (!tlvReader.isNull()) {
tlvReader.getULong(ContextSpecificTag(TAG_ADMIN_NODE_I_D))
} else {
tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D))
null
}
val adminPasscodeID = if (!tlvReader.isNull()) {
tlvReader.getUInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D))
} else {
tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D))
null
}
val changeType = tlvReader.getUInt(ContextSpecificTag(TAG_CHANGE_TYPE))
val latestValue =
if (!tlvReader.isNull()) {
chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct
.fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader)
} else {
tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE))
null
}
val latestValue = if (!tlvReader.isNull()) {
chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct.fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader)
} else {
tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE))
null
}
val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX))

tlvReader.exitContainer()

return AccessControlClusterAccessControlExtensionChangedEvent(
adminNodeID,
adminPasscodeID,
changeType,
latestValue,
fabricIndex
)
return AccessControlClusterAccessControlExtensionChangedEvent(adminNodeID, adminPasscodeID, changeType, latestValue, fabricIndex)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,21 @@
package chip.devicecontroller.cluster.eventstructs

import chip.devicecontroller.cluster.*
import matter.tlv.AnonymousTag
import matter.tlv.ContextSpecificTag
import matter.tlv.Tag
import matter.tlv.TlvParsingException
import matter.tlv.TlvReader
import matter.tlv.TlvWriter

class ActionsClusterActionFailedEvent(
val actionID: UInt,
val invokeID: ULong,
val newState: UInt,
val error: UInt
) {
override fun toString(): String = buildString {
import java.util.Optional

class ActionsClusterActionFailedEvent (
val actionID: UInt,
val invokeID: ULong,
val newState: UInt,
val error: UInt) {
override fun toString(): String = buildString {
append("ActionsClusterActionFailedEvent {\n")
append("\tactionID : $actionID\n")
append("\tinvokeID : $invokeID\n")
Expand All @@ -54,13 +57,13 @@ class ActionsClusterActionFailedEvent(
private const val TAG_NEW_STATE = 2
private const val TAG_ERROR = 3

fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ActionsClusterActionFailedEvent {
fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ActionsClusterActionFailedEvent {
tlvReader.enterStructure(tlvTag)
val actionID = tlvReader.getUInt(ContextSpecificTag(TAG_ACTION_I_D))
val invokeID = tlvReader.getULong(ContextSpecificTag(TAG_INVOKE_I_D))
val newState = tlvReader.getUInt(ContextSpecificTag(TAG_NEW_STATE))
val error = tlvReader.getUInt(ContextSpecificTag(TAG_ERROR))

tlvReader.exitContainer()

return ActionsClusterActionFailedEvent(actionID, invokeID, newState, error)
Expand Down
Loading

0 comments on commit 5e3cbeb

Please sign in to comment.