Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Diagnostics Wifi Cluster match the spec #30154

Merged
merged 5 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ server cluster WiFiNetworkDiagnostics = 54 {
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
AssociationFailureCauseEnum associationFailureCause = 0;
int16u status = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1922,7 +1922,7 @@ server cluster WiFiNetworkDiagnostics = 54 {
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
AssociationFailureCauseEnum associationFailureCause = 0;
int16u status = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1688,7 +1688,7 @@ server cluster WiFiNetworkDiagnostics = 54 {
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
AssociationFailureCauseEnum associationFailureCause = 0;
int16u status = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1251,7 +1251,7 @@ server cluster WiFiNetworkDiagnostics = 54 {
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
AssociationFailureCauseEnum associationFailureCause = 0;
int16u status = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ server cluster WiFiNetworkDiagnostics = 54 {
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
AssociationFailureCauseEnum associationFailureCause = 0;
int16u status = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ server cluster WiFiNetworkDiagnostics = 54 {
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
AssociationFailureCauseEnum associationFailureCause = 0;
int16u status = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ server cluster WiFiNetworkDiagnostics = 54 {
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
AssociationFailureCauseEnum associationFailureCause = 0;
int16u status = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ server cluster WiFiNetworkDiagnostics = 54 {
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
AssociationFailureCauseEnum associationFailureCause = 0;
int16u status = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@ server cluster WiFiNetworkDiagnostics = 54 {
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
AssociationFailureCauseEnum associationFailureCause = 0;
int16u status = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ server cluster WiFiNetworkDiagnostics = 54 {
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
AssociationFailureCauseEnum associationFailureCause = 0;
int16u status = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1430,7 +1430,7 @@ server cluster WiFiNetworkDiagnostics = 54 {
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
AssociationFailureCauseEnum associationFailureCause = 0;
int16u status = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@ server cluster WiFiNetworkDiagnostics = 54 {
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
AssociationFailureCauseEnum associationFailureCause = 0;
int16u status = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/lighting-common/lighting-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1434,7 +1434,7 @@ server cluster WiFiNetworkDiagnostics = 54 {
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
AssociationFailureCauseEnum associationFailureCause = 0;
int16u status = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1507,7 +1507,7 @@ server cluster WiFiNetworkDiagnostics = 54 {
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
AssociationFailureCauseEnum associationFailureCause = 0;
int16u status = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/lock-common/lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1349,7 +1349,7 @@ server cluster WiFiNetworkDiagnostics = 54 {
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
AssociationFailureCauseEnum associationFailureCause = 0;
int16u status = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/placeholder/linux/apps/app1/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2100,7 +2100,7 @@ server cluster WiFiNetworkDiagnostics = 54 {
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
AssociationFailureCauseEnum associationFailureCause = 0;
int16u status = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/placeholder/linux/apps/app2/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2059,7 +2059,7 @@ server cluster WiFiNetworkDiagnostics = 54 {
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
AssociationFailureCauseEnum associationFailureCause = 0;
int16u status = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ server cluster WiFiNetworkDiagnostics = 54 {
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
AssociationFailureCauseEnum associationFailureCause = 0;
int16u status = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@ server cluster WiFiNetworkDiagnostics = 54 {
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
AssociationFailureCauseEnum associationFailureCause = 0;
int16u status = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ server cluster WiFiNetworkDiagnostics = 54 {
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
AssociationFailureCauseEnum associationFailureCause = 0;
int16u status = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ server cluster WiFiNetworkDiagnostics = 54 {
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
AssociationFailureCauseEnum associationFailureCause = 0;
int16u status = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/thermostat/thermostat-common/thermostat.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,7 @@ server cluster WiFiNetworkDiagnostics = 54 {
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
AssociationFailureCauseEnum associationFailureCause = 0;
int16u status = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/tv-app/tv-common/tv-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,7 @@ server cluster WiFiNetworkDiagnostics = 54 {
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
AssociationFailureCauseEnum associationFailureCause = 0;
int16u status = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ server cluster WiFiNetworkDiagnostics = 54 {
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
AssociationFailureCauseEnum associationFailureCause = 0;
int16u status = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1493,7 +1493,7 @@ server cluster WiFiNetworkDiagnostics = 54 {
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
AssociationFailureCauseEnum associationFailureCause = 0;
int16u status = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/window-app/common/window-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1333,7 +1333,7 @@ server cluster WiFiNetworkDiagnostics = 54 {
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
AssociationFailureCauseEnum associationFailureCause = 0;
int16u status = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ limitations under the License.
<item name="WEP" value="0x02"/>
<item name="WPA" value="0x03"/>
<item name="WPA2" value="0x04"/>
<item name="WPA3" value="0x05"/>
<item name="WPA3" value="0x05"/>
</enum>
<enum name="WiFiVersionEnum" type="enum8">
<cluster code="0x0036"/>
Expand Down Expand Up @@ -80,12 +80,12 @@ limitations under the License.
</event>
<event side="server" code="0x01" name="AssociationFailure" priority="info" optional="true">
<description>Indicate that a Node has failed to connect, or reconnect, to a Wi-Fi access point.</description>
<field id="0" name="AssociationFailure" type="AssociationFailureCauseEnum"/>
<field id="1" name="Status" type="int16u"/>
<field id="0" name="AssociationFailureCause" type="AssociationFailureCauseEnum"/>
<field id="1" name="Status" type="int16u"/>
</event>
<event side="server" code="0x02" name="ConnectionStatus" priority="info" optional="true">
<description>Indicate that a Node’s connection status to a Wi-Fi network has changed.</description>
<field id="0" name="ConnectionStatus" type="ConnectionStatusEnum"/>
</event>
</event>
</cluster>
</configurator>
2 changes: 1 addition & 1 deletion src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2051,7 +2051,7 @@ client cluster WiFiNetworkDiagnostics = 54 {
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
AssociationFailureCauseEnum associationFailureCause = 0;
int16u status = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -596,22 +596,22 @@ public String toString() {
}
}
public static class WiFiNetworkDiagnosticsClusterAssociationFailureEvent {
public Integer associationFailure;
public Integer associationFailureCause;
public Integer status;
public WiFiNetworkDiagnosticsClusterAssociationFailureEvent(
Integer associationFailure,
Integer associationFailureCause,
Integer status
) {
this.associationFailure = associationFailure;
this.associationFailureCause = associationFailureCause;
this.status = status;
}

@Override
public String toString() {
StringBuilder output = new StringBuilder();
output.append("WiFiNetworkDiagnosticsClusterAssociationFailureEvent {\n");
output.append("\tassociationFailure: ");
output.append(associationFailure);
output.append("\tassociationFailureCause: ");
output.append(associationFailureCause);
output.append("\n");
output.append("\tstatus: ");
output.append(status);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,40 +23,41 @@ import matter.tlv.TlvReader
import matter.tlv.TlvWriter

class WiFiNetworkDiagnosticsClusterAssociationFailureEvent(
val associationFailure: UInt,
val associationFailureCause: UInt,
val status: UInt
) {
override fun toString(): String = buildString {
append("WiFiNetworkDiagnosticsClusterAssociationFailureEvent {\n")
append("\tassociationFailure : $associationFailure\n")
append("\tassociationFailureCause : $associationFailureCause\n")
append("\tstatus : $status\n")
append("}\n")
}

fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
tlvWriter.apply {
startStructure(tlvTag)
put(ContextSpecificTag(TAG_ASSOCIATION_FAILURE), associationFailure)
put(ContextSpecificTag(TAG_ASSOCIATION_FAILURE_CAUSE), associationFailureCause)
put(ContextSpecificTag(TAG_STATUS), status)
endStructure()
}
}

companion object {
private const val TAG_ASSOCIATION_FAILURE = 0
private const val TAG_ASSOCIATION_FAILURE_CAUSE = 0
private const val TAG_STATUS = 1

fun fromTlv(
tlvTag: Tag,
tlvReader: TlvReader
): WiFiNetworkDiagnosticsClusterAssociationFailureEvent {
tlvReader.enterStructure(tlvTag)
val associationFailure = tlvReader.getUInt(ContextSpecificTag(TAG_ASSOCIATION_FAILURE))
val associationFailureCause =
tlvReader.getUInt(ContextSpecificTag(TAG_ASSOCIATION_FAILURE_CAUSE))
val status = tlvReader.getUInt(ContextSpecificTag(TAG_STATUS))

tlvReader.exitContainer()

return WiFiNetworkDiagnosticsClusterAssociationFailureEvent(associationFailure, status)
return WiFiNetworkDiagnosticsClusterAssociationFailureEvent(associationFailureCause, status)
}
}
}
18 changes: 9 additions & 9 deletions src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/controller/python/chip/clusters/Objects.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading