Skip to content

Commit

Permalink
Re-enerated after merge using ./scripts/tools/zap_regen_all.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gmarcosb committed Oct 2, 2024
1 parent 56202a2 commit 4b42875
Show file tree
Hide file tree
Showing 42 changed files with 4,166 additions and 332 deletions.
29 changes: 29 additions & 0 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 {
kFinalValue = 2;
}

enum ThreeLevelAutoEnum : enum8 {
kLow = 0;
kMedium = 1;
kHigh = 2;
kAutomatic = 3;
}

bitmap TestGlobalBitmap : bitmap32 {
kFirstBit = 0x1;
kSecondBit = 0x2;
Expand Down Expand Up @@ -9526,6 +9533,28 @@ provisional cluster ZoneManagement = 1360 {
command access(invoke: manage) RemoveZone(RemoveZoneRequest): DefaultSuccess = 5;
}

/** This cluster provides facilities to configure and play Chime sounds, such as those used in a doorbell. */
provisional cluster Chime = 1366 {
revision 1;

struct ChimeSoundStruct {
int8u chimeID = 0;
char_string<48> name = 1;
}

readonly attribute ChimeSoundStruct installedChimeSounds[] = 0;
attribute int8u activeChimeID = 1;
attribute boolean enabled = 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;

command PlayChimeSound(): DefaultSuccess = 0;
}

/** Provides extended device information for all the logical devices represented by a Bridged Node. */
provisional cluster EcosystemInformation = 1872 {
revision 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59906,6 +59906,318 @@ public void onSuccess(byte[] tlv) {
}
}

public static class ChimeCluster extends BaseChipCluster {
public static final long CLUSTER_ID = 1366L;

private static final long INSTALLED_CHIME_SOUNDS_ATTRIBUTE_ID = 0L;
private static final long ACTIVE_CHIME_ID_ATTRIBUTE_ID = 1L;
private static final long ENABLED_ATTRIBUTE_ID = 2L;
private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L;
private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L;
private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L;
private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L;
private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L;
private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L;

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

@Override
@Deprecated
public long initWithDevice(long devicePtr, int endpointId) {
return 0L;
}

public void playChimeSound(DefaultClusterCallback callback) {
playChimeSound(callback, 0);
}

public void playChimeSound(DefaultClusterCallback callback, int timedInvokeTimeoutMs) {
final long commandId = 0L;

ArrayList<StructElement> elements = new ArrayList<>();
StructType commandArgs = new StructType(elements);
invoke(new InvokeCallbackImpl(callback) {
@Override
public void onResponse(StructType invokeStructValue) {
callback.onSuccess();
}}, commandId, commandArgs, timedInvokeTimeoutMs);
}

public interface InstalledChimeSoundsAttributeCallback extends BaseAttributeCallback {
void onSuccess(List<ChipStructs.ChimeClusterChimeSoundStruct> value);
}

public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback {
void onSuccess(List<Long> value);
}

public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback {
void onSuccess(List<Long> value);
}

public interface EventListAttributeCallback extends BaseAttributeCallback {
void onSuccess(List<Long> value);
}

public interface AttributeListAttributeCallback extends BaseAttributeCallback {
void onSuccess(List<Long> value);
}

public void readInstalledChimeSoundsAttribute(
InstalledChimeSoundsAttributeCallback callback) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INSTALLED_CHIME_SOUNDS_ATTRIBUTE_ID);

readAttribute(new ReportCallbackImpl(callback, path) {
@Override
public void onSuccess(byte[] tlv) {
List<ChipStructs.ChimeClusterChimeSoundStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
callback.onSuccess(value);
}
}, INSTALLED_CHIME_SOUNDS_ATTRIBUTE_ID, true);
}

public void subscribeInstalledChimeSoundsAttribute(
InstalledChimeSoundsAttributeCallback callback, int minInterval, int maxInterval) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INSTALLED_CHIME_SOUNDS_ATTRIBUTE_ID);

subscribeAttribute(new ReportCallbackImpl(callback, path) {
@Override
public void onSuccess(byte[] tlv) {
List<ChipStructs.ChimeClusterChimeSoundStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
callback.onSuccess(value);
}
}, INSTALLED_CHIME_SOUNDS_ATTRIBUTE_ID, minInterval, maxInterval);
}

public void readActiveChimeIDAttribute(
IntegerAttributeCallback callback) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_CHIME_ID_ATTRIBUTE_ID);

readAttribute(new ReportCallbackImpl(callback, path) {
@Override
public void onSuccess(byte[] tlv) {
Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
callback.onSuccess(value);
}
}, ACTIVE_CHIME_ID_ATTRIBUTE_ID, true);
}

public void writeActiveChimeIDAttribute(DefaultClusterCallback callback, Integer value) {
writeActiveChimeIDAttribute(callback, value, 0);
}

public void writeActiveChimeIDAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) {
BaseTLVType tlvValue = new UIntType(value);
writeAttribute(new WriteAttributesCallbackImpl(callback), ACTIVE_CHIME_ID_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs);
}

public void subscribeActiveChimeIDAttribute(
IntegerAttributeCallback callback, int minInterval, int maxInterval) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_CHIME_ID_ATTRIBUTE_ID);

subscribeAttribute(new ReportCallbackImpl(callback, path) {
@Override
public void onSuccess(byte[] tlv) {
Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
callback.onSuccess(value);
}
}, ACTIVE_CHIME_ID_ATTRIBUTE_ID, minInterval, maxInterval);
}

public void readEnabledAttribute(
BooleanAttributeCallback callback) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ENABLED_ATTRIBUTE_ID);

readAttribute(new ReportCallbackImpl(callback, path) {
@Override
public void onSuccess(byte[] tlv) {
Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
callback.onSuccess(value);
}
}, ENABLED_ATTRIBUTE_ID, true);
}

public void writeEnabledAttribute(DefaultClusterCallback callback, Boolean value) {
writeEnabledAttribute(callback, value, 0);
}

public void writeEnabledAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) {
BaseTLVType tlvValue = new BooleanType(value);
writeAttribute(new WriteAttributesCallbackImpl(callback), ENABLED_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs);
}

public void subscribeEnabledAttribute(
BooleanAttributeCallback callback, int minInterval, int maxInterval) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ENABLED_ATTRIBUTE_ID);

subscribeAttribute(new ReportCallbackImpl(callback, path) {
@Override
public void onSuccess(byte[] tlv) {
Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
callback.onSuccess(value);
}
}, ENABLED_ATTRIBUTE_ID, minInterval, maxInterval);
}

public void readGeneratedCommandListAttribute(
GeneratedCommandListAttributeCallback callback) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID);

readAttribute(new ReportCallbackImpl(callback, path) {
@Override
public void onSuccess(byte[] tlv) {
List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
callback.onSuccess(value);
}
}, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true);
}

public void subscribeGeneratedCommandListAttribute(
GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID);

subscribeAttribute(new ReportCallbackImpl(callback, path) {
@Override
public void onSuccess(byte[] tlv) {
List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
callback.onSuccess(value);
}
}, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
}

public void readAcceptedCommandListAttribute(
AcceptedCommandListAttributeCallback callback) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID);

readAttribute(new ReportCallbackImpl(callback, path) {
@Override
public void onSuccess(byte[] tlv) {
List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
callback.onSuccess(value);
}
}, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true);
}

public void subscribeAcceptedCommandListAttribute(
AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID);

subscribeAttribute(new ReportCallbackImpl(callback, path) {
@Override
public void onSuccess(byte[] tlv) {
List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
callback.onSuccess(value);
}
}, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
}

public void readEventListAttribute(
EventListAttributeCallback callback) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID);

readAttribute(new ReportCallbackImpl(callback, path) {
@Override
public void onSuccess(byte[] tlv) {
List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
callback.onSuccess(value);
}
}, EVENT_LIST_ATTRIBUTE_ID, true);
}

public void subscribeEventListAttribute(
EventListAttributeCallback callback, int minInterval, int maxInterval) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID);

subscribeAttribute(new ReportCallbackImpl(callback, path) {
@Override
public void onSuccess(byte[] tlv) {
List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
callback.onSuccess(value);
}
}, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
}

public void readAttributeListAttribute(
AttributeListAttributeCallback callback) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID);

readAttribute(new ReportCallbackImpl(callback, path) {
@Override
public void onSuccess(byte[] tlv) {
List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
callback.onSuccess(value);
}
}, ATTRIBUTE_LIST_ATTRIBUTE_ID, true);
}

public void subscribeAttributeListAttribute(
AttributeListAttributeCallback callback, int minInterval, int maxInterval) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID);

subscribeAttribute(new ReportCallbackImpl(callback, path) {
@Override
public void onSuccess(byte[] tlv) {
List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
callback.onSuccess(value);
}
}, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
}

public void readFeatureMapAttribute(
LongAttributeCallback callback) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID);

readAttribute(new ReportCallbackImpl(callback, path) {
@Override
public void onSuccess(byte[] tlv) {
Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
callback.onSuccess(value);
}
}, FEATURE_MAP_ATTRIBUTE_ID, true);
}

public void subscribeFeatureMapAttribute(
LongAttributeCallback callback, int minInterval, int maxInterval) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID);

subscribeAttribute(new ReportCallbackImpl(callback, path) {
@Override
public void onSuccess(byte[] tlv) {
Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
callback.onSuccess(value);
}
}, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval);
}

public void readClusterRevisionAttribute(
IntegerAttributeCallback callback) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID);

readAttribute(new ReportCallbackImpl(callback, path) {
@Override
public void onSuccess(byte[] tlv) {
Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
callback.onSuccess(value);
}
}, CLUSTER_REVISION_ATTRIBUTE_ID, true);
}

public void subscribeClusterRevisionAttribute(
IntegerAttributeCallback callback, int minInterval, int maxInterval) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID);

subscribeAttribute(new ReportCallbackImpl(callback, path) {
@Override
public void onSuccess(byte[] tlv) {
Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
callback.onSuccess(value);
}
}, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval);
}
}

public static class EcosystemInformationCluster extends BaseChipCluster {
public static final long CLUSTER_ID = 1872L;

Expand Down
Loading

0 comments on commit 4b42875

Please sign in to comment.