Skip to content

Commit

Permalink
Sync refrigerator alarm xml to spec. (#27030)
Browse files Browse the repository at this point in the history
* Sync refrigerator alarm xml to spec

* Zap regen

* Addressed review comments
  • Loading branch information
jadhavrohit924 authored and pull[bot] committed Sep 22, 2023
1 parent 34a570a commit f22de5b
Show file tree
Hide file tree
Showing 33 changed files with 7 additions and 1,035 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,9 @@ limitations under the License.
<define>REFRIGERATOR_ALARM</define>
<client tick="false" init="false">true</client>
<server tick="false" init="false">true</server>
<attribute side="server" code="0x0000" define="MASK" type="AlarmMap" default="0" writable="true" optional="false">Mask</attribute>
<attribute side="server" code="0x0001" define="LATCH" type="AlarmMap" default="0" writable="false" optional="false">Latch</attribute>
<attribute side="server" code="0x0000" define="MASK" type="AlarmMap" default="0" writable="false" optional="false">Mask</attribute>
<attribute side="server" code="0x0002" define="STATE" type="AlarmMap" default="0" writable="false" optional="false">State</attribute>

<command source="client" code="0x00" name="Reset" optional="false">
<description>Reset alarm</description>
<arg name="Alarms" type="AlarmMap" optional="false"/>
<arg name="Mask" type="AlarmMap" optional="true"/>
</command>

<event side="server" code="0x00" priority="info" name="Notify" optional="false">
<description>Notify</description>
<field id="0" name="Active" type="AlarmMap" />
Expand Down
11 changes: 1 addition & 10 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -3123,23 +3123,14 @@ client cluster RefrigeratorAlarm = 87 {
AlarmMap mask = 3;
}

attribute AlarmMap mask = 0;
readonly attribute AlarmMap latch = 1;
readonly attribute AlarmMap mask = 0;
readonly attribute AlarmMap state = 2;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

request struct ResetRequest {
AlarmMap alarms = 0;
optional AlarmMap mask = 1;
}

/** Reset alarm */
command Reset(ResetRequest): DefaultSuccess = 0;
}

/** This cluster is an alias of the Mode Select cluster, defining additional semantics and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7026,7 +7026,6 @@ public long getID() {

public enum Attribute {
Mask(0L),
Latch(1L),
State(2L),
GeneratedCommandList(65528L),
AcceptedCommandList(65529L),
Expand Down Expand Up @@ -7074,8 +7073,7 @@ public static Event value(long id) throws NoSuchFieldError {
}
}

public enum Command {
Reset(0L),;
public enum Command {;
private final long id;
Command(long id) {
this.id = id;
Expand All @@ -7093,24 +7091,7 @@ public static Command value(long id) throws NoSuchFieldError {
}
throw new NoSuchFieldError();
}
}public enum ResetCommandField {Alarms(0),Mask(1),;
private final int id;
ResetCommandField(int id) {
this.id = id;
}

public int getID() {
return id;
}
public static ResetCommandField value(int id) throws NoSuchFieldError {
for (ResetCommandField field : ResetCommandField.values()) {
if (field.getID() == id) {
return field;
}
}
throw new NoSuchFieldError();
}
}@Override
}@Override
public String getAttributeName(long id) throws NoSuchFieldError {
return Attribute.value(id).toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6704,17 +6704,6 @@ private static Map<String, InteractionInfo> readRefrigeratorAlarmInteractionInfo
readRefrigeratorAlarmMaskCommandParams
);
result.put("readMaskAttribute", readRefrigeratorAlarmMaskAttributeInteractionInfo);
Map<String, CommandParameterInfo> readRefrigeratorAlarmLatchCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
InteractionInfo readRefrigeratorAlarmLatchAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.RefrigeratorAlarmCluster) cluster).readLatchAttribute(
(ChipClusters.LongAttributeCallback) callback
);
},
() -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
readRefrigeratorAlarmLatchCommandParams
);
result.put("readLatchAttribute", readRefrigeratorAlarmLatchAttributeInteractionInfo);
Map<String, CommandParameterInfo> readRefrigeratorAlarmStateCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
InteractionInfo readRefrigeratorAlarmStateAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -957,28 +957,6 @@ public Map<String, Map<String, InteractionInfo>> getWriteAttributeMap() {
Map<String, InteractionInfo> writeTemperatureControlInteractionInfo = new LinkedHashMap<>();
writeAttributeMap.put("temperatureControl", writeTemperatureControlInteractionInfo);
Map<String, InteractionInfo> writeRefrigeratorAlarmInteractionInfo = new LinkedHashMap<>();
Map<String, CommandParameterInfo> writeRefrigeratorAlarmMaskCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo refrigeratorAlarmmaskCommandParameterInfo =
new CommandParameterInfo(
"value",
Long.class,
Long.class
);
writeRefrigeratorAlarmMaskCommandParams.put(
"value",
refrigeratorAlarmmaskCommandParameterInfo
);
InteractionInfo writeRefrigeratorAlarmMaskAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.RefrigeratorAlarmCluster) cluster).writeMaskAttribute(
(DefaultClusterCallback) callback,
(Long) commandArguments.get("value")
);
},
() -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
writeRefrigeratorAlarmMaskCommandParams
);
writeRefrigeratorAlarmInteractionInfo.put("writeMaskAttribute", writeRefrigeratorAlarmMaskAttributeInteractionInfo);
writeAttributeMap.put("refrigeratorAlarm", writeRefrigeratorAlarmInteractionInfo);
Map<String, InteractionInfo> writeDishwasherModeSelectInteractionInfo = new LinkedHashMap<>();
Map<String, CommandParameterInfo> writeDishwasherModeSelectStartUpModeCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
Expand Down
15 changes: 0 additions & 15 deletions src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp

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

52 changes: 0 additions & 52 deletions src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp

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

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

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

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

15 changes: 0 additions & 15 deletions src/controller/python/chip/clusters/CHIPClusters.py

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

Loading

0 comments on commit f22de5b

Please sign in to comment.