Skip to content

Commit

Permalink
fix MicrowaveOvenMode xml files and re-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mideayanghui committed Oct 31, 2023
1 parent 59eedbd commit 0cba9c4
Show file tree
Hide file tree
Showing 35 changed files with 8,561 additions and 4,723 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase
{
public:
OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session,
EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint)
EndpointId endpoint) :
ClusterBase(exchangeManager, session, endpoint)
{}
~OtaSoftwareUpdateProviderCluster() {}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase
{
public:
OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session,
EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint)
EndpointId endpoint) :
ClusterBase(exchangeManager, session, endpoint)
{}
~OtaSoftwareUpdateProviderCluster() {}
};
Expand Down
15 changes: 15 additions & 0 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -3354,6 +3354,21 @@ client cluster MicrowaveOvenMode = 94 {
kDefrost = 16385;
}

bitmap Feature : bitmap32 {
kOnOff = 0x1;
}

struct ModeTagStruct {
optional vendor_id mfgCode = 0;
enum16 value = 1;
}

struct ModeOptionStruct {
char_string<64> label = 0;
int8u mode = 1;
ModeTagStruct modeTags[] = 2;
}

readonly attribute ModeOptionStruct supportedModes[] = 0;
readonly attribute int8u currentMode = 1;
readonly attribute command_id generatedCommandList[] = 65528;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13654,6 +13654,159 @@ public void subscribeClusterRevisionAttribute(
private native void subscribeClusterRevisionAttribute(long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval);
}

public static class MicrowaveOvenModeCluster extends BaseChipCluster {
public static final long CLUSTER_ID = 94L;

public MicrowaveOvenModeCluster(long devicePtr, int endpointId) {
super(devicePtr, endpointId);
}

@Override
public native long initWithDevice(long devicePtr, int endpointId);

public interface SupportedModesAttributeCallback {
void onSuccess(List<ChipStructs.MicrowaveOvenModeClusterModeOptionStruct> value);
void onError(Exception ex);
default void onSubscriptionEstablished(long subscriptionId) {}
}

public interface GeneratedCommandListAttributeCallback {
void onSuccess(List<Long> value);
void onError(Exception ex);
default void onSubscriptionEstablished(long subscriptionId) {}
}

public interface AcceptedCommandListAttributeCallback {
void onSuccess(List<Long> value);
void onError(Exception ex);
default void onSubscriptionEstablished(long subscriptionId) {}
}

public interface EventListAttributeCallback {
void onSuccess(List<Long> value);
void onError(Exception ex);
default void onSubscriptionEstablished(long subscriptionId) {}
}

public interface AttributeListAttributeCallback {
void onSuccess(List<Long> value);
void onError(Exception ex);
default void onSubscriptionEstablished(long subscriptionId) {}
}

public void readSupportedModesAttribute(
SupportedModesAttributeCallback callback) {
readSupportedModesAttribute(chipClusterPtr, callback);
}

public void subscribeSupportedModesAttribute(
SupportedModesAttributeCallback callback, int minInterval, int maxInterval) {
subscribeSupportedModesAttribute(chipClusterPtr, callback, minInterval, maxInterval);
}

public void readCurrentModeAttribute(
IntegerAttributeCallback callback) {
readCurrentModeAttribute(chipClusterPtr, callback);
}

public void subscribeCurrentModeAttribute(
IntegerAttributeCallback callback, int minInterval, int maxInterval) {
subscribeCurrentModeAttribute(chipClusterPtr, callback, minInterval, maxInterval);
}

public void readGeneratedCommandListAttribute(
GeneratedCommandListAttributeCallback callback) {
readGeneratedCommandListAttribute(chipClusterPtr, callback);
}

public void subscribeGeneratedCommandListAttribute(
GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) {
subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval);
}

public void readAcceptedCommandListAttribute(
AcceptedCommandListAttributeCallback callback) {
readAcceptedCommandListAttribute(chipClusterPtr, callback);
}

public void subscribeAcceptedCommandListAttribute(
AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) {
subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval);
}

public void readEventListAttribute(
EventListAttributeCallback callback) {
readEventListAttribute(chipClusterPtr, callback);
}

public void subscribeEventListAttribute(
EventListAttributeCallback callback, int minInterval, int maxInterval) {
subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval);
}

public void readAttributeListAttribute(
AttributeListAttributeCallback callback) {
readAttributeListAttribute(chipClusterPtr, callback);
}

public void subscribeAttributeListAttribute(
AttributeListAttributeCallback callback, int minInterval, int maxInterval) {
subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval);
}

public void readFeatureMapAttribute(
LongAttributeCallback callback) {
readFeatureMapAttribute(chipClusterPtr, callback);
}

public void subscribeFeatureMapAttribute(
LongAttributeCallback callback, int minInterval, int maxInterval) {
subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval);
}

public void readClusterRevisionAttribute(
IntegerAttributeCallback callback) {
readClusterRevisionAttribute(chipClusterPtr, callback);
}

public void subscribeClusterRevisionAttribute(
IntegerAttributeCallback callback, int minInterval, int maxInterval) {
subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval);
}

private native void readSupportedModesAttribute(long chipClusterPtr, SupportedModesAttributeCallback callback);

private native void subscribeSupportedModesAttribute(long chipClusterPtr, SupportedModesAttributeCallback callback, int minInterval, int maxInterval);

private native void readCurrentModeAttribute(long chipClusterPtr, IntegerAttributeCallback callback);

private native void subscribeCurrentModeAttribute(long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval);

private native void readGeneratedCommandListAttribute(long chipClusterPtr, GeneratedCommandListAttributeCallback callback);

private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval);

private native void readAcceptedCommandListAttribute(long chipClusterPtr, AcceptedCommandListAttributeCallback callback);

private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval);

private native void readEventListAttribute(long chipClusterPtr, EventListAttributeCallback callback);

private native void subscribeEventListAttribute(long chipClusterPtr, EventListAttributeCallback callback, int minInterval, int maxInterval);

private native void readAttributeListAttribute(long chipClusterPtr, AttributeListAttributeCallback callback);

private native void subscribeAttributeListAttribute(long chipClusterPtr, AttributeListAttributeCallback callback, int minInterval, int maxInterval);

private native void readFeatureMapAttribute(long chipClusterPtr, LongAttributeCallback callback);

private native void subscribeFeatureMapAttribute(long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval);

private native void readClusterRevisionAttribute(long chipClusterPtr, IntegerAttributeCallback callback);

private native void subscribeClusterRevisionAttribute(long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval);
}

public static class OperationalStateCluster extends BaseChipCluster {
public static final long CLUSTER_ID = 96L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1831,6 +1831,62 @@ public String toString() {
return output.toString();
}
}
public static class MicrowaveOvenModeClusterModeTagStruct {
public Optional<Integer> mfgCode;
public Integer value;
public MicrowaveOvenModeClusterModeTagStruct(
Optional<Integer> mfgCode,
Integer value
) {
this.mfgCode = mfgCode;
this.value = value;
}

@Override
public String toString() {
StringBuilder output = new StringBuilder();
output.append("MicrowaveOvenModeClusterModeTagStruct {\n");
output.append("\tmfgCode: ");
output.append(mfgCode);
output.append("\n");
output.append("\tvalue: ");
output.append(value);
output.append("\n");
output.append("}\n");
return output.toString();
}
}
public static class MicrowaveOvenModeClusterModeOptionStruct {
public String label;
public Integer mode;
public ArrayList<ChipStructs.MicrowaveOvenModeClusterModeTagStruct> modeTags;
public MicrowaveOvenModeClusterModeOptionStruct(
String label,
Integer mode,
ArrayList<ChipStructs.MicrowaveOvenModeClusterModeTagStruct> modeTags
) {
this.label = label;
this.mode = mode;
this.modeTags = modeTags;
}

@Override
public String toString() {
StringBuilder output = new StringBuilder();
output.append("MicrowaveOvenModeClusterModeOptionStruct {\n");
output.append("\tlabel: ");
output.append(label);
output.append("\n");
output.append("\tmode: ");
output.append(mode);
output.append("\n");
output.append("\tmodeTags: ");
output.append(modeTags);
output.append("\n");
output.append("}\n");
return output.toString();
}
}
public static class OperationalStateClusterErrorStateStruct {
public Integer errorStateID;
public Optional<String> errorStateLabel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ public static BaseCluster getCluster(long clusterId) {
if (clusterId == DishwasherAlarm.ID) {
return new DishwasherAlarm();
}
if (clusterId == MicrowaveOvenMode.ID) {
return new MicrowaveOvenMode();
}
if (clusterId == OperationalState.ID) {
return new OperationalState();
}
Expand Down Expand Up @@ -7531,6 +7534,108 @@ public long getCommandID(String name) throws IllegalArgumentException {
return Command.valueOf(name).getID();
}
}
public static class MicrowaveOvenMode implements BaseCluster {
public static final long ID = 94L;
public long getID() {
return ID;
}

public enum Attribute {
SupportedModes(0L),
CurrentMode(1L),
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 OperationalState implements BaseCluster {
public static final long ID = 96L;
public long getID() {
Expand Down
Loading

0 comments on commit 0cba9c4

Please sign in to comment.