Skip to content

Commit

Permalink
Updates from regen
Browse files Browse the repository at this point in the history
  • Loading branch information
abeck-riis committed Jun 2, 2023
1 parent bd0cc55 commit 0749457
Show file tree
Hide file tree
Showing 38 changed files with 4,901 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2780,6 +2780,25 @@ client cluster ModeSelect = 80 {
command ChangeToMode(ChangeToModeRequest): DefaultSuccess = 0;
}

/** This cluster supports remotely monitoring and controling the different typs of functionality available to a washing device, such as a washing machine. */
client cluster WasherControls = 83 {
bitmap WasherControlFeature : BITMAP32 {
kSpin = 0x1;
kRinse = 0x2;
}

readonly attribute optional OCTET_STRING spinSpeeds[] = 0;
attribute optional nullable int8u spinSpeedCurrent = 1;
attribute optional nullable int8u numberOfRinses = 2;
readonly attribute optional int8u maxRinses = 3;
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;
}

/** Attributes and commands for configuring the temperature control, and reporting temperature. */
client cluster TemperatureControl = 86 {
bitmap Feature : BITMAP32 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ public static BaseCluster getCluster(long clusterId) {
if (clusterId == ModeSelect.ID) {
return new ModeSelect();
}
if (clusterId == WasherControls.ID) {
return new WasherControls();
}
if (clusterId == TemperatureControl.ID) {
return new TemperatureControl();
}
Expand Down Expand Up @@ -6314,6 +6317,110 @@ public long getCommandID(String name) throws IllegalArgumentException {
return Command.valueOf(name).getID();
}
}
public static class WasherControls implements BaseCluster {
public static final long ID = 83L;
public long getID() {
return ID;
}

public enum Attribute {
SpinSpeeds(0L),
SpinSpeedCurrent(1L),
NumberOfRinses(2L),
MaxRinses(3L),
GeneratedCommandList(65528L),
AcceptedCommandList(65529L),
EventList(65530L),
AttributeList(65531L),
FeatureMap(65532L),
ClusterRevision(65533L),;
private final long id;
Attribute(long id) {
this.id = id;
}

public long getID() {
return id;
}

public static Attribute value(long id) throws NoSuchFieldError {
for (Attribute attribute : Attribute.values()) {
if (attribute.getID() == id) {
return attribute;
}
}
throw new NoSuchFieldError();
}
}

public enum Event {;
private final long id;
Event(long id) {
this.id = id;
}

public long getID() {
return id;
}

public static Event value(long id) throws NoSuchFieldError {
for (Event event : Event.values()) {
if (event.getID() == id) {
return event;
}
}
throw new NoSuchFieldError();
}
}

public enum Command {;
private final long id;
Command(long id) {
this.id = id;
}

public long getID() {
return id;
}

public static Command value(long id) throws NoSuchFieldError {
for (Command command : Command.values()) {
if (command.getID() == id) {
return command;
}
}
throw new NoSuchFieldError();
}
}@Override
public String getAttributeName(long id) throws NoSuchFieldError {
return Attribute.value(id).toString();
}

@Override
public String getEventName(long id) throws NoSuchFieldError {
return Event.value(id).toString();
}

@Override
public String getCommandName(long id) throws NoSuchFieldError {
return Command.value(id).toString();
}

@Override
public long getAttributeID(String name) throws IllegalArgumentException {
return Attribute.valueOf(name).getID();
}

@Override
public long getEventID(String name) throws IllegalArgumentException {
return Event.valueOf(name).getID();
}

@Override
public long getCommandID(String name) throws IllegalArgumentException {
return Command.valueOf(name).getID();
}
}
public static class TemperatureControl implements BaseCluster {
public static final long ID = 86L;
public long getID() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6056,6 +6056,120 @@ private static Map<String, InteractionInfo> readModeSelectInteractionInfo() {

return result;
}
private static Map<String, InteractionInfo> readWasherControlsInteractionInfo() {
Map<String, InteractionInfo> result = new LinkedHashMap<>();Map<String, CommandParameterInfo> readWasherControlsSpinSpeedsCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
InteractionInfo readWasherControlsSpinSpeedsAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.WasherControlsCluster) cluster).readSpinSpeedsAttribute(
(ChipClusters.WasherControlsCluster.SpinSpeedsAttributeCallback) callback
);
},
() -> new ClusterInfoMapping.DelegatedWasherControlsClusterSpinSpeedsAttributeCallback(),
readWasherControlsSpinSpeedsCommandParams
);
result.put("readSpinSpeedsAttribute", readWasherControlsSpinSpeedsAttributeInteractionInfo);
Map<String, CommandParameterInfo> readWasherControlsSpinSpeedCurrentCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
InteractionInfo readWasherControlsSpinSpeedCurrentAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.WasherControlsCluster) cluster).readSpinSpeedCurrentAttribute(
(ChipClusters.WasherControlsCluster.SpinSpeedCurrentAttributeCallback) callback
);
},
() -> new ClusterInfoMapping.DelegatedWasherControlsClusterSpinSpeedCurrentAttributeCallback(),
readWasherControlsSpinSpeedCurrentCommandParams
);
result.put("readSpinSpeedCurrentAttribute", readWasherControlsSpinSpeedCurrentAttributeInteractionInfo);
Map<String, CommandParameterInfo> readWasherControlsNumberOfRinsesCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
InteractionInfo readWasherControlsNumberOfRinsesAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.WasherControlsCluster) cluster).readNumberOfRinsesAttribute(
(ChipClusters.WasherControlsCluster.NumberOfRinsesAttributeCallback) callback
);
},
() -> new ClusterInfoMapping.DelegatedWasherControlsClusterNumberOfRinsesAttributeCallback(),
readWasherControlsNumberOfRinsesCommandParams
);
result.put("readNumberOfRinsesAttribute", readWasherControlsNumberOfRinsesAttributeInteractionInfo);
Map<String, CommandParameterInfo> readWasherControlsMaxRinsesCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
InteractionInfo readWasherControlsMaxRinsesAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.WasherControlsCluster) cluster).readMaxRinsesAttribute(
(ChipClusters.IntegerAttributeCallback) callback
);
},
() -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
readWasherControlsMaxRinsesCommandParams
);
result.put("readMaxRinsesAttribute", readWasherControlsMaxRinsesAttributeInteractionInfo);
Map<String, CommandParameterInfo> readWasherControlsGeneratedCommandListCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
InteractionInfo readWasherControlsGeneratedCommandListAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.WasherControlsCluster) cluster).readGeneratedCommandListAttribute(
(ChipClusters.WasherControlsCluster.GeneratedCommandListAttributeCallback) callback
);
},
() -> new ClusterInfoMapping.DelegatedWasherControlsClusterGeneratedCommandListAttributeCallback(),
readWasherControlsGeneratedCommandListCommandParams
);
result.put("readGeneratedCommandListAttribute", readWasherControlsGeneratedCommandListAttributeInteractionInfo);
Map<String, CommandParameterInfo> readWasherControlsAcceptedCommandListCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
InteractionInfo readWasherControlsAcceptedCommandListAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.WasherControlsCluster) cluster).readAcceptedCommandListAttribute(
(ChipClusters.WasherControlsCluster.AcceptedCommandListAttributeCallback) callback
);
},
() -> new ClusterInfoMapping.DelegatedWasherControlsClusterAcceptedCommandListAttributeCallback(),
readWasherControlsAcceptedCommandListCommandParams
);
result.put("readAcceptedCommandListAttribute", readWasherControlsAcceptedCommandListAttributeInteractionInfo);
Map<String, CommandParameterInfo> readWasherControlsEventListCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
InteractionInfo readWasherControlsEventListAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.WasherControlsCluster) cluster).readEventListAttribute(
(ChipClusters.WasherControlsCluster.EventListAttributeCallback) callback
);
},
() -> new ClusterInfoMapping.DelegatedWasherControlsClusterEventListAttributeCallback(),
readWasherControlsEventListCommandParams
);
result.put("readEventListAttribute", readWasherControlsEventListAttributeInteractionInfo);
Map<String, CommandParameterInfo> readWasherControlsAttributeListCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
InteractionInfo readWasherControlsAttributeListAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.WasherControlsCluster) cluster).readAttributeListAttribute(
(ChipClusters.WasherControlsCluster.AttributeListAttributeCallback) callback
);
},
() -> new ClusterInfoMapping.DelegatedWasherControlsClusterAttributeListAttributeCallback(),
readWasherControlsAttributeListCommandParams
);
result.put("readAttributeListAttribute", readWasherControlsAttributeListAttributeInteractionInfo);
Map<String, CommandParameterInfo> readWasherControlsFeatureMapCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
InteractionInfo readWasherControlsFeatureMapAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.WasherControlsCluster) cluster).readFeatureMapAttribute(
(ChipClusters.LongAttributeCallback) callback
);
},
() -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
readWasherControlsFeatureMapCommandParams
);
result.put("readFeatureMapAttribute", readWasherControlsFeatureMapAttributeInteractionInfo);
Map<String, CommandParameterInfo> readWasherControlsClusterRevisionCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
InteractionInfo readWasherControlsClusterRevisionAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.WasherControlsCluster) cluster).readClusterRevisionAttribute(
(ChipClusters.IntegerAttributeCallback) callback
);
},
() -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
readWasherControlsClusterRevisionCommandParams
);
result.put("readClusterRevisionAttribute", readWasherControlsClusterRevisionAttributeInteractionInfo);

return result;
}
private static Map<String, InteractionInfo> readTemperatureControlInteractionInfo() {
Map<String, InteractionInfo> result = new LinkedHashMap<>();Map<String, CommandParameterInfo> readTemperatureControlTemperatureSetpointCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
InteractionInfo readTemperatureControlTemperatureSetpointAttributeInteractionInfo = new InteractionInfo(
Expand Down Expand Up @@ -22483,6 +22597,7 @@ public Map<String, Map<String, InteractionInfo>> getReadAttributeMap() {
put("booleanState", readBooleanStateInteractionInfo());
put("icdManagement", readIcdManagementInteractionInfo());
put("modeSelect", readModeSelectInteractionInfo());
put("washerControls", readWasherControlsInteractionInfo());
put("temperatureControl", readTemperatureControlInteractionInfo());
put("refrigeratorAlarm", readRefrigeratorAlarmInteractionInfo());
put("airQuality", readAirQualityInteractionInfo());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,52 @@ public Map<String, Map<String, InteractionInfo>> getWriteAttributeMap() {
);
writeModeSelectInteractionInfo.put("writeOnModeAttribute", writeModeSelectOnModeAttributeInteractionInfo);
writeAttributeMap.put("modeSelect", writeModeSelectInteractionInfo);
Map<String, InteractionInfo> writeWasherControlsInteractionInfo = new LinkedHashMap<>();
Map<String, CommandParameterInfo> writeWasherControlsSpinSpeedCurrentCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo washerControlsspinSpeedCurrentCommandParameterInfo =
new CommandParameterInfo(
"value",
Integer.class,
Integer.class
);
writeWasherControlsSpinSpeedCurrentCommandParams.put(
"value",
washerControlsspinSpeedCurrentCommandParameterInfo
);
InteractionInfo writeWasherControlsSpinSpeedCurrentAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.WasherControlsCluster) cluster).writeSpinSpeedCurrentAttribute(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("value")
);
},
() -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
writeWasherControlsSpinSpeedCurrentCommandParams
);
writeWasherControlsInteractionInfo.put("writeSpinSpeedCurrentAttribute", writeWasherControlsSpinSpeedCurrentAttributeInteractionInfo);
Map<String, CommandParameterInfo> writeWasherControlsNumberOfRinsesCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo washerControlsnumberOfRinsesCommandParameterInfo =
new CommandParameterInfo(
"value",
Integer.class,
Integer.class
);
writeWasherControlsNumberOfRinsesCommandParams.put(
"value",
washerControlsnumberOfRinsesCommandParameterInfo
);
InteractionInfo writeWasherControlsNumberOfRinsesAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.WasherControlsCluster) cluster).writeNumberOfRinsesAttribute(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("value")
);
},
() -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
writeWasherControlsNumberOfRinsesCommandParams
);
writeWasherControlsInteractionInfo.put("writeNumberOfRinsesAttribute", writeWasherControlsNumberOfRinsesAttributeInteractionInfo);
writeAttributeMap.put("washerControls", writeWasherControlsInteractionInfo);
Map<String, InteractionInfo> writeTemperatureControlInteractionInfo = new LinkedHashMap<>();
writeAttributeMap.put("temperatureControl", writeTemperatureControlInteractionInfo);
Map<String, InteractionInfo> writeRefrigeratorAlarmInteractionInfo = new LinkedHashMap<>();
Expand Down
Loading

0 comments on commit 0749457

Please sign in to comment.