diff --git a/src/app/zap-templates/zcl/data-model/all.xml b/src/app/zap-templates/zcl/data-model/all.xml
index 4e864cc4b8fce3..63cd2e9146a6b1 100644
--- a/src/app/zap-templates/zcl/data-model/all.xml
+++ b/src/app/zap-templates/zcl/data-model/all.xml
@@ -23,6 +23,7 @@
+
diff --git a/src/app/zap-templates/zcl/data-model/chip/drlc-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/drlc-cluster.xml
new file mode 100644
index 00000000000000..e3fa9f85c51c21
--- /dev/null
+++ b/src/app/zap-templates/zcl/data-model/chip/drlc-cluster.xml
@@ -0,0 +1,264 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Demand Response Load Control
+ Energy
+ This cluster provides an interface to the functionality of Smart Energy Demand Response and Load Control.
+ 0x0096
+ DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER
+ true
+ true
+
+
+ DeviceClass
+ LoadControlPrograms
+ NumberOfLoadControlPrograms
+ Events
+ ActiveEvents
+ NumberOfEventsPerProgram
+ NumberOfTransistions
+
+ DefaultRandomStart
+
+
+
+
+ DefaultRandomDuration
+
+
+
+
+
+
+ Upon receipt, this SHALL insert a new LoadControlProgramStruct into LoadControlPrograms, or if the ProgramID matches an existing LoadControlProgramStruct, then the provider SHALL be updated with the provided values.
+
+
+
+
+
+ Upon receipt, this SHALL remove a the LoadControlProgramStruct from LoadControlPrograms with the matching ProgramID.
+
+
+
+
+
+ On receipt of the AddLoadControlEventsRequest command, the server SHALL add a load control event.
+
+
+
+
+
+ Upon receipt, this SHALL remove the LoadControlEventStruct with the matching EventID from LoadEventPrograms.
+
+
+
+
+
+
+
+ Upon receipt, this SHALL clear all the load control events.
+
+
+
+
+ This event SHALL be generated when the status of a LoadControlEventStruct changes.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json
index 06a1fdae15bd26..ea2d302d5c167d 100644
--- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json
+++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json
@@ -37,6 +37,7 @@
"diagnostic-logs-cluster.xml",
"dishwasher-alarm-cluster.xml",
"dishwasher-mode-cluster.xml",
+ "drlc-cluster.xml",
"microwave-oven-mode-cluster.xml",
"microwave-oven-control-cluster.xml",
"door-lock-cluster.xml",
diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json
index 442cfc0681f88d..004bc03c9c8692 100644
--- a/src/app/zap-templates/zcl/zcl.json
+++ b/src/app/zap-templates/zcl/zcl.json
@@ -38,6 +38,7 @@
"dishwasher-mode-cluster.xml",
"microwave-oven-mode-cluster.xml",
"door-lock-cluster.xml",
+ "drlc-cluster.xml",
"electrical-measurement-cluster.xml",
"ethernet-network-diagnostics-cluster.xml",
"fan-control-cluster.xml",
diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter
index 0e312ef1c2235f..3b5029a8a67446 100644
--- a/src/controller/data_model/controller-clusters.matter
+++ b/src/controller/data_model/controller-clusters.matter
@@ -3715,6 +3715,207 @@ client cluster ActivatedCarbonFilterMonitoring = 114 {
command ResetCondition(): DefaultSuccess = 0;
}
+/** This cluster provides an interface to the functionality of Smart Energy Demand Response and Load Control. */
+client cluster DemandResponseLoadControl = 150 {
+ enum CriticalityLevelEnum : enum8 {
+ kUnknown = 0;
+ kGreen = 1;
+ kLevel1 = 2;
+ kLevel2 = 3;
+ kLevel3 = 4;
+ kLevel4 = 5;
+ kLevel5 = 6;
+ kEmergency = 7;
+ kPlannedOutage = 8;
+ kServiceDisconnect = 9;
+ }
+
+ enum HeatingSourceEnum : enum8 {
+ kAny = 0;
+ kElectric = 1;
+ kNonElectric = 2;
+ }
+
+ enum LoadControlEventChangeSourceEnum : enum8 {
+ kAutomatic = 0;
+ kUserAction = 1;
+ }
+
+ enum LoadControlEventStatusEnum : enum8 {
+ kUnknown = 0;
+ kReceived = 1;
+ kInProgress = 2;
+ kCompleted = 3;
+ kOptedOut = 4;
+ kOptedIn = 5;
+ kCanceled = 6;
+ kSuperseded = 7;
+ kPartialOptedOut = 8;
+ kPartialOptedIn = 9;
+ kNoParticipation = 10;
+ kUnavailable = 11;
+ kFailed = 12;
+ }
+
+ enum PowerSavingsEnum : enum8 {
+ kLow = 0;
+ kMedium = 1;
+ kHigh = 2;
+ }
+
+ bitmap CancelControlBitmap : bitmap16 {
+ kRandomEnd = 0x1;
+ }
+
+ bitmap DeviceClassBitmap : bitmap32 {
+ kHVAC = 0x1;
+ kStripHeater = 0x2;
+ kWaterHeater = 0x4;
+ kPoolPump = 0x8;
+ kSmartAppliance = 0x10;
+ kIrrigationPump = 0x20;
+ kCommercialLoad = 0x40;
+ kResidentialLoad = 0x80;
+ kExteriorLighting = 0x100;
+ kInteriorLighting = 0x200;
+ kEV = 0x400;
+ kGenerationSystem = 0x800;
+ kSmartInverter = 0x1000;
+ kEVSE = 0x2000;
+ kRESU = 0x4000;
+ kEMS = 0x8000;
+ kSEM = 0x10000;
+ }
+
+ bitmap EventControlBitmap : bitmap16 {
+ kRandomStart = 0x1;
+ }
+
+ bitmap EventTransitionControlBitmap : bitmap16 {
+ kRandomDuration = 0x1;
+ kIgnoreOptOut = 0x2;
+ }
+
+ bitmap Feature : bitmap32 {
+ kEnrollmentGroups = 0x1;
+ kTemperatureOffset = 0x2;
+ kTemperatureSetpoint = 0x4;
+ kLoadAdjustment = 0x8;
+ kDutyCycle = 0x10;
+ kPowerSavings = 0x20;
+ kHeatingSource = 0x40;
+ }
+
+ struct HeatingSourceControlStruct {
+ HeatingSourceEnum heatingSource = 0;
+ }
+
+ struct PowerSavingsControlStruct {
+ PowerSavingsEnum powerSavings = 0;
+ }
+
+ struct DutyCycleControlStruct {
+ percent dutyCycle = 0;
+ }
+
+ struct AverageLoadControlStruct {
+ int8s loadAdjustment = 0;
+ }
+
+ struct TemperatureControlStruct {
+ optional nullable int16u coolingTempOffset = 0;
+ optional nullable int16u heatingtTempOffset = 1;
+ optional nullable temperature coolingTempSetpoint = 2;
+ optional nullable temperature heatingTempSetpoint = 3;
+ }
+
+ struct LoadControlEventTransitionStruct {
+ int16u duration = 0;
+ EventTransitionControlBitmap control = 1;
+ optional TemperatureControlStruct temperatureControl = 2;
+ optional AverageLoadControlStruct averageLoadControl = 3;
+ optional DutyCycleControlStruct dutyCycleControl = 4;
+ optional PowerSavingsControlStruct powerSavingsControl = 5;
+ optional HeatingSourceControlStruct heatingSourceControl = 6;
+ }
+
+ struct LoadControlEventStruct {
+ octet_string<16> eventID = 0;
+ nullable octet_string<16> programID = 1;
+ EventControlBitmap control = 2;
+ DeviceClassBitmap deviceClass = 3;
+ optional int8u enrollmentGroup = 4;
+ CriticalityLevelEnum criticality = 5;
+ nullable epoch_s startTime = 6;
+ LoadControlEventTransitionStruct transitions[] = 7;
+ }
+
+ struct LoadControlProgramStruct {
+ octet_string<16> programID = 0;
+ long_char_string<32> name = 1;
+ nullable int8u enrollmentGroup = 2;
+ nullable int8u randomStartMinutes = 3;
+ nullable int8u randomDurationMinutes = 4;
+ }
+
+ info event LoadControlEventStatusChange = 0 {
+ octet_string eventID = 0;
+ nullable int8u transitionIndex = 1;
+ LoadControlEventStatusEnum status = 2;
+ CriticalityLevelEnum criticality = 3;
+ EventControlBitmap control = 4;
+ optional nullable TemperatureControlStruct temperatureControl = 5;
+ optional nullable AverageLoadControlStruct averageLoadControl = 6;
+ optional nullable DutyCycleControlStruct dutyCycleControl = 7;
+ optional nullable PowerSavingsControlStruct powerSavingsControl = 8;
+ optional nullable HeatingSourceControlStruct heatingSourceControl = 9;
+ }
+
+ readonly attribute DeviceClassBitmap deviceClass = 0;
+ readonly attribute LoadControlProgramStruct loadControlPrograms[] = 1;
+ readonly attribute int8u numberOfLoadControlPrograms = 2;
+ readonly attribute LoadControlEventStruct events[] = 3;
+ readonly attribute LoadControlEventStruct activeEvents[] = 4;
+ readonly attribute int8u numberOfEventsPerProgram = 5;
+ readonly attribute int8u numberOfTransistions = 6;
+ attribute access(write: manage) int8u defaultRandomStart = 7;
+ attribute access(write: manage) int8u defaultRandomDuration = 8;
+ 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 RegisterLoadControlProgramRequestRequest {
+ LoadControlProgramStruct loadControlProgram = 0;
+ }
+
+ request struct UnregisterLoadControlProgramRequestRequest {
+ octet_string<16> loadControlProgramID = 0;
+ }
+
+ request struct AddLoadControlEventRequestRequest {
+ LoadControlEventStruct event = 0;
+ }
+
+ request struct RemoveLoadControlEventRequestRequest {
+ octet_string<16> eventID = 0;
+ CancelControlBitmap cancelControl = 1;
+ }
+
+ /** Upon receipt, this SHALL insert a new LoadControlProgramStruct into LoadControlPrograms, or if the ProgramID matches an existing LoadControlProgramStruct, then the provider SHALL be updated with the provided values. */
+ command RegisterLoadControlProgramRequest(RegisterLoadControlProgramRequestRequest): DefaultSuccess = 0;
+ /** Upon receipt, this SHALL remove a the LoadControlProgramStruct from LoadControlPrograms with the matching ProgramID. */
+ command UnregisterLoadControlProgramRequest(UnregisterLoadControlProgramRequestRequest): DefaultSuccess = 1;
+ /** On receipt of the AddLoadControlEventsRequest command, the server SHALL add a load control event. */
+ command AddLoadControlEventRequest(AddLoadControlEventRequestRequest): DefaultSuccess = 2;
+ /** Upon receipt, this SHALL remove the LoadControlEventStruct with the matching EventID from LoadEventPrograms. */
+ command RemoveLoadControlEventRequest(RemoveLoadControlEventRequestRequest): DefaultSuccess = 3;
+ /** Upon receipt, this SHALL clear all the load control events. */
+ command ClearLoadControlEventsRequest(): DefaultSuccess = 4;
+}
+
/** An interface to a generic way to secure a door */
client cluster DoorLock = 257 {
enum AlarmCodeEnum : enum8 {
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
index 6c298efc59e1ce..8d50cbbd76758f 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
@@ -26252,6 +26252,557 @@ public void onSuccess(byte[] tlv) {
}
}
+ public static class DemandResponseLoadControlCluster extends BaseChipCluster {
+ public static final long CLUSTER_ID = 150L;
+
+ private static final long DEVICE_CLASS_ATTRIBUTE_ID = 0L;
+ private static final long LOAD_CONTROL_PROGRAMS_ATTRIBUTE_ID = 1L;
+ private static final long NUMBER_OF_LOAD_CONTROL_PROGRAMS_ATTRIBUTE_ID = 2L;
+ private static final long EVENTS_ATTRIBUTE_ID = 3L;
+ private static final long ACTIVE_EVENTS_ATTRIBUTE_ID = 4L;
+ private static final long NUMBER_OF_EVENTS_PER_PROGRAM_ATTRIBUTE_ID = 5L;
+ private static final long NUMBER_OF_TRANSISTIONS_ATTRIBUTE_ID = 6L;
+ private static final long DEFAULT_RANDOM_START_ATTRIBUTE_ID = 7L;
+ private static final long DEFAULT_RANDOM_DURATION_ATTRIBUTE_ID = 8L;
+ 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 DemandResponseLoadControlCluster(long devicePtr, int endpointId) {
+ super(devicePtr, endpointId, CLUSTER_ID);
+ }
+
+ @Override
+ @Deprecated
+ public long initWithDevice(long devicePtr, int endpointId) {
+ return 0L;
+ }
+
+ public void registerLoadControlProgramRequest(DefaultClusterCallback callback, ChipStructs.DemandResponseLoadControlClusterLoadControlProgramStruct loadControlProgram) {
+ registerLoadControlProgramRequest(callback, loadControlProgram, 0);
+ }
+
+ public void registerLoadControlProgramRequest(DefaultClusterCallback callback, ChipStructs.DemandResponseLoadControlClusterLoadControlProgramStruct loadControlProgram, int timedInvokeTimeoutMs) {
+ final long commandId = 0L;
+
+ ArrayList elements = new ArrayList<>();
+ final long loadControlProgramFieldID = 0L;
+ BaseTLVType loadControlProgramtlvValue = loadControlProgram.encodeTlv();
+ elements.add(new StructElement(loadControlProgramFieldID, loadControlProgramtlvValue));
+
+ StructType value = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ callback.onSuccess();
+ }}, commandId, value, timedInvokeTimeoutMs);
+ }
+
+ public void unregisterLoadControlProgramRequest(DefaultClusterCallback callback, byte[] loadControlProgramID) {
+ unregisterLoadControlProgramRequest(callback, loadControlProgramID, 0);
+ }
+
+ public void unregisterLoadControlProgramRequest(DefaultClusterCallback callback, byte[] loadControlProgramID, int timedInvokeTimeoutMs) {
+ final long commandId = 1L;
+
+ ArrayList elements = new ArrayList<>();
+ final long loadControlProgramIDFieldID = 0L;
+ BaseTLVType loadControlProgramIDtlvValue = new ByteArrayType(loadControlProgramID);
+ elements.add(new StructElement(loadControlProgramIDFieldID, loadControlProgramIDtlvValue));
+
+ StructType value = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ callback.onSuccess();
+ }}, commandId, value, timedInvokeTimeoutMs);
+ }
+
+ public void addLoadControlEventRequest(DefaultClusterCallback callback, ChipStructs.DemandResponseLoadControlClusterLoadControlEventStruct event) {
+ addLoadControlEventRequest(callback, event, 0);
+ }
+
+ public void addLoadControlEventRequest(DefaultClusterCallback callback, ChipStructs.DemandResponseLoadControlClusterLoadControlEventStruct event, int timedInvokeTimeoutMs) {
+ final long commandId = 2L;
+
+ ArrayList elements = new ArrayList<>();
+ final long eventFieldID = 0L;
+ BaseTLVType eventtlvValue = event.encodeTlv();
+ elements.add(new StructElement(eventFieldID, eventtlvValue));
+
+ StructType value = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ callback.onSuccess();
+ }}, commandId, value, timedInvokeTimeoutMs);
+ }
+
+ public void removeLoadControlEventRequest(DefaultClusterCallback callback, byte[] eventID, Integer cancelControl) {
+ removeLoadControlEventRequest(callback, eventID, cancelControl, 0);
+ }
+
+ public void removeLoadControlEventRequest(DefaultClusterCallback callback, byte[] eventID, Integer cancelControl, int timedInvokeTimeoutMs) {
+ final long commandId = 3L;
+
+ ArrayList elements = new ArrayList<>();
+ final long eventIDFieldID = 0L;
+ BaseTLVType eventIDtlvValue = new ByteArrayType(eventID);
+ elements.add(new StructElement(eventIDFieldID, eventIDtlvValue));
+
+ final long cancelControlFieldID = 1L;
+ BaseTLVType cancelControltlvValue = new UIntType(cancelControl);
+ elements.add(new StructElement(cancelControlFieldID, cancelControltlvValue));
+
+ StructType value = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ callback.onSuccess();
+ }}, commandId, value, timedInvokeTimeoutMs);
+ }
+
+ public void clearLoadControlEventsRequest(DefaultClusterCallback callback) {
+ clearLoadControlEventsRequest(callback, 0);
+ }
+
+ public void clearLoadControlEventsRequest(DefaultClusterCallback callback, int timedInvokeTimeoutMs) {
+ final long commandId = 4L;
+
+ ArrayList elements = new ArrayList<>();
+ StructType value = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ callback.onSuccess();
+ }}, commandId, value, timedInvokeTimeoutMs);
+ }
+
+ public interface LoadControlProgramsAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public interface EventsAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public interface ActiveEventsAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public interface EventListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public interface AttributeListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public void readDeviceClassAttribute(
+ LongAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEVICE_CLASS_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, DEVICE_CLASS_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeDeviceClassAttribute(
+ LongAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEVICE_CLASS_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ }
+ }, DEVICE_CLASS_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readLoadControlProgramsAttribute(
+ LoadControlProgramsAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LOAD_CONTROL_PROGRAMS_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, LOAD_CONTROL_PROGRAMS_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeLoadControlProgramsAttribute(
+ LoadControlProgramsAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LOAD_CONTROL_PROGRAMS_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ }
+ }, LOAD_CONTROL_PROGRAMS_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readNumberOfLoadControlProgramsAttribute(
+ IntegerAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_LOAD_CONTROL_PROGRAMS_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, NUMBER_OF_LOAD_CONTROL_PROGRAMS_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeNumberOfLoadControlProgramsAttribute(
+ IntegerAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_LOAD_CONTROL_PROGRAMS_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ }
+ }, NUMBER_OF_LOAD_CONTROL_PROGRAMS_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readEventsAttribute(
+ EventsAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENTS_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, EVENTS_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeEventsAttribute(
+ EventsAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENTS_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ }
+ }, EVENTS_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readActiveEventsAttribute(
+ ActiveEventsAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_EVENTS_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ACTIVE_EVENTS_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeActiveEventsAttribute(
+ ActiveEventsAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_EVENTS_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ }
+ }, ACTIVE_EVENTS_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readNumberOfEventsPerProgramAttribute(
+ IntegerAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_EVENTS_PER_PROGRAM_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, NUMBER_OF_EVENTS_PER_PROGRAM_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeNumberOfEventsPerProgramAttribute(
+ IntegerAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_EVENTS_PER_PROGRAM_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ }
+ }, NUMBER_OF_EVENTS_PER_PROGRAM_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readNumberOfTransistionsAttribute(
+ IntegerAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_TRANSISTIONS_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, NUMBER_OF_TRANSISTIONS_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeNumberOfTransistionsAttribute(
+ IntegerAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_TRANSISTIONS_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ }
+ }, NUMBER_OF_TRANSISTIONS_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readDefaultRandomStartAttribute(
+ IntegerAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_RANDOM_START_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, DEFAULT_RANDOM_START_ATTRIBUTE_ID, true);
+ }
+
+ public void writeDefaultRandomStartAttribute(DefaultClusterCallback callback, Integer value) {
+ writeDefaultRandomStartAttribute(callback, value, 0);
+ }
+
+ public void writeDefaultRandomStartAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) {
+ BaseTLVType tlvValue = new UIntType(value);
+ writeAttribute(new WriteAttributesCallbackImpl(callback), DEFAULT_RANDOM_START_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs);
+ }
+
+ public void subscribeDefaultRandomStartAttribute(
+ IntegerAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_RANDOM_START_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ }
+ }, DEFAULT_RANDOM_START_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readDefaultRandomDurationAttribute(
+ IntegerAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_RANDOM_DURATION_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, DEFAULT_RANDOM_DURATION_ATTRIBUTE_ID, true);
+ }
+
+ public void writeDefaultRandomDurationAttribute(DefaultClusterCallback callback, Integer value) {
+ writeDefaultRandomDurationAttribute(callback, value, 0);
+ }
+
+ public void writeDefaultRandomDurationAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) {
+ BaseTLVType tlvValue = new UIntType(value);
+ writeAttribute(new WriteAttributesCallbackImpl(callback), DEFAULT_RANDOM_DURATION_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs);
+ }
+
+ public void subscribeDefaultRandomDurationAttribute(
+ IntegerAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_RANDOM_DURATION_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ }
+ }, DEFAULT_RANDOM_DURATION_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 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 value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ }
+ }, 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 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 value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ }
+ }, 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 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 value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ }
+ }, 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 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 value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ }
+ }, 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);
+ }
+ }, 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);
+ }
+ }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+ }
+
public static class DoorLockCluster extends BaseChipCluster {
public static final long CLUSTER_ID = 257L;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java
index 4534543f9d8634..4866e8833e8013 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java
@@ -2785,6 +2785,187 @@ public String toString() {
return output.toString();
}
}
+public static class DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent {
+ public byte[] eventID;
+ public @Nullable Integer transitionIndex;
+ public Integer status;
+ public Integer criticality;
+ public Integer control;
+ public @Nullable Optional temperatureControl;
+ public @Nullable Optional averageLoadControl;
+ public @Nullable Optional dutyCycleControl;
+ public @Nullable Optional powerSavingsControl;
+ public @Nullable Optional heatingSourceControl;
+ private static final long EVENT_I_D_ID = 0L;
+ private static final long TRANSITION_INDEX_ID = 1L;
+ private static final long STATUS_ID = 2L;
+ private static final long CRITICALITY_ID = 3L;
+ private static final long CONTROL_ID = 4L;
+ private static final long TEMPERATURE_CONTROL_ID = 5L;
+ private static final long AVERAGE_LOAD_CONTROL_ID = 6L;
+ private static final long DUTY_CYCLE_CONTROL_ID = 7L;
+ private static final long POWER_SAVINGS_CONTROL_ID = 8L;
+ private static final long HEATING_SOURCE_CONTROL_ID = 9L;
+
+ public DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent(
+ byte[] eventID,
+ @Nullable Integer transitionIndex,
+ Integer status,
+ Integer criticality,
+ Integer control,
+ @Nullable Optional temperatureControl,
+ @Nullable Optional averageLoadControl,
+ @Nullable Optional dutyCycleControl,
+ @Nullable Optional powerSavingsControl,
+ @Nullable Optional heatingSourceControl
+ ) {
+ this.eventID = eventID;
+ this.transitionIndex = transitionIndex;
+ this.status = status;
+ this.criticality = criticality;
+ this.control = control;
+ this.temperatureControl = temperatureControl;
+ this.averageLoadControl = averageLoadControl;
+ this.dutyCycleControl = dutyCycleControl;
+ this.powerSavingsControl = powerSavingsControl;
+ this.heatingSourceControl = heatingSourceControl;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList values = new ArrayList<>();
+ values.add(new StructElement(EVENT_I_D_ID, new ByteArrayType(eventID)));
+ values.add(new StructElement(TRANSITION_INDEX_ID, transitionIndex != null ? new UIntType(transitionIndex) : new NullType()));
+ values.add(new StructElement(STATUS_ID, new UIntType(status)));
+ values.add(new StructElement(CRITICALITY_ID, new UIntType(criticality)));
+ values.add(new StructElement(CONTROL_ID, new UIntType(control)));
+ values.add(new StructElement(TEMPERATURE_CONTROL_ID, temperatureControl != null ? temperatureControl.map((nonOptionaltemperatureControl) -> nonOptionaltemperatureControl.encodeTlv()).orElse(new EmptyType()) : new NullType()));
+ values.add(new StructElement(AVERAGE_LOAD_CONTROL_ID, averageLoadControl != null ? averageLoadControl.map((nonOptionalaverageLoadControl) -> nonOptionalaverageLoadControl.encodeTlv()).orElse(new EmptyType()) : new NullType()));
+ values.add(new StructElement(DUTY_CYCLE_CONTROL_ID, dutyCycleControl != null ? dutyCycleControl.map((nonOptionaldutyCycleControl) -> nonOptionaldutyCycleControl.encodeTlv()).orElse(new EmptyType()) : new NullType()));
+ values.add(new StructElement(POWER_SAVINGS_CONTROL_ID, powerSavingsControl != null ? powerSavingsControl.map((nonOptionalpowerSavingsControl) -> nonOptionalpowerSavingsControl.encodeTlv()).orElse(new EmptyType()) : new NullType()));
+ values.add(new StructElement(HEATING_SOURCE_CONTROL_ID, heatingSourceControl != null ? heatingSourceControl.map((nonOptionalheatingSourceControl) -> nonOptionalheatingSourceControl.encodeTlv()).orElse(new EmptyType()) : new NullType()));
+
+ return new StructType(values);
+ }
+
+ public static DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ byte[] eventID = null;
+ @Nullable Integer transitionIndex = null;
+ Integer status = null;
+ Integer criticality = null;
+ Integer control = null;
+ @Nullable Optional temperatureControl = null;
+ @Nullable Optional averageLoadControl = null;
+ @Nullable Optional dutyCycleControl = null;
+ @Nullable Optional powerSavingsControl = null;
+ @Nullable Optional heatingSourceControl = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == EVENT_I_D_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) {
+ ByteArrayType castingValue = element.value(ByteArrayType.class);
+ eventID = castingValue.value(byte[].class);
+ }
+ } else if (element.contextTagNum() == TRANSITION_INDEX_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ transitionIndex = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == STATUS_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ status = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == CRITICALITY_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ criticality = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == CONTROL_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ control = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == TEMPERATURE_CONTROL_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ temperatureControl = Optional.of(ChipStructs.DemandResponseLoadControlClusterTemperatureControlStruct.decodeTlv(castingValue));
+ }
+ } else if (element.contextTagNum() == AVERAGE_LOAD_CONTROL_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ averageLoadControl = Optional.of(ChipStructs.DemandResponseLoadControlClusterAverageLoadControlStruct.decodeTlv(castingValue));
+ }
+ } else if (element.contextTagNum() == DUTY_CYCLE_CONTROL_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ dutyCycleControl = Optional.of(ChipStructs.DemandResponseLoadControlClusterDutyCycleControlStruct.decodeTlv(castingValue));
+ }
+ } else if (element.contextTagNum() == POWER_SAVINGS_CONTROL_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ powerSavingsControl = Optional.of(ChipStructs.DemandResponseLoadControlClusterPowerSavingsControlStruct.decodeTlv(castingValue));
+ }
+ } else if (element.contextTagNum() == HEATING_SOURCE_CONTROL_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ heatingSourceControl = Optional.of(ChipStructs.DemandResponseLoadControlClusterHeatingSourceControlStruct.decodeTlv(castingValue));
+ }
+ }
+ }
+ return new DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent(
+ eventID,
+ transitionIndex,
+ status,
+ criticality,
+ control,
+ temperatureControl,
+ averageLoadControl,
+ dutyCycleControl,
+ powerSavingsControl,
+ heatingSourceControl
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent {\n");
+ output.append("\teventID: ");
+ output.append(Arrays.toString(eventID));
+ output.append("\n");
+ output.append("\ttransitionIndex: ");
+ output.append(transitionIndex);
+ output.append("\n");
+ output.append("\tstatus: ");
+ output.append(status);
+ output.append("\n");
+ output.append("\tcriticality: ");
+ output.append(criticality);
+ output.append("\n");
+ output.append("\tcontrol: ");
+ output.append(control);
+ output.append("\n");
+ output.append("\ttemperatureControl: ");
+ output.append(temperatureControl);
+ output.append("\n");
+ output.append("\taverageLoadControl: ");
+ output.append(averageLoadControl);
+ output.append("\n");
+ output.append("\tdutyCycleControl: ");
+ output.append(dutyCycleControl);
+ output.append("\n");
+ output.append("\tpowerSavingsControl: ");
+ output.append(powerSavingsControl);
+ output.append("\n");
+ output.append("\theatingSourceControl: ");
+ output.append(heatingSourceControl);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
public static class DoorLockClusterDoorLockAlarmEvent {
public Integer alarmCode;
private static final long ALARM_CODE_ID = 0L;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
index 6838a3c34779c5..b9889df5832fea 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
@@ -5033,6 +5033,674 @@ public String toString() {
return output.toString();
}
}
+public static class DemandResponseLoadControlClusterHeatingSourceControlStruct {
+ public Integer heatingSource;
+ private static final long HEATING_SOURCE_ID = 0L;
+
+ public DemandResponseLoadControlClusterHeatingSourceControlStruct(
+ Integer heatingSource
+ ) {
+ this.heatingSource = heatingSource;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList values = new ArrayList<>();
+ values.add(new StructElement(HEATING_SOURCE_ID, new UIntType(heatingSource)));
+
+ return new StructType(values);
+ }
+
+ public static DemandResponseLoadControlClusterHeatingSourceControlStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Integer heatingSource = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == HEATING_SOURCE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ heatingSource = castingValue.value(Integer.class);
+ }
+ }
+ }
+ return new DemandResponseLoadControlClusterHeatingSourceControlStruct(
+ heatingSource
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("DemandResponseLoadControlClusterHeatingSourceControlStruct {\n");
+ output.append("\theatingSource: ");
+ output.append(heatingSource);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class DemandResponseLoadControlClusterPowerSavingsControlStruct {
+ public Integer powerSavings;
+ private static final long POWER_SAVINGS_ID = 0L;
+
+ public DemandResponseLoadControlClusterPowerSavingsControlStruct(
+ Integer powerSavings
+ ) {
+ this.powerSavings = powerSavings;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList values = new ArrayList<>();
+ values.add(new StructElement(POWER_SAVINGS_ID, new UIntType(powerSavings)));
+
+ return new StructType(values);
+ }
+
+ public static DemandResponseLoadControlClusterPowerSavingsControlStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Integer powerSavings = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == POWER_SAVINGS_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ powerSavings = castingValue.value(Integer.class);
+ }
+ }
+ }
+ return new DemandResponseLoadControlClusterPowerSavingsControlStruct(
+ powerSavings
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("DemandResponseLoadControlClusterPowerSavingsControlStruct {\n");
+ output.append("\tpowerSavings: ");
+ output.append(powerSavings);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class DemandResponseLoadControlClusterDutyCycleControlStruct {
+ public Integer dutyCycle;
+ private static final long DUTY_CYCLE_ID = 0L;
+
+ public DemandResponseLoadControlClusterDutyCycleControlStruct(
+ Integer dutyCycle
+ ) {
+ this.dutyCycle = dutyCycle;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList values = new ArrayList<>();
+ values.add(new StructElement(DUTY_CYCLE_ID, new UIntType(dutyCycle)));
+
+ return new StructType(values);
+ }
+
+ public static DemandResponseLoadControlClusterDutyCycleControlStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Integer dutyCycle = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == DUTY_CYCLE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ dutyCycle = castingValue.value(Integer.class);
+ }
+ }
+ }
+ return new DemandResponseLoadControlClusterDutyCycleControlStruct(
+ dutyCycle
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("DemandResponseLoadControlClusterDutyCycleControlStruct {\n");
+ output.append("\tdutyCycle: ");
+ output.append(dutyCycle);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class DemandResponseLoadControlClusterAverageLoadControlStruct {
+ public Integer loadAdjustment;
+ private static final long LOAD_ADJUSTMENT_ID = 0L;
+
+ public DemandResponseLoadControlClusterAverageLoadControlStruct(
+ Integer loadAdjustment
+ ) {
+ this.loadAdjustment = loadAdjustment;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList values = new ArrayList<>();
+ values.add(new StructElement(LOAD_ADJUSTMENT_ID, new IntType(loadAdjustment)));
+
+ return new StructType(values);
+ }
+
+ public static DemandResponseLoadControlClusterAverageLoadControlStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Integer loadAdjustment = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == LOAD_ADJUSTMENT_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Int) {
+ IntType castingValue = element.value(IntType.class);
+ loadAdjustment = castingValue.value(Integer.class);
+ }
+ }
+ }
+ return new DemandResponseLoadControlClusterAverageLoadControlStruct(
+ loadAdjustment
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("DemandResponseLoadControlClusterAverageLoadControlStruct {\n");
+ output.append("\tloadAdjustment: ");
+ output.append(loadAdjustment);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class DemandResponseLoadControlClusterTemperatureControlStruct {
+ public @Nullable Optional coolingTempOffset;
+ public @Nullable Optional heatingtTempOffset;
+ public @Nullable Optional coolingTempSetpoint;
+ public @Nullable Optional heatingTempSetpoint;
+ private static final long COOLING_TEMP_OFFSET_ID = 0L;
+ private static final long HEATINGT_TEMP_OFFSET_ID = 1L;
+ private static final long COOLING_TEMP_SETPOINT_ID = 2L;
+ private static final long HEATING_TEMP_SETPOINT_ID = 3L;
+
+ public DemandResponseLoadControlClusterTemperatureControlStruct(
+ @Nullable Optional coolingTempOffset,
+ @Nullable Optional heatingtTempOffset,
+ @Nullable Optional coolingTempSetpoint,
+ @Nullable Optional heatingTempSetpoint
+ ) {
+ this.coolingTempOffset = coolingTempOffset;
+ this.heatingtTempOffset = heatingtTempOffset;
+ this.coolingTempSetpoint = coolingTempSetpoint;
+ this.heatingTempSetpoint = heatingTempSetpoint;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList values = new ArrayList<>();
+ values.add(new StructElement(COOLING_TEMP_OFFSET_ID, coolingTempOffset != null ? coolingTempOffset.map((nonOptionalcoolingTempOffset) -> new UIntType(nonOptionalcoolingTempOffset)).orElse(new EmptyType()) : new NullType()));
+ values.add(new StructElement(HEATINGT_TEMP_OFFSET_ID, heatingtTempOffset != null ? heatingtTempOffset.map((nonOptionalheatingtTempOffset) -> new UIntType(nonOptionalheatingtTempOffset)).orElse(new EmptyType()) : new NullType()));
+ values.add(new StructElement(COOLING_TEMP_SETPOINT_ID, coolingTempSetpoint != null ? coolingTempSetpoint.map((nonOptionalcoolingTempSetpoint) -> new IntType(nonOptionalcoolingTempSetpoint)).orElse(new EmptyType()) : new NullType()));
+ values.add(new StructElement(HEATING_TEMP_SETPOINT_ID, heatingTempSetpoint != null ? heatingTempSetpoint.map((nonOptionalheatingTempSetpoint) -> new IntType(nonOptionalheatingTempSetpoint)).orElse(new EmptyType()) : new NullType()));
+
+ return new StructType(values);
+ }
+
+ public static DemandResponseLoadControlClusterTemperatureControlStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ @Nullable Optional coolingTempOffset = null;
+ @Nullable Optional heatingtTempOffset = null;
+ @Nullable Optional coolingTempSetpoint = null;
+ @Nullable Optional heatingTempSetpoint = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == COOLING_TEMP_OFFSET_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ coolingTempOffset = Optional.of(castingValue.value(Integer.class));
+ }
+ } else if (element.contextTagNum() == HEATINGT_TEMP_OFFSET_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ heatingtTempOffset = Optional.of(castingValue.value(Integer.class));
+ }
+ } else if (element.contextTagNum() == COOLING_TEMP_SETPOINT_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Int) {
+ IntType castingValue = element.value(IntType.class);
+ coolingTempSetpoint = Optional.of(castingValue.value(Integer.class));
+ }
+ } else if (element.contextTagNum() == HEATING_TEMP_SETPOINT_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Int) {
+ IntType castingValue = element.value(IntType.class);
+ heatingTempSetpoint = Optional.of(castingValue.value(Integer.class));
+ }
+ }
+ }
+ return new DemandResponseLoadControlClusterTemperatureControlStruct(
+ coolingTempOffset,
+ heatingtTempOffset,
+ coolingTempSetpoint,
+ heatingTempSetpoint
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("DemandResponseLoadControlClusterTemperatureControlStruct {\n");
+ output.append("\tcoolingTempOffset: ");
+ output.append(coolingTempOffset);
+ output.append("\n");
+ output.append("\theatingtTempOffset: ");
+ output.append(heatingtTempOffset);
+ output.append("\n");
+ output.append("\tcoolingTempSetpoint: ");
+ output.append(coolingTempSetpoint);
+ output.append("\n");
+ output.append("\theatingTempSetpoint: ");
+ output.append(heatingTempSetpoint);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class DemandResponseLoadControlClusterLoadControlEventTransitionStruct {
+ public Integer duration;
+ public Integer control;
+ public Optional temperatureControl;
+ public Optional averageLoadControl;
+ public Optional dutyCycleControl;
+ public Optional powerSavingsControl;
+ public Optional heatingSourceControl;
+ private static final long DURATION_ID = 0L;
+ private static final long CONTROL_ID = 1L;
+ private static final long TEMPERATURE_CONTROL_ID = 2L;
+ private static final long AVERAGE_LOAD_CONTROL_ID = 3L;
+ private static final long DUTY_CYCLE_CONTROL_ID = 4L;
+ private static final long POWER_SAVINGS_CONTROL_ID = 5L;
+ private static final long HEATING_SOURCE_CONTROL_ID = 6L;
+
+ public DemandResponseLoadControlClusterLoadControlEventTransitionStruct(
+ Integer duration,
+ Integer control,
+ Optional temperatureControl,
+ Optional averageLoadControl,
+ Optional dutyCycleControl,
+ Optional powerSavingsControl,
+ Optional heatingSourceControl
+ ) {
+ this.duration = duration;
+ this.control = control;
+ this.temperatureControl = temperatureControl;
+ this.averageLoadControl = averageLoadControl;
+ this.dutyCycleControl = dutyCycleControl;
+ this.powerSavingsControl = powerSavingsControl;
+ this.heatingSourceControl = heatingSourceControl;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList values = new ArrayList<>();
+ values.add(new StructElement(DURATION_ID, new UIntType(duration)));
+ values.add(new StructElement(CONTROL_ID, new UIntType(control)));
+ values.add(new StructElement(TEMPERATURE_CONTROL_ID, temperatureControl.map((nonOptionaltemperatureControl) -> nonOptionaltemperatureControl.encodeTlv()).orElse(new EmptyType())));
+ values.add(new StructElement(AVERAGE_LOAD_CONTROL_ID, averageLoadControl.map((nonOptionalaverageLoadControl) -> nonOptionalaverageLoadControl.encodeTlv()).orElse(new EmptyType())));
+ values.add(new StructElement(DUTY_CYCLE_CONTROL_ID, dutyCycleControl.map((nonOptionaldutyCycleControl) -> nonOptionaldutyCycleControl.encodeTlv()).orElse(new EmptyType())));
+ values.add(new StructElement(POWER_SAVINGS_CONTROL_ID, powerSavingsControl.map((nonOptionalpowerSavingsControl) -> nonOptionalpowerSavingsControl.encodeTlv()).orElse(new EmptyType())));
+ values.add(new StructElement(HEATING_SOURCE_CONTROL_ID, heatingSourceControl.map((nonOptionalheatingSourceControl) -> nonOptionalheatingSourceControl.encodeTlv()).orElse(new EmptyType())));
+
+ return new StructType(values);
+ }
+
+ public static DemandResponseLoadControlClusterLoadControlEventTransitionStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Integer duration = null;
+ Integer control = null;
+ Optional temperatureControl = Optional.empty();
+ Optional averageLoadControl = Optional.empty();
+ Optional dutyCycleControl = Optional.empty();
+ Optional powerSavingsControl = Optional.empty();
+ Optional heatingSourceControl = Optional.empty();
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == DURATION_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ duration = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == CONTROL_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ control = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == TEMPERATURE_CONTROL_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ temperatureControl = Optional.of(ChipStructs.DemandResponseLoadControlClusterTemperatureControlStruct.decodeTlv(castingValue));
+ }
+ } else if (element.contextTagNum() == AVERAGE_LOAD_CONTROL_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ averageLoadControl = Optional.of(ChipStructs.DemandResponseLoadControlClusterAverageLoadControlStruct.decodeTlv(castingValue));
+ }
+ } else if (element.contextTagNum() == DUTY_CYCLE_CONTROL_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ dutyCycleControl = Optional.of(ChipStructs.DemandResponseLoadControlClusterDutyCycleControlStruct.decodeTlv(castingValue));
+ }
+ } else if (element.contextTagNum() == POWER_SAVINGS_CONTROL_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ powerSavingsControl = Optional.of(ChipStructs.DemandResponseLoadControlClusterPowerSavingsControlStruct.decodeTlv(castingValue));
+ }
+ } else if (element.contextTagNum() == HEATING_SOURCE_CONTROL_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ heatingSourceControl = Optional.of(ChipStructs.DemandResponseLoadControlClusterHeatingSourceControlStruct.decodeTlv(castingValue));
+ }
+ }
+ }
+ return new DemandResponseLoadControlClusterLoadControlEventTransitionStruct(
+ duration,
+ control,
+ temperatureControl,
+ averageLoadControl,
+ dutyCycleControl,
+ powerSavingsControl,
+ heatingSourceControl
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("DemandResponseLoadControlClusterLoadControlEventTransitionStruct {\n");
+ output.append("\tduration: ");
+ output.append(duration);
+ output.append("\n");
+ output.append("\tcontrol: ");
+ output.append(control);
+ output.append("\n");
+ output.append("\ttemperatureControl: ");
+ output.append(temperatureControl);
+ output.append("\n");
+ output.append("\taverageLoadControl: ");
+ output.append(averageLoadControl);
+ output.append("\n");
+ output.append("\tdutyCycleControl: ");
+ output.append(dutyCycleControl);
+ output.append("\n");
+ output.append("\tpowerSavingsControl: ");
+ output.append(powerSavingsControl);
+ output.append("\n");
+ output.append("\theatingSourceControl: ");
+ output.append(heatingSourceControl);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class DemandResponseLoadControlClusterLoadControlEventStruct {
+ public byte[] eventID;
+ public @Nullable byte[] programID;
+ public Integer control;
+ public Long deviceClass;
+ public Optional enrollmentGroup;
+ public Integer criticality;
+ public @Nullable Long startTime;
+ public ArrayList transitions;
+ private static final long EVENT_I_D_ID = 0L;
+ private static final long PROGRAM_I_D_ID = 1L;
+ private static final long CONTROL_ID = 2L;
+ private static final long DEVICE_CLASS_ID = 3L;
+ private static final long ENROLLMENT_GROUP_ID = 4L;
+ private static final long CRITICALITY_ID = 5L;
+ private static final long START_TIME_ID = 6L;
+ private static final long TRANSITIONS_ID = 7L;
+
+ public DemandResponseLoadControlClusterLoadControlEventStruct(
+ byte[] eventID,
+ @Nullable byte[] programID,
+ Integer control,
+ Long deviceClass,
+ Optional enrollmentGroup,
+ Integer criticality,
+ @Nullable Long startTime,
+ ArrayList transitions
+ ) {
+ this.eventID = eventID;
+ this.programID = programID;
+ this.control = control;
+ this.deviceClass = deviceClass;
+ this.enrollmentGroup = enrollmentGroup;
+ this.criticality = criticality;
+ this.startTime = startTime;
+ this.transitions = transitions;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList values = new ArrayList<>();
+ values.add(new StructElement(EVENT_I_D_ID, new ByteArrayType(eventID)));
+ values.add(new StructElement(PROGRAM_I_D_ID, programID != null ? new ByteArrayType(programID) : new NullType()));
+ values.add(new StructElement(CONTROL_ID, new UIntType(control)));
+ values.add(new StructElement(DEVICE_CLASS_ID, new UIntType(deviceClass)));
+ values.add(new StructElement(ENROLLMENT_GROUP_ID, enrollmentGroup.map((nonOptionalenrollmentGroup) -> new UIntType(nonOptionalenrollmentGroup)).orElse(new EmptyType())));
+ values.add(new StructElement(CRITICALITY_ID, new UIntType(criticality)));
+ values.add(new StructElement(START_TIME_ID, startTime != null ? new UIntType(startTime) : new NullType()));
+ values.add(new StructElement(TRANSITIONS_ID, ArrayType.generateArrayType(transitions, (elementtransitions) -> elementtransitions.encodeTlv())));
+
+ return new StructType(values);
+ }
+
+ public static DemandResponseLoadControlClusterLoadControlEventStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ byte[] eventID = null;
+ @Nullable byte[] programID = null;
+ Integer control = null;
+ Long deviceClass = null;
+ Optional enrollmentGroup = Optional.empty();
+ Integer criticality = null;
+ @Nullable Long startTime = null;
+ ArrayList transitions = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == EVENT_I_D_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) {
+ ByteArrayType castingValue = element.value(ByteArrayType.class);
+ eventID = castingValue.value(byte[].class);
+ }
+ } else if (element.contextTagNum() == PROGRAM_I_D_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) {
+ ByteArrayType castingValue = element.value(ByteArrayType.class);
+ programID = castingValue.value(byte[].class);
+ }
+ } else if (element.contextTagNum() == CONTROL_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ control = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == DEVICE_CLASS_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ deviceClass = castingValue.value(Long.class);
+ }
+ } else if (element.contextTagNum() == ENROLLMENT_GROUP_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ enrollmentGroup = Optional.of(castingValue.value(Integer.class));
+ }
+ } else if (element.contextTagNum() == CRITICALITY_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ criticality = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == START_TIME_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ startTime = castingValue.value(Long.class);
+ }
+ } else if (element.contextTagNum() == TRANSITIONS_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Array) {
+ ArrayType castingValue = element.value(ArrayType.class);
+ transitions = castingValue.map((elementcastingValue) -> ChipStructs.DemandResponseLoadControlClusterLoadControlEventTransitionStruct.decodeTlv(elementcastingValue));
+ }
+ }
+ }
+ return new DemandResponseLoadControlClusterLoadControlEventStruct(
+ eventID,
+ programID,
+ control,
+ deviceClass,
+ enrollmentGroup,
+ criticality,
+ startTime,
+ transitions
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("DemandResponseLoadControlClusterLoadControlEventStruct {\n");
+ output.append("\teventID: ");
+ output.append(Arrays.toString(eventID));
+ output.append("\n");
+ output.append("\tprogramID: ");
+ output.append(Arrays.toString(programID));
+ output.append("\n");
+ output.append("\tcontrol: ");
+ output.append(control);
+ output.append("\n");
+ output.append("\tdeviceClass: ");
+ output.append(deviceClass);
+ output.append("\n");
+ output.append("\tenrollmentGroup: ");
+ output.append(enrollmentGroup);
+ output.append("\n");
+ output.append("\tcriticality: ");
+ output.append(criticality);
+ output.append("\n");
+ output.append("\tstartTime: ");
+ output.append(startTime);
+ output.append("\n");
+ output.append("\ttransitions: ");
+ output.append(transitions);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class DemandResponseLoadControlClusterLoadControlProgramStruct {
+ public byte[] programID;
+ public String name;
+ public @Nullable Integer enrollmentGroup;
+ public @Nullable Integer randomStartMinutes;
+ public @Nullable Integer randomDurationMinutes;
+ private static final long PROGRAM_I_D_ID = 0L;
+ private static final long NAME_ID = 1L;
+ private static final long ENROLLMENT_GROUP_ID = 2L;
+ private static final long RANDOM_START_MINUTES_ID = 3L;
+ private static final long RANDOM_DURATION_MINUTES_ID = 4L;
+
+ public DemandResponseLoadControlClusterLoadControlProgramStruct(
+ byte[] programID,
+ String name,
+ @Nullable Integer enrollmentGroup,
+ @Nullable Integer randomStartMinutes,
+ @Nullable Integer randomDurationMinutes
+ ) {
+ this.programID = programID;
+ this.name = name;
+ this.enrollmentGroup = enrollmentGroup;
+ this.randomStartMinutes = randomStartMinutes;
+ this.randomDurationMinutes = randomDurationMinutes;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList values = new ArrayList<>();
+ values.add(new StructElement(PROGRAM_I_D_ID, new ByteArrayType(programID)));
+ values.add(new StructElement(NAME_ID, new StringType(name)));
+ values.add(new StructElement(ENROLLMENT_GROUP_ID, enrollmentGroup != null ? new UIntType(enrollmentGroup) : new NullType()));
+ values.add(new StructElement(RANDOM_START_MINUTES_ID, randomStartMinutes != null ? new UIntType(randomStartMinutes) : new NullType()));
+ values.add(new StructElement(RANDOM_DURATION_MINUTES_ID, randomDurationMinutes != null ? new UIntType(randomDurationMinutes) : new NullType()));
+
+ return new StructType(values);
+ }
+
+ public static DemandResponseLoadControlClusterLoadControlProgramStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ byte[] programID = null;
+ String name = null;
+ @Nullable Integer enrollmentGroup = null;
+ @Nullable Integer randomStartMinutes = null;
+ @Nullable Integer randomDurationMinutes = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == PROGRAM_I_D_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) {
+ ByteArrayType castingValue = element.value(ByteArrayType.class);
+ programID = castingValue.value(byte[].class);
+ }
+ } else if (element.contextTagNum() == NAME_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.String) {
+ StringType castingValue = element.value(StringType.class);
+ name = castingValue.value(String.class);
+ }
+ } else if (element.contextTagNum() == ENROLLMENT_GROUP_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ enrollmentGroup = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == RANDOM_START_MINUTES_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ randomStartMinutes = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == RANDOM_DURATION_MINUTES_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ randomDurationMinutes = castingValue.value(Integer.class);
+ }
+ }
+ }
+ return new DemandResponseLoadControlClusterLoadControlProgramStruct(
+ programID,
+ name,
+ enrollmentGroup,
+ randomStartMinutes,
+ randomDurationMinutes
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("DemandResponseLoadControlClusterLoadControlProgramStruct {\n");
+ output.append("\tprogramID: ");
+ output.append(Arrays.toString(programID));
+ output.append("\n");
+ output.append("\tname: ");
+ output.append(name);
+ output.append("\n");
+ output.append("\tenrollmentGroup: ");
+ output.append(enrollmentGroup);
+ output.append("\n");
+ output.append("\trandomStartMinutes: ");
+ output.append(randomStartMinutes);
+ output.append("\n");
+ output.append("\trandomDurationMinutes: ");
+ output.append(randomDurationMinutes);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
public static class DoorLockClusterCredentialStruct {
public Integer credentialType;
public Integer credentialIndex;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
index 5d35f2341c1ff1..a340abd92582a1 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
@@ -208,6 +208,9 @@ public static BaseCluster getCluster(long clusterId) {
if (clusterId == ActivatedCarbonFilterMonitoring.ID) {
return new ActivatedCarbonFilterMonitoring();
}
+ if (clusterId == DemandResponseLoadControl.ID) {
+ return new DemandResponseLoadControl();
+ }
if (clusterId == DoorLock.ID) {
return new DoorLock();
}
@@ -8397,6 +8400,189 @@ public long getCommandID(String name) throws IllegalArgumentException {
return Command.valueOf(name).getID();
}
}
+ public static class DemandResponseLoadControl implements BaseCluster {
+ public static final long ID = 150L;
+ public long getID() {
+ return ID;
+ }
+
+ public enum Attribute {
+ DeviceClass(0L),
+ LoadControlPrograms(1L),
+ NumberOfLoadControlPrograms(2L),
+ Events(3L),
+ ActiveEvents(4L),
+ NumberOfEventsPerProgram(5L),
+ NumberOfTransistions(6L),
+ DefaultRandomStart(7L),
+ DefaultRandomDuration(8L),
+ 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 {
+ LoadControlEventStatusChange(0L),;
+ 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 {
+ RegisterLoadControlProgramRequest(0L),
+ UnregisterLoadControlProgramRequest(1L),
+ AddLoadControlEventRequest(2L),
+ RemoveLoadControlEventRequest(3L),
+ ClearLoadControlEventsRequest(4L),;
+ 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();
+ }
+ }public enum RegisterLoadControlProgramRequestCommandField {LoadControlProgram(0),;
+ private final int id;
+ RegisterLoadControlProgramRequestCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static RegisterLoadControlProgramRequestCommandField value(int id) throws NoSuchFieldError {
+ for (RegisterLoadControlProgramRequestCommandField field : RegisterLoadControlProgramRequestCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum UnregisterLoadControlProgramRequestCommandField {LoadControlProgramID(0),;
+ private final int id;
+ UnregisterLoadControlProgramRequestCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static UnregisterLoadControlProgramRequestCommandField value(int id) throws NoSuchFieldError {
+ for (UnregisterLoadControlProgramRequestCommandField field : UnregisterLoadControlProgramRequestCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum AddLoadControlEventRequestCommandField {Event(0),;
+ private final int id;
+ AddLoadControlEventRequestCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static AddLoadControlEventRequestCommandField value(int id) throws NoSuchFieldError {
+ for (AddLoadControlEventRequestCommandField field : AddLoadControlEventRequestCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum RemoveLoadControlEventRequestCommandField {EventID(0),CancelControl(1),;
+ private final int id;
+ RemoveLoadControlEventRequestCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static RemoveLoadControlEventRequestCommandField value(int id) throws NoSuchFieldError {
+ for (RemoveLoadControlEventRequestCommandField field : RemoveLoadControlEventRequestCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ 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 DoorLock implements BaseCluster {
public static final long ID = 257L;
public long getID() {
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
index c5d9d1d9df7def..8f86942fe67027 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
@@ -9121,6 +9121,153 @@ public void onError(Exception ex) {
}
}
+ public static class DelegatedDemandResponseLoadControlClusterLoadControlProgramsAttributeCallback implements ChipClusters.DemandResponseLoadControlCluster.LoadControlProgramsAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List valueList) {
+ Map responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedDemandResponseLoadControlClusterEventsAttributeCallback implements ChipClusters.DemandResponseLoadControlCluster.EventsAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List valueList) {
+ Map responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedDemandResponseLoadControlClusterActiveEventsAttributeCallback implements ChipClusters.DemandResponseLoadControlCluster.ActiveEventsAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List valueList) {
+ Map responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedDemandResponseLoadControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.DemandResponseLoadControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List valueList) {
+ Map responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedDemandResponseLoadControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.DemandResponseLoadControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List valueList) {
+ Map responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedDemandResponseLoadControlClusterEventListAttributeCallback implements ChipClusters.DemandResponseLoadControlCluster.EventListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List valueList) {
+ Map responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedDemandResponseLoadControlClusterAttributeListAttributeCallback implements ChipClusters.DemandResponseLoadControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List valueList) {
+ Map responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
public static class DelegatedDoorLockClusterGetWeekDayScheduleResponseCallback implements ChipClusters.DoorLockCluster.GetWeekDayScheduleResponseCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@@ -17394,6 +17541,10 @@ public Map initializeClusterMap() {
(ptr, endpointId) -> new ChipClusters.ActivatedCarbonFilterMonitoringCluster(ptr, endpointId), new HashMap<>());
clusterMap.put("activatedCarbonFilterMonitoring", activatedCarbonFilterMonitoringClusterInfo);
+ ClusterInfo demandResponseLoadControlClusterInfo = new ClusterInfo(
+ (ptr, endpointId) -> new ChipClusters.DemandResponseLoadControlCluster(ptr, endpointId), new HashMap<>());
+ clusterMap.put("demandResponseLoadControl", demandResponseLoadControlClusterInfo);
+
ClusterInfo doorLockClusterInfo = new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.DoorLockCluster(ptr, endpointId), new HashMap<>());
clusterMap.put("doorLock", doorLockClusterInfo);
@@ -17622,6 +17773,7 @@ public void combineCommand(Map destination, Map> getCommandMap() {
commandMap.put("activatedCarbonFilterMonitoring", activatedCarbonFilterMonitoringClusterInteractionInfoMap);
+ Map demandResponseLoadControlClusterInteractionInfoMap = new LinkedHashMap<>();
+
+ Map demandResponseLoadControlregisterLoadControlProgramRequestCommandParams = new LinkedHashMap();
+
+ InteractionInfo demandResponseLoadControlregisterLoadControlProgramRequestInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.DemandResponseLoadControlCluster) cluster)
+ .registerLoadControlProgramRequest((DefaultClusterCallback) callback
+ , (ChipStructs.DemandResponseLoadControlClusterLoadControlProgramStruct)
+ commandArguments.get("loadControlProgram")
+ );
+ },
+ () -> new DelegatedDefaultClusterCallback(),
+ demandResponseLoadControlregisterLoadControlProgramRequestCommandParams
+ );
+ demandResponseLoadControlClusterInteractionInfoMap.put("registerLoadControlProgramRequest", demandResponseLoadControlregisterLoadControlProgramRequestInteractionInfo);
+
+ Map demandResponseLoadControlunregisterLoadControlProgramRequestCommandParams = new LinkedHashMap();
+
+ CommandParameterInfo demandResponseLoadControlunregisterLoadControlProgramRequestloadControlProgramIDCommandParameterInfo = new CommandParameterInfo("loadControlProgramID", byte[].class, byte[].class);
+ demandResponseLoadControlunregisterLoadControlProgramRequestCommandParams.put("loadControlProgramID",demandResponseLoadControlunregisterLoadControlProgramRequestloadControlProgramIDCommandParameterInfo);
+ InteractionInfo demandResponseLoadControlunregisterLoadControlProgramRequestInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.DemandResponseLoadControlCluster) cluster)
+ .unregisterLoadControlProgramRequest((DefaultClusterCallback) callback
+ , (byte[])
+ commandArguments.get("loadControlProgramID")
+ );
+ },
+ () -> new DelegatedDefaultClusterCallback(),
+ demandResponseLoadControlunregisterLoadControlProgramRequestCommandParams
+ );
+ demandResponseLoadControlClusterInteractionInfoMap.put("unregisterLoadControlProgramRequest", demandResponseLoadControlunregisterLoadControlProgramRequestInteractionInfo);
+
+ Map demandResponseLoadControladdLoadControlEventRequestCommandParams = new LinkedHashMap();
+
+ InteractionInfo demandResponseLoadControladdLoadControlEventRequestInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.DemandResponseLoadControlCluster) cluster)
+ .addLoadControlEventRequest((DefaultClusterCallback) callback
+ , (ChipStructs.DemandResponseLoadControlClusterLoadControlEventStruct)
+ commandArguments.get("event")
+ );
+ },
+ () -> new DelegatedDefaultClusterCallback(),
+ demandResponseLoadControladdLoadControlEventRequestCommandParams
+ );
+ demandResponseLoadControlClusterInteractionInfoMap.put("addLoadControlEventRequest", demandResponseLoadControladdLoadControlEventRequestInteractionInfo);
+
+ Map demandResponseLoadControlremoveLoadControlEventRequestCommandParams = new LinkedHashMap();
+
+ CommandParameterInfo demandResponseLoadControlremoveLoadControlEventRequesteventIDCommandParameterInfo = new CommandParameterInfo("eventID", byte[].class, byte[].class);
+ demandResponseLoadControlremoveLoadControlEventRequestCommandParams.put("eventID",demandResponseLoadControlremoveLoadControlEventRequesteventIDCommandParameterInfo);
+
+ CommandParameterInfo demandResponseLoadControlremoveLoadControlEventRequestcancelControlCommandParameterInfo = new CommandParameterInfo("cancelControl", Integer.class, Integer.class);
+ demandResponseLoadControlremoveLoadControlEventRequestCommandParams.put("cancelControl",demandResponseLoadControlremoveLoadControlEventRequestcancelControlCommandParameterInfo);
+ InteractionInfo demandResponseLoadControlremoveLoadControlEventRequestInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.DemandResponseLoadControlCluster) cluster)
+ .removeLoadControlEventRequest((DefaultClusterCallback) callback
+ , (byte[])
+ commandArguments.get("eventID")
+ , (Integer)
+ commandArguments.get("cancelControl")
+ );
+ },
+ () -> new DelegatedDefaultClusterCallback(),
+ demandResponseLoadControlremoveLoadControlEventRequestCommandParams
+ );
+ demandResponseLoadControlClusterInteractionInfoMap.put("removeLoadControlEventRequest", demandResponseLoadControlremoveLoadControlEventRequestInteractionInfo);
+
+ Map demandResponseLoadControlclearLoadControlEventsRequestCommandParams = new LinkedHashMap();
+ InteractionInfo demandResponseLoadControlclearLoadControlEventsRequestInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.DemandResponseLoadControlCluster) cluster)
+ .clearLoadControlEventsRequest((DefaultClusterCallback) callback
+ );
+ },
+ () -> new DelegatedDefaultClusterCallback(),
+ demandResponseLoadControlclearLoadControlEventsRequestCommandParams
+ );
+ demandResponseLoadControlClusterInteractionInfoMap.put("clearLoadControlEventsRequest", demandResponseLoadControlclearLoadControlEventsRequestInteractionInfo);
+
+ commandMap.put("demandResponseLoadControl", demandResponseLoadControlClusterInteractionInfoMap);
+
Map doorLockClusterInteractionInfoMap = new LinkedHashMap<>();
Map doorLocklockDoorCommandParams = new LinkedHashMap();
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
index eae902b09073b9..4e1b64b42e125f 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
@@ -8284,6 +8284,175 @@ private static Map readActivatedCarbonFilterMonitoringI
return result;
}
+ private static Map readDemandResponseLoadControlInteractionInfo() {
+ Map result = new LinkedHashMap<>();Map readDemandResponseLoadControlDeviceClassCommandParams = new LinkedHashMap();
+ InteractionInfo readDemandResponseLoadControlDeviceClassAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.DemandResponseLoadControlCluster) cluster).readDeviceClassAttribute(
+ (ChipClusters.LongAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
+ readDemandResponseLoadControlDeviceClassCommandParams
+ );
+ result.put("readDeviceClassAttribute", readDemandResponseLoadControlDeviceClassAttributeInteractionInfo);
+ Map readDemandResponseLoadControlLoadControlProgramsCommandParams = new LinkedHashMap();
+ InteractionInfo readDemandResponseLoadControlLoadControlProgramsAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.DemandResponseLoadControlCluster) cluster).readLoadControlProgramsAttribute(
+ (ChipClusters.DemandResponseLoadControlCluster.LoadControlProgramsAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedDemandResponseLoadControlClusterLoadControlProgramsAttributeCallback(),
+ readDemandResponseLoadControlLoadControlProgramsCommandParams
+ );
+ result.put("readLoadControlProgramsAttribute", readDemandResponseLoadControlLoadControlProgramsAttributeInteractionInfo);
+ Map readDemandResponseLoadControlNumberOfLoadControlProgramsCommandParams = new LinkedHashMap();
+ InteractionInfo readDemandResponseLoadControlNumberOfLoadControlProgramsAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.DemandResponseLoadControlCluster) cluster).readNumberOfLoadControlProgramsAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readDemandResponseLoadControlNumberOfLoadControlProgramsCommandParams
+ );
+ result.put("readNumberOfLoadControlProgramsAttribute", readDemandResponseLoadControlNumberOfLoadControlProgramsAttributeInteractionInfo);
+ Map readDemandResponseLoadControlEventsCommandParams = new LinkedHashMap();
+ InteractionInfo readDemandResponseLoadControlEventsAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.DemandResponseLoadControlCluster) cluster).readEventsAttribute(
+ (ChipClusters.DemandResponseLoadControlCluster.EventsAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedDemandResponseLoadControlClusterEventsAttributeCallback(),
+ readDemandResponseLoadControlEventsCommandParams
+ );
+ result.put("readEventsAttribute", readDemandResponseLoadControlEventsAttributeInteractionInfo);
+ Map readDemandResponseLoadControlActiveEventsCommandParams = new LinkedHashMap();
+ InteractionInfo readDemandResponseLoadControlActiveEventsAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.DemandResponseLoadControlCluster) cluster).readActiveEventsAttribute(
+ (ChipClusters.DemandResponseLoadControlCluster.ActiveEventsAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedDemandResponseLoadControlClusterActiveEventsAttributeCallback(),
+ readDemandResponseLoadControlActiveEventsCommandParams
+ );
+ result.put("readActiveEventsAttribute", readDemandResponseLoadControlActiveEventsAttributeInteractionInfo);
+ Map readDemandResponseLoadControlNumberOfEventsPerProgramCommandParams = new LinkedHashMap();
+ InteractionInfo readDemandResponseLoadControlNumberOfEventsPerProgramAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.DemandResponseLoadControlCluster) cluster).readNumberOfEventsPerProgramAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readDemandResponseLoadControlNumberOfEventsPerProgramCommandParams
+ );
+ result.put("readNumberOfEventsPerProgramAttribute", readDemandResponseLoadControlNumberOfEventsPerProgramAttributeInteractionInfo);
+ Map readDemandResponseLoadControlNumberOfTransistionsCommandParams = new LinkedHashMap();
+ InteractionInfo readDemandResponseLoadControlNumberOfTransistionsAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.DemandResponseLoadControlCluster) cluster).readNumberOfTransistionsAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readDemandResponseLoadControlNumberOfTransistionsCommandParams
+ );
+ result.put("readNumberOfTransistionsAttribute", readDemandResponseLoadControlNumberOfTransistionsAttributeInteractionInfo);
+ Map readDemandResponseLoadControlDefaultRandomStartCommandParams = new LinkedHashMap();
+ InteractionInfo readDemandResponseLoadControlDefaultRandomStartAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.DemandResponseLoadControlCluster) cluster).readDefaultRandomStartAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readDemandResponseLoadControlDefaultRandomStartCommandParams
+ );
+ result.put("readDefaultRandomStartAttribute", readDemandResponseLoadControlDefaultRandomStartAttributeInteractionInfo);
+ Map readDemandResponseLoadControlDefaultRandomDurationCommandParams = new LinkedHashMap();
+ InteractionInfo readDemandResponseLoadControlDefaultRandomDurationAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.DemandResponseLoadControlCluster) cluster).readDefaultRandomDurationAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readDemandResponseLoadControlDefaultRandomDurationCommandParams
+ );
+ result.put("readDefaultRandomDurationAttribute", readDemandResponseLoadControlDefaultRandomDurationAttributeInteractionInfo);
+ Map readDemandResponseLoadControlGeneratedCommandListCommandParams = new LinkedHashMap();
+ InteractionInfo readDemandResponseLoadControlGeneratedCommandListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.DemandResponseLoadControlCluster) cluster).readGeneratedCommandListAttribute(
+ (ChipClusters.DemandResponseLoadControlCluster.GeneratedCommandListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedDemandResponseLoadControlClusterGeneratedCommandListAttributeCallback(),
+ readDemandResponseLoadControlGeneratedCommandListCommandParams
+ );
+ result.put("readGeneratedCommandListAttribute", readDemandResponseLoadControlGeneratedCommandListAttributeInteractionInfo);
+ Map readDemandResponseLoadControlAcceptedCommandListCommandParams = new LinkedHashMap();
+ InteractionInfo readDemandResponseLoadControlAcceptedCommandListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.DemandResponseLoadControlCluster) cluster).readAcceptedCommandListAttribute(
+ (ChipClusters.DemandResponseLoadControlCluster.AcceptedCommandListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedDemandResponseLoadControlClusterAcceptedCommandListAttributeCallback(),
+ readDemandResponseLoadControlAcceptedCommandListCommandParams
+ );
+ result.put("readAcceptedCommandListAttribute", readDemandResponseLoadControlAcceptedCommandListAttributeInteractionInfo);
+ Map readDemandResponseLoadControlEventListCommandParams = new LinkedHashMap();
+ InteractionInfo readDemandResponseLoadControlEventListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.DemandResponseLoadControlCluster) cluster).readEventListAttribute(
+ (ChipClusters.DemandResponseLoadControlCluster.EventListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedDemandResponseLoadControlClusterEventListAttributeCallback(),
+ readDemandResponseLoadControlEventListCommandParams
+ );
+ result.put("readEventListAttribute", readDemandResponseLoadControlEventListAttributeInteractionInfo);
+ Map readDemandResponseLoadControlAttributeListCommandParams = new LinkedHashMap();
+ InteractionInfo readDemandResponseLoadControlAttributeListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.DemandResponseLoadControlCluster) cluster).readAttributeListAttribute(
+ (ChipClusters.DemandResponseLoadControlCluster.AttributeListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedDemandResponseLoadControlClusterAttributeListAttributeCallback(),
+ readDemandResponseLoadControlAttributeListCommandParams
+ );
+ result.put("readAttributeListAttribute", readDemandResponseLoadControlAttributeListAttributeInteractionInfo);
+ Map readDemandResponseLoadControlFeatureMapCommandParams = new LinkedHashMap();
+ InteractionInfo readDemandResponseLoadControlFeatureMapAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.DemandResponseLoadControlCluster) cluster).readFeatureMapAttribute(
+ (ChipClusters.LongAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
+ readDemandResponseLoadControlFeatureMapCommandParams
+ );
+ result.put("readFeatureMapAttribute", readDemandResponseLoadControlFeatureMapAttributeInteractionInfo);
+ Map readDemandResponseLoadControlClusterRevisionCommandParams = new LinkedHashMap();
+ InteractionInfo readDemandResponseLoadControlClusterRevisionAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.DemandResponseLoadControlCluster) cluster).readClusterRevisionAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readDemandResponseLoadControlClusterRevisionCommandParams
+ );
+ result.put("readClusterRevisionAttribute", readDemandResponseLoadControlClusterRevisionAttributeInteractionInfo);
+
+ return result;
+ }
private static Map readDoorLockInteractionInfo() {
Map result = new LinkedHashMap<>();Map readDoorLockLockStateCommandParams = new LinkedHashMap();
InteractionInfo readDoorLockLockStateAttributeInteractionInfo = new InteractionInfo(
@@ -17851,6 +18020,7 @@ public Map> getReadAttributeMap() {
put("rvcOperationalState", readRvcOperationalStateInteractionInfo());
put("hepaFilterMonitoring", readHepaFilterMonitoringInteractionInfo());
put("activatedCarbonFilterMonitoring", readActivatedCarbonFilterMonitoringInteractionInfo());
+ put("demandResponseLoadControl", readDemandResponseLoadControlInteractionInfo());
put("doorLock", readDoorLockInteractionInfo());
put("windowCovering", readWindowCoveringInteractionInfo());
put("barrierControl", readBarrierControlInteractionInfo());
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
index 03660cab51c6d0..2f14aa26764e42 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
@@ -1092,6 +1092,52 @@ public Map> getWriteAttributeMap() {
);
writeActivatedCarbonFilterMonitoringInteractionInfo.put("writeLastChangedTimeAttribute", writeActivatedCarbonFilterMonitoringLastChangedTimeAttributeInteractionInfo);
writeAttributeMap.put("activatedCarbonFilterMonitoring", writeActivatedCarbonFilterMonitoringInteractionInfo);
+ Map writeDemandResponseLoadControlInteractionInfo = new LinkedHashMap<>();
+ Map writeDemandResponseLoadControlDefaultRandomStartCommandParams = new LinkedHashMap();
+ CommandParameterInfo demandResponseLoadControldefaultRandomStartCommandParameterInfo =
+ new CommandParameterInfo(
+ "value",
+ Integer.class,
+ Integer.class
+ );
+ writeDemandResponseLoadControlDefaultRandomStartCommandParams.put(
+ "value",
+ demandResponseLoadControldefaultRandomStartCommandParameterInfo
+ );
+ InteractionInfo writeDemandResponseLoadControlDefaultRandomStartAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.DemandResponseLoadControlCluster) cluster).writeDefaultRandomStartAttribute(
+ (DefaultClusterCallback) callback,
+ (Integer) commandArguments.get("value")
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
+ writeDemandResponseLoadControlDefaultRandomStartCommandParams
+ );
+ writeDemandResponseLoadControlInteractionInfo.put("writeDefaultRandomStartAttribute", writeDemandResponseLoadControlDefaultRandomStartAttributeInteractionInfo);
+ Map writeDemandResponseLoadControlDefaultRandomDurationCommandParams = new LinkedHashMap();
+ CommandParameterInfo demandResponseLoadControldefaultRandomDurationCommandParameterInfo =
+ new CommandParameterInfo(
+ "value",
+ Integer.class,
+ Integer.class
+ );
+ writeDemandResponseLoadControlDefaultRandomDurationCommandParams.put(
+ "value",
+ demandResponseLoadControldefaultRandomDurationCommandParameterInfo
+ );
+ InteractionInfo writeDemandResponseLoadControlDefaultRandomDurationAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.DemandResponseLoadControlCluster) cluster).writeDefaultRandomDurationAttribute(
+ (DefaultClusterCallback) callback,
+ (Integer) commandArguments.get("value")
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
+ writeDemandResponseLoadControlDefaultRandomDurationCommandParams
+ );
+ writeDemandResponseLoadControlInteractionInfo.put("writeDefaultRandomDurationAttribute", writeDemandResponseLoadControlDefaultRandomDurationAttributeInteractionInfo);
+ writeAttributeMap.put("demandResponseLoadControl", writeDemandResponseLoadControlInteractionInfo);
Map writeDoorLockInteractionInfo = new LinkedHashMap<>();
Map writeDoorLockDoorOpenEventsCommandParams = new LinkedHashMap();
CommandParameterInfo doorLockdoorOpenEventsCommandParameterInfo =
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent.kt
new file mode 100644
index 00000000000000..a4ab48a89bc770
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent.kt
@@ -0,0 +1,244 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.eventstructs
+
+import chip.devicecontroller.cluster.*
+import java.util.Optional
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent(
+ val eventID: ByteArray,
+ val transitionIndex: UInt?,
+ val status: UInt,
+ val criticality: UInt,
+ val control: UInt,
+ val temperatureControl:
+ Optional<
+ chip.devicecontroller.cluster.structs.DemandResponseLoadControlClusterTemperatureControlStruct
+ >?,
+ val averageLoadControl:
+ Optional<
+ chip.devicecontroller.cluster.structs.DemandResponseLoadControlClusterAverageLoadControlStruct
+ >?,
+ val dutyCycleControl:
+ Optional<
+ chip.devicecontroller.cluster.structs.DemandResponseLoadControlClusterDutyCycleControlStruct
+ >?,
+ val powerSavingsControl:
+ Optional<
+ chip.devicecontroller.cluster.structs.DemandResponseLoadControlClusterPowerSavingsControlStruct
+ >?,
+ val heatingSourceControl:
+ Optional<
+ chip.devicecontroller.cluster.structs.DemandResponseLoadControlClusterHeatingSourceControlStruct
+ >?
+) {
+ override fun toString(): String = buildString {
+ append("DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent {\n")
+ append("\teventID : $eventID\n")
+ append("\ttransitionIndex : $transitionIndex\n")
+ append("\tstatus : $status\n")
+ append("\tcriticality : $criticality\n")
+ append("\tcontrol : $control\n")
+ append("\ttemperatureControl : $temperatureControl\n")
+ append("\taverageLoadControl : $averageLoadControl\n")
+ append("\tdutyCycleControl : $dutyCycleControl\n")
+ append("\tpowerSavingsControl : $powerSavingsControl\n")
+ append("\theatingSourceControl : $heatingSourceControl\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_EVENT_I_D), eventID)
+ if (transitionIndex != null) {
+ put(ContextSpecificTag(TAG_TRANSITION_INDEX), transitionIndex)
+ } else {
+ putNull(ContextSpecificTag(TAG_TRANSITION_INDEX))
+ }
+ put(ContextSpecificTag(TAG_STATUS), status)
+ put(ContextSpecificTag(TAG_CRITICALITY), criticality)
+ put(ContextSpecificTag(TAG_CONTROL), control)
+ if (temperatureControl != null) {
+ if (temperatureControl.isPresent) {
+ val opttemperatureControl = temperatureControl.get()
+ opttemperatureControl.toTlv(ContextSpecificTag(TAG_TEMPERATURE_CONTROL), this)
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_TEMPERATURE_CONTROL))
+ }
+ if (averageLoadControl != null) {
+ if (averageLoadControl.isPresent) {
+ val optaverageLoadControl = averageLoadControl.get()
+ optaverageLoadControl.toTlv(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL), this)
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL))
+ }
+ if (dutyCycleControl != null) {
+ if (dutyCycleControl.isPresent) {
+ val optdutyCycleControl = dutyCycleControl.get()
+ optdutyCycleControl.toTlv(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL), this)
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL))
+ }
+ if (powerSavingsControl != null) {
+ if (powerSavingsControl.isPresent) {
+ val optpowerSavingsControl = powerSavingsControl.get()
+ optpowerSavingsControl.toTlv(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL), this)
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL))
+ }
+ if (heatingSourceControl != null) {
+ if (heatingSourceControl.isPresent) {
+ val optheatingSourceControl = heatingSourceControl.get()
+ optheatingSourceControl.toTlv(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL), this)
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL))
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_EVENT_I_D = 0
+ private const val TAG_TRANSITION_INDEX = 1
+ private const val TAG_STATUS = 2
+ private const val TAG_CRITICALITY = 3
+ private const val TAG_CONTROL = 4
+ private const val TAG_TEMPERATURE_CONTROL = 5
+ private const val TAG_AVERAGE_LOAD_CONTROL = 6
+ private const val TAG_DUTY_CYCLE_CONTROL = 7
+ private const val TAG_POWER_SAVINGS_CONTROL = 8
+ private const val TAG_HEATING_SOURCE_CONTROL = 9
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader
+ ): DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent {
+ tlvReader.enterStructure(tlvTag)
+ val eventID = tlvReader.getByteArray(ContextSpecificTag(TAG_EVENT_I_D))
+ val transitionIndex =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUInt(ContextSpecificTag(TAG_TRANSITION_INDEX))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_TRANSITION_INDEX))
+ null
+ }
+ val status = tlvReader.getUInt(ContextSpecificTag(TAG_STATUS))
+ val criticality = tlvReader.getUInt(ContextSpecificTag(TAG_CRITICALITY))
+ val control = tlvReader.getUInt(ContextSpecificTag(TAG_CONTROL))
+ val temperatureControl =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_TEMPERATURE_CONTROL))) {
+ Optional.of(
+ chip.devicecontroller.cluster.structs
+ .DemandResponseLoadControlClusterTemperatureControlStruct
+ .fromTlv(ContextSpecificTag(TAG_TEMPERATURE_CONTROL), tlvReader)
+ )
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_TEMPERATURE_CONTROL))
+ null
+ }
+ val averageLoadControl =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL))) {
+ Optional.of(
+ chip.devicecontroller.cluster.structs
+ .DemandResponseLoadControlClusterAverageLoadControlStruct
+ .fromTlv(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL), tlvReader)
+ )
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL))
+ null
+ }
+ val dutyCycleControl =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL))) {
+ Optional.of(
+ chip.devicecontroller.cluster.structs
+ .DemandResponseLoadControlClusterDutyCycleControlStruct
+ .fromTlv(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL), tlvReader)
+ )
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL))
+ null
+ }
+ val powerSavingsControl =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL))) {
+ Optional.of(
+ chip.devicecontroller.cluster.structs
+ .DemandResponseLoadControlClusterPowerSavingsControlStruct
+ .fromTlv(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL), tlvReader)
+ )
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL))
+ null
+ }
+ val heatingSourceControl =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL))) {
+ Optional.of(
+ chip.devicecontroller.cluster.structs
+ .DemandResponseLoadControlClusterHeatingSourceControlStruct
+ .fromTlv(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL), tlvReader)
+ )
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL))
+ null
+ }
+
+ tlvReader.exitContainer()
+
+ return DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent(
+ eventID,
+ transitionIndex,
+ status,
+ criticality,
+ control,
+ temperatureControl,
+ averageLoadControl,
+ dutyCycleControl,
+ powerSavingsControl,
+ heatingSourceControl
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
index 85e9c85ce1e2cd..aaf9b5a5d48257 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
@@ -24,6 +24,14 @@ structs_sources = [
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterAverageLoadControlStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterDutyCycleControlStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterHeatingSourceControlStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlEventStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlEventTransitionStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlProgramStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterPowerSavingsControlStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterTemperatureControlStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt",
@@ -98,6 +106,7 @@ eventstructs_sources = [
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt",
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterAverageLoadControlStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterAverageLoadControlStruct.kt
new file mode 100644
index 00000000000000..a4dd7c659efb22
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterAverageLoadControlStruct.kt
@@ -0,0 +1,55 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class DemandResponseLoadControlClusterAverageLoadControlStruct(val loadAdjustment: Int) {
+ override fun toString(): String = buildString {
+ append("DemandResponseLoadControlClusterAverageLoadControlStruct {\n")
+ append("\tloadAdjustment : $loadAdjustment\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_LOAD_ADJUSTMENT), loadAdjustment)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_LOAD_ADJUSTMENT = 0
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader
+ ): DemandResponseLoadControlClusterAverageLoadControlStruct {
+ tlvReader.enterStructure(tlvTag)
+ val loadAdjustment = tlvReader.getInt(ContextSpecificTag(TAG_LOAD_ADJUSTMENT))
+
+ tlvReader.exitContainer()
+
+ return DemandResponseLoadControlClusterAverageLoadControlStruct(loadAdjustment)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterDutyCycleControlStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterDutyCycleControlStruct.kt
new file mode 100644
index 00000000000000..af1ad8026cc11b
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterDutyCycleControlStruct.kt
@@ -0,0 +1,55 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class DemandResponseLoadControlClusterDutyCycleControlStruct(val dutyCycle: UInt) {
+ override fun toString(): String = buildString {
+ append("DemandResponseLoadControlClusterDutyCycleControlStruct {\n")
+ append("\tdutyCycle : $dutyCycle\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_DUTY_CYCLE), dutyCycle)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_DUTY_CYCLE = 0
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader
+ ): DemandResponseLoadControlClusterDutyCycleControlStruct {
+ tlvReader.enterStructure(tlvTag)
+ val dutyCycle = tlvReader.getUInt(ContextSpecificTag(TAG_DUTY_CYCLE))
+
+ tlvReader.exitContainer()
+
+ return DemandResponseLoadControlClusterDutyCycleControlStruct(dutyCycle)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterHeatingSourceControlStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterHeatingSourceControlStruct.kt
new file mode 100644
index 00000000000000..049c061b9966e1
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterHeatingSourceControlStruct.kt
@@ -0,0 +1,55 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class DemandResponseLoadControlClusterHeatingSourceControlStruct(val heatingSource: UInt) {
+ override fun toString(): String = buildString {
+ append("DemandResponseLoadControlClusterHeatingSourceControlStruct {\n")
+ append("\theatingSource : $heatingSource\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_HEATING_SOURCE), heatingSource)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_HEATING_SOURCE = 0
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader
+ ): DemandResponseLoadControlClusterHeatingSourceControlStruct {
+ tlvReader.enterStructure(tlvTag)
+ val heatingSource = tlvReader.getUInt(ContextSpecificTag(TAG_HEATING_SOURCE))
+
+ tlvReader.exitContainer()
+
+ return DemandResponseLoadControlClusterHeatingSourceControlStruct(heatingSource)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlEventStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlEventStruct.kt
new file mode 100644
index 00000000000000..f714af6d7b8fbd
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlEventStruct.kt
@@ -0,0 +1,147 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import java.util.Optional
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class DemandResponseLoadControlClusterLoadControlEventStruct(
+ val eventID: ByteArray,
+ val programID: ByteArray?,
+ val control: UInt,
+ val deviceClass: ULong,
+ val enrollmentGroup: Optional,
+ val criticality: UInt,
+ val startTime: ULong?,
+ val transitions: List
+) {
+ override fun toString(): String = buildString {
+ append("DemandResponseLoadControlClusterLoadControlEventStruct {\n")
+ append("\teventID : $eventID\n")
+ append("\tprogramID : $programID\n")
+ append("\tcontrol : $control\n")
+ append("\tdeviceClass : $deviceClass\n")
+ append("\tenrollmentGroup : $enrollmentGroup\n")
+ append("\tcriticality : $criticality\n")
+ append("\tstartTime : $startTime\n")
+ append("\ttransitions : $transitions\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_EVENT_I_D), eventID)
+ if (programID != null) {
+ put(ContextSpecificTag(TAG_PROGRAM_I_D), programID)
+ } else {
+ putNull(ContextSpecificTag(TAG_PROGRAM_I_D))
+ }
+ put(ContextSpecificTag(TAG_CONTROL), control)
+ put(ContextSpecificTag(TAG_DEVICE_CLASS), deviceClass)
+ if (enrollmentGroup.isPresent) {
+ val optenrollmentGroup = enrollmentGroup.get()
+ put(ContextSpecificTag(TAG_ENROLLMENT_GROUP), optenrollmentGroup)
+ }
+ put(ContextSpecificTag(TAG_CRITICALITY), criticality)
+ if (startTime != null) {
+ put(ContextSpecificTag(TAG_START_TIME), startTime)
+ } else {
+ putNull(ContextSpecificTag(TAG_START_TIME))
+ }
+ startArray(ContextSpecificTag(TAG_TRANSITIONS))
+ for (item in transitions.iterator()) {
+ item.toTlv(AnonymousTag, this)
+ }
+ endArray()
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_EVENT_I_D = 0
+ private const val TAG_PROGRAM_I_D = 1
+ private const val TAG_CONTROL = 2
+ private const val TAG_DEVICE_CLASS = 3
+ private const val TAG_ENROLLMENT_GROUP = 4
+ private const val TAG_CRITICALITY = 5
+ private const val TAG_START_TIME = 6
+ private const val TAG_TRANSITIONS = 7
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader
+ ): DemandResponseLoadControlClusterLoadControlEventStruct {
+ tlvReader.enterStructure(tlvTag)
+ val eventID = tlvReader.getByteArray(ContextSpecificTag(TAG_EVENT_I_D))
+ val programID =
+ if (!tlvReader.isNull()) {
+ tlvReader.getByteArray(ContextSpecificTag(TAG_PROGRAM_I_D))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_PROGRAM_I_D))
+ null
+ }
+ val control = tlvReader.getUInt(ContextSpecificTag(TAG_CONTROL))
+ val deviceClass = tlvReader.getULong(ContextSpecificTag(TAG_DEVICE_CLASS))
+ val enrollmentGroup =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENROLLMENT_GROUP))) {
+ Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_ENROLLMENT_GROUP)))
+ } else {
+ Optional.empty()
+ }
+ val criticality = tlvReader.getUInt(ContextSpecificTag(TAG_CRITICALITY))
+ val startTime =
+ if (!tlvReader.isNull()) {
+ tlvReader.getULong(ContextSpecificTag(TAG_START_TIME))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_START_TIME))
+ null
+ }
+ val transitions =
+ buildList {
+ tlvReader.enterArray(ContextSpecificTag(TAG_TRANSITIONS))
+ while (!tlvReader.isEndOfContainer()) {
+ add(
+ DemandResponseLoadControlClusterLoadControlEventTransitionStruct.fromTlv(
+ AnonymousTag,
+ tlvReader
+ )
+ )
+ }
+ tlvReader.exitContainer()
+ }
+
+ tlvReader.exitContainer()
+
+ return DemandResponseLoadControlClusterLoadControlEventStruct(
+ eventID,
+ programID,
+ control,
+ deviceClass,
+ enrollmentGroup,
+ criticality,
+ startTime,
+ transitions
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlEventTransitionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlEventTransitionStruct.kt
new file mode 100644
index 00000000000000..6d44b1e020d180
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlEventTransitionStruct.kt
@@ -0,0 +1,161 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import java.util.Optional
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class DemandResponseLoadControlClusterLoadControlEventTransitionStruct(
+ val duration: UInt,
+ val control: UInt,
+ val temperatureControl: Optional,
+ val averageLoadControl: Optional,
+ val dutyCycleControl: Optional,
+ val powerSavingsControl: Optional,
+ val heatingSourceControl: Optional
+) {
+ override fun toString(): String = buildString {
+ append("DemandResponseLoadControlClusterLoadControlEventTransitionStruct {\n")
+ append("\tduration : $duration\n")
+ append("\tcontrol : $control\n")
+ append("\ttemperatureControl : $temperatureControl\n")
+ append("\taverageLoadControl : $averageLoadControl\n")
+ append("\tdutyCycleControl : $dutyCycleControl\n")
+ append("\tpowerSavingsControl : $powerSavingsControl\n")
+ append("\theatingSourceControl : $heatingSourceControl\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_DURATION), duration)
+ put(ContextSpecificTag(TAG_CONTROL), control)
+ if (temperatureControl.isPresent) {
+ val opttemperatureControl = temperatureControl.get()
+ opttemperatureControl.toTlv(ContextSpecificTag(TAG_TEMPERATURE_CONTROL), this)
+ }
+ if (averageLoadControl.isPresent) {
+ val optaverageLoadControl = averageLoadControl.get()
+ optaverageLoadControl.toTlv(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL), this)
+ }
+ if (dutyCycleControl.isPresent) {
+ val optdutyCycleControl = dutyCycleControl.get()
+ optdutyCycleControl.toTlv(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL), this)
+ }
+ if (powerSavingsControl.isPresent) {
+ val optpowerSavingsControl = powerSavingsControl.get()
+ optpowerSavingsControl.toTlv(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL), this)
+ }
+ if (heatingSourceControl.isPresent) {
+ val optheatingSourceControl = heatingSourceControl.get()
+ optheatingSourceControl.toTlv(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL), this)
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_DURATION = 0
+ private const val TAG_CONTROL = 1
+ private const val TAG_TEMPERATURE_CONTROL = 2
+ private const val TAG_AVERAGE_LOAD_CONTROL = 3
+ private const val TAG_DUTY_CYCLE_CONTROL = 4
+ private const val TAG_POWER_SAVINGS_CONTROL = 5
+ private const val TAG_HEATING_SOURCE_CONTROL = 6
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader
+ ): DemandResponseLoadControlClusterLoadControlEventTransitionStruct {
+ tlvReader.enterStructure(tlvTag)
+ val duration = tlvReader.getUInt(ContextSpecificTag(TAG_DURATION))
+ val control = tlvReader.getUInt(ContextSpecificTag(TAG_CONTROL))
+ val temperatureControl =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_TEMPERATURE_CONTROL))) {
+ Optional.of(
+ DemandResponseLoadControlClusterTemperatureControlStruct.fromTlv(
+ ContextSpecificTag(TAG_TEMPERATURE_CONTROL),
+ tlvReader
+ )
+ )
+ } else {
+ Optional.empty()
+ }
+ val averageLoadControl =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL))) {
+ Optional.of(
+ DemandResponseLoadControlClusterAverageLoadControlStruct.fromTlv(
+ ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL),
+ tlvReader
+ )
+ )
+ } else {
+ Optional.empty()
+ }
+ val dutyCycleControl =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL))) {
+ Optional.of(
+ DemandResponseLoadControlClusterDutyCycleControlStruct.fromTlv(
+ ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL),
+ tlvReader
+ )
+ )
+ } else {
+ Optional.empty()
+ }
+ val powerSavingsControl =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL))) {
+ Optional.of(
+ DemandResponseLoadControlClusterPowerSavingsControlStruct.fromTlv(
+ ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL),
+ tlvReader
+ )
+ )
+ } else {
+ Optional.empty()
+ }
+ val heatingSourceControl =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL))) {
+ Optional.of(
+ DemandResponseLoadControlClusterHeatingSourceControlStruct.fromTlv(
+ ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL),
+ tlvReader
+ )
+ )
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return DemandResponseLoadControlClusterLoadControlEventTransitionStruct(
+ duration,
+ control,
+ temperatureControl,
+ averageLoadControl,
+ dutyCycleControl,
+ powerSavingsControl,
+ heatingSourceControl
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlProgramStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlProgramStruct.kt
new file mode 100644
index 00000000000000..289e4b0a1dbebf
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlProgramStruct.kt
@@ -0,0 +1,113 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class DemandResponseLoadControlClusterLoadControlProgramStruct(
+ val programID: ByteArray,
+ val name: String,
+ val enrollmentGroup: UInt?,
+ val randomStartMinutes: UInt?,
+ val randomDurationMinutes: UInt?
+) {
+ override fun toString(): String = buildString {
+ append("DemandResponseLoadControlClusterLoadControlProgramStruct {\n")
+ append("\tprogramID : $programID\n")
+ append("\tname : $name\n")
+ append("\tenrollmentGroup : $enrollmentGroup\n")
+ append("\trandomStartMinutes : $randomStartMinutes\n")
+ append("\trandomDurationMinutes : $randomDurationMinutes\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_PROGRAM_I_D), programID)
+ put(ContextSpecificTag(TAG_NAME), name)
+ if (enrollmentGroup != null) {
+ put(ContextSpecificTag(TAG_ENROLLMENT_GROUP), enrollmentGroup)
+ } else {
+ putNull(ContextSpecificTag(TAG_ENROLLMENT_GROUP))
+ }
+ if (randomStartMinutes != null) {
+ put(ContextSpecificTag(TAG_RANDOM_START_MINUTES), randomStartMinutes)
+ } else {
+ putNull(ContextSpecificTag(TAG_RANDOM_START_MINUTES))
+ }
+ if (randomDurationMinutes != null) {
+ put(ContextSpecificTag(TAG_RANDOM_DURATION_MINUTES), randomDurationMinutes)
+ } else {
+ putNull(ContextSpecificTag(TAG_RANDOM_DURATION_MINUTES))
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_PROGRAM_I_D = 0
+ private const val TAG_NAME = 1
+ private const val TAG_ENROLLMENT_GROUP = 2
+ private const val TAG_RANDOM_START_MINUTES = 3
+ private const val TAG_RANDOM_DURATION_MINUTES = 4
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader
+ ): DemandResponseLoadControlClusterLoadControlProgramStruct {
+ tlvReader.enterStructure(tlvTag)
+ val programID = tlvReader.getByteArray(ContextSpecificTag(TAG_PROGRAM_I_D))
+ val name = tlvReader.getString(ContextSpecificTag(TAG_NAME))
+ val enrollmentGroup =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUInt(ContextSpecificTag(TAG_ENROLLMENT_GROUP))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_ENROLLMENT_GROUP))
+ null
+ }
+ val randomStartMinutes =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUInt(ContextSpecificTag(TAG_RANDOM_START_MINUTES))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_RANDOM_START_MINUTES))
+ null
+ }
+ val randomDurationMinutes =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUInt(ContextSpecificTag(TAG_RANDOM_DURATION_MINUTES))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_RANDOM_DURATION_MINUTES))
+ null
+ }
+
+ tlvReader.exitContainer()
+
+ return DemandResponseLoadControlClusterLoadControlProgramStruct(
+ programID,
+ name,
+ enrollmentGroup,
+ randomStartMinutes,
+ randomDurationMinutes
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterPowerSavingsControlStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterPowerSavingsControlStruct.kt
new file mode 100644
index 00000000000000..30ed601d4ac156
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterPowerSavingsControlStruct.kt
@@ -0,0 +1,55 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class DemandResponseLoadControlClusterPowerSavingsControlStruct(val powerSavings: UInt) {
+ override fun toString(): String = buildString {
+ append("DemandResponseLoadControlClusterPowerSavingsControlStruct {\n")
+ append("\tpowerSavings : $powerSavings\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_POWER_SAVINGS), powerSavings)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_POWER_SAVINGS = 0
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader
+ ): DemandResponseLoadControlClusterPowerSavingsControlStruct {
+ tlvReader.enterStructure(tlvTag)
+ val powerSavings = tlvReader.getUInt(ContextSpecificTag(TAG_POWER_SAVINGS))
+
+ tlvReader.exitContainer()
+
+ return DemandResponseLoadControlClusterPowerSavingsControlStruct(powerSavings)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterScopedLoadControlEventStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterScopedLoadControlEventStruct.kt
new file mode 100644
index 00000000000000..6a02cd2f755090
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterScopedLoadControlEventStruct.kt
@@ -0,0 +1,144 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class DemandResponseLoadControlClusterScopedLoadControlEventStruct(
+ val eventID: ByteArray,
+ val programControl: ByteArray,
+ val control: UInt,
+ val deviceClass: ULong,
+ val enrollmentGroup: UInt?,
+ val criticality: UInt,
+ val startTime: ULong?,
+ val transitions: List,
+ val fabricIndex: UInt
+) {
+ override fun toString(): String = buildString {
+ append("DemandResponseLoadControlClusterScopedLoadControlEventStruct {\n")
+ append("\teventID : $eventID\n")
+ append("\tprogramControl : $programControl\n")
+ append("\tcontrol : $control\n")
+ append("\tdeviceClass : $deviceClass\n")
+ append("\tenrollmentGroup : $enrollmentGroup\n")
+ append("\tcriticality : $criticality\n")
+ append("\tstartTime : $startTime\n")
+ append("\ttransitions : $transitions\n")
+ append("\tfabricIndex : $fabricIndex\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_EVENT_I_D), eventID)
+ put(ContextSpecificTag(TAG_PROGRAM_CONTROL), programControl)
+ put(ContextSpecificTag(TAG_CONTROL), control)
+ put(ContextSpecificTag(TAG_DEVICE_CLASS), deviceClass)
+ if (enrollmentGroup != null) {
+ put(ContextSpecificTag(TAG_ENROLLMENT_GROUP), enrollmentGroup)
+ } else {
+ putNull(ContextSpecificTag(TAG_ENROLLMENT_GROUP))
+ }
+ put(ContextSpecificTag(TAG_CRITICALITY), criticality)
+ if (startTime != null) {
+ put(ContextSpecificTag(TAG_START_TIME), startTime)
+ } else {
+ putNull(ContextSpecificTag(TAG_START_TIME))
+ }
+ startArray(ContextSpecificTag(TAG_TRANSITIONS))
+ for (item in transitions.iterator()) {
+ item.toTlv(AnonymousTag, this)
+ }
+ endArray()
+ put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_EVENT_I_D = 0
+ private const val TAG_PROGRAM_CONTROL = 1
+ private const val TAG_CONTROL = 2
+ private const val TAG_DEVICE_CLASS = 3
+ private const val TAG_ENROLLMENT_GROUP = 4
+ private const val TAG_CRITICALITY = 5
+ private const val TAG_START_TIME = 6
+ private const val TAG_TRANSITIONS = 7
+ private const val TAG_FABRIC_INDEX = 254
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader
+ ): DemandResponseLoadControlClusterScopedLoadControlEventStruct {
+ tlvReader.enterStructure(tlvTag)
+ val eventID = tlvReader.getByteArray(ContextSpecificTag(TAG_EVENT_I_D))
+ val programControl = tlvReader.getByteArray(ContextSpecificTag(TAG_PROGRAM_CONTROL))
+ val control = tlvReader.getUInt(ContextSpecificTag(TAG_CONTROL))
+ val deviceClass = tlvReader.getULong(ContextSpecificTag(TAG_DEVICE_CLASS))
+ val enrollmentGroup =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUInt(ContextSpecificTag(TAG_ENROLLMENT_GROUP))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_ENROLLMENT_GROUP))
+ null
+ }
+ val criticality = tlvReader.getUInt(ContextSpecificTag(TAG_CRITICALITY))
+ val startTime =
+ if (!tlvReader.isNull()) {
+ tlvReader.getULong(ContextSpecificTag(TAG_START_TIME))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_START_TIME))
+ null
+ }
+ val transitions =
+ buildList {
+ tlvReader.enterArray(ContextSpecificTag(TAG_TRANSITIONS))
+ while (!tlvReader.isEndOfContainer()) {
+ add(
+ DemandResponseLoadControlClusterLoadControlEventTransitionStruct.fromTlv(
+ AnonymousTag,
+ tlvReader
+ )
+ )
+ }
+ tlvReader.exitContainer()
+ }
+ val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX))
+
+ tlvReader.exitContainer()
+
+ return DemandResponseLoadControlClusterScopedLoadControlEventStruct(
+ eventID,
+ programControl,
+ control,
+ deviceClass,
+ enrollmentGroup,
+ criticality,
+ startTime,
+ transitions,
+ fabricIndex
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterTemperatureControlStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterTemperatureControlStruct.kt
new file mode 100644
index 00000000000000..925c1db888410a
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterTemperatureControlStruct.kt
@@ -0,0 +1,146 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import java.util.Optional
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class DemandResponseLoadControlClusterTemperatureControlStruct(
+ val coolingTempOffset: Optional?,
+ val heatingtTempOffset: Optional?,
+ val coolingTempSetpoint: Optional?,
+ val heatingTempSetpoint: Optional?
+) {
+ override fun toString(): String = buildString {
+ append("DemandResponseLoadControlClusterTemperatureControlStruct {\n")
+ append("\tcoolingTempOffset : $coolingTempOffset\n")
+ append("\theatingtTempOffset : $heatingtTempOffset\n")
+ append("\tcoolingTempSetpoint : $coolingTempSetpoint\n")
+ append("\theatingTempSetpoint : $heatingTempSetpoint\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ if (coolingTempOffset != null) {
+ if (coolingTempOffset.isPresent) {
+ val optcoolingTempOffset = coolingTempOffset.get()
+ put(ContextSpecificTag(TAG_COOLING_TEMP_OFFSET), optcoolingTempOffset)
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_COOLING_TEMP_OFFSET))
+ }
+ if (heatingtTempOffset != null) {
+ if (heatingtTempOffset.isPresent) {
+ val optheatingtTempOffset = heatingtTempOffset.get()
+ put(ContextSpecificTag(TAG_HEATINGT_TEMP_OFFSET), optheatingtTempOffset)
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_HEATINGT_TEMP_OFFSET))
+ }
+ if (coolingTempSetpoint != null) {
+ if (coolingTempSetpoint.isPresent) {
+ val optcoolingTempSetpoint = coolingTempSetpoint.get()
+ put(ContextSpecificTag(TAG_COOLING_TEMP_SETPOINT), optcoolingTempSetpoint)
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_COOLING_TEMP_SETPOINT))
+ }
+ if (heatingTempSetpoint != null) {
+ if (heatingTempSetpoint.isPresent) {
+ val optheatingTempSetpoint = heatingTempSetpoint.get()
+ put(ContextSpecificTag(TAG_HEATING_TEMP_SETPOINT), optheatingTempSetpoint)
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_HEATING_TEMP_SETPOINT))
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_COOLING_TEMP_OFFSET = 0
+ private const val TAG_HEATINGT_TEMP_OFFSET = 1
+ private const val TAG_COOLING_TEMP_SETPOINT = 2
+ private const val TAG_HEATING_TEMP_SETPOINT = 3
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader
+ ): DemandResponseLoadControlClusterTemperatureControlStruct {
+ tlvReader.enterStructure(tlvTag)
+ val coolingTempOffset =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_COOLING_TEMP_OFFSET))) {
+ Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_COOLING_TEMP_OFFSET)))
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_COOLING_TEMP_OFFSET))
+ null
+ }
+ val heatingtTempOffset =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_HEATINGT_TEMP_OFFSET))) {
+ Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_HEATINGT_TEMP_OFFSET)))
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_HEATINGT_TEMP_OFFSET))
+ null
+ }
+ val coolingTempSetpoint =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_COOLING_TEMP_SETPOINT))) {
+ Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_COOLING_TEMP_SETPOINT)))
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_COOLING_TEMP_SETPOINT))
+ null
+ }
+ val heatingTempSetpoint =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_HEATING_TEMP_SETPOINT))) {
+ Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_HEATING_TEMP_SETPOINT)))
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_HEATING_TEMP_SETPOINT))
+ null
+ }
+
+ tlvReader.exitContainer()
+
+ return DemandResponseLoadControlClusterTemperatureControlStruct(
+ coolingTempOffset,
+ heatingtTempOffset,
+ coolingTempSetpoint,
+ heatingTempSetpoint
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DemandResponseLoadControlCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DemandResponseLoadControlCluster.kt
new file mode 100644
index 00000000000000..f2e3ce480e1eb4
--- /dev/null
+++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DemandResponseLoadControlCluster.kt
@@ -0,0 +1,268 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package matter.devicecontroller.cluster.clusters
+
+import matter.controller.MatterController
+import matter.devicecontroller.cluster.structs.*
+
+class DemandResponseLoadControlCluster(
+ private val controller: MatterController,
+ private val endpointId: UShort
+) {
+ class LoadControlProgramsAttribute(
+ val value: List
+ )
+
+ class EventsAttribute(val value: List)
+
+ class ActiveEventsAttribute(
+ val value: List
+ )
+
+ class GeneratedCommandListAttribute(val value: List)
+
+ class AcceptedCommandListAttribute(val value: List)
+
+ class EventListAttribute(val value: List)
+
+ class AttributeListAttribute(val value: List)
+
+ suspend fun registerLoadControlProgramRequest(
+ loadControlProgram: DemandResponseLoadControlClusterLoadControlProgramStruct,
+ timedInvokeTimeoutMs: Int? = null
+ ) {
+ val commandId = 0L
+
+ if (timedInvokeTimeoutMs != null) {
+ // Do the action with timedInvokeTimeoutMs
+ } else {
+ // Do the action without timedInvokeTimeoutMs
+ }
+ }
+
+ suspend fun unregisterLoadControlProgramRequest(
+ loadControlProgramID: ByteArray,
+ timedInvokeTimeoutMs: Int? = null
+ ) {
+ val commandId = 1L
+
+ if (timedInvokeTimeoutMs != null) {
+ // Do the action with timedInvokeTimeoutMs
+ } else {
+ // Do the action without timedInvokeTimeoutMs
+ }
+ }
+
+ suspend fun addLoadControlEventRequest(
+ event: DemandResponseLoadControlClusterLoadControlEventStruct,
+ timedInvokeTimeoutMs: Int? = null
+ ) {
+ val commandId = 2L
+
+ if (timedInvokeTimeoutMs != null) {
+ // Do the action with timedInvokeTimeoutMs
+ } else {
+ // Do the action without timedInvokeTimeoutMs
+ }
+ }
+
+ suspend fun removeLoadControlEventRequest(
+ eventID: ByteArray,
+ cancelControl: UInt,
+ timedInvokeTimeoutMs: Int? = null
+ ) {
+ val commandId = 3L
+
+ if (timedInvokeTimeoutMs != null) {
+ // Do the action with timedInvokeTimeoutMs
+ } else {
+ // Do the action without timedInvokeTimeoutMs
+ }
+ }
+
+ suspend fun clearLoadControlEventsRequest(timedInvokeTimeoutMs: Int? = null) {
+ val commandId = 4L
+
+ if (timedInvokeTimeoutMs != null) {
+ // Do the action with timedInvokeTimeoutMs
+ } else {
+ // Do the action without timedInvokeTimeoutMs
+ }
+ }
+
+ suspend fun readDeviceClassAttribute(): UInt {
+ // Implementation needs to be added here
+ }
+
+ suspend fun subscribeDeviceClassAttribute(minInterval: Int, maxInterval: Int): UInt {
+ // Implementation needs to be added here
+ }
+
+ suspend fun readLoadControlProgramsAttribute(): LoadControlProgramsAttribute {
+ // Implementation needs to be added here
+ }
+
+ suspend fun subscribeLoadControlProgramsAttribute(
+ minInterval: Int,
+ maxInterval: Int
+ ): LoadControlProgramsAttribute {
+ // Implementation needs to be added here
+ }
+
+ suspend fun readNumberOfLoadControlProgramsAttribute(): UByte {
+ // Implementation needs to be added here
+ }
+
+ suspend fun subscribeNumberOfLoadControlProgramsAttribute(
+ minInterval: Int,
+ maxInterval: Int
+ ): UByte {
+ // Implementation needs to be added here
+ }
+
+ suspend fun readEventsAttribute(): EventsAttribute {
+ // Implementation needs to be added here
+ }
+
+ suspend fun subscribeEventsAttribute(minInterval: Int, maxInterval: Int): EventsAttribute {
+ // Implementation needs to be added here
+ }
+
+ suspend fun readActiveEventsAttribute(): ActiveEventsAttribute {
+ // Implementation needs to be added here
+ }
+
+ suspend fun subscribeActiveEventsAttribute(
+ minInterval: Int,
+ maxInterval: Int
+ ): ActiveEventsAttribute {
+ // Implementation needs to be added here
+ }
+
+ suspend fun readNumberOfEventsPerProgramAttribute(): UByte {
+ // Implementation needs to be added here
+ }
+
+ suspend fun subscribeNumberOfEventsPerProgramAttribute(
+ minInterval: Int,
+ maxInterval: Int
+ ): UByte {
+ // Implementation needs to be added here
+ }
+
+ suspend fun readNumberOfTransistionsAttribute(): UByte {
+ // Implementation needs to be added here
+ }
+
+ suspend fun subscribeNumberOfTransistionsAttribute(minInterval: Int, maxInterval: Int): UByte {
+ // Implementation needs to be added here
+ }
+
+ suspend fun readDefaultRandomStartAttribute(): UByte {
+ // Implementation needs to be added here
+ }
+
+ suspend fun writeDefaultRandomStartAttribute(value: UByte, timedWriteTimeoutMs: Int? = null) {
+ if (timedWriteTimeoutMs != null) {
+ // Do the action with timedWriteTimeoutMs
+ } else {
+ // Do the action without timedWriteTimeoutMs
+ }
+ }
+
+ suspend fun subscribeDefaultRandomStartAttribute(minInterval: Int, maxInterval: Int): UByte {
+ // Implementation needs to be added here
+ }
+
+ suspend fun readDefaultRandomDurationAttribute(): UByte {
+ // Implementation needs to be added here
+ }
+
+ suspend fun writeDefaultRandomDurationAttribute(value: UByte, timedWriteTimeoutMs: Int? = null) {
+ if (timedWriteTimeoutMs != null) {
+ // Do the action with timedWriteTimeoutMs
+ } else {
+ // Do the action without timedWriteTimeoutMs
+ }
+ }
+
+ suspend fun subscribeDefaultRandomDurationAttribute(minInterval: Int, maxInterval: Int): UByte {
+ // Implementation needs to be added here
+ }
+
+ suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute {
+ // Implementation needs to be added here
+ }
+
+ suspend fun subscribeGeneratedCommandListAttribute(
+ minInterval: Int,
+ maxInterval: Int
+ ): GeneratedCommandListAttribute {
+ // Implementation needs to be added here
+ }
+
+ suspend fun readAcceptedCommandListAttribute(): AcceptedCommandListAttribute {
+ // Implementation needs to be added here
+ }
+
+ suspend fun subscribeAcceptedCommandListAttribute(
+ minInterval: Int,
+ maxInterval: Int
+ ): AcceptedCommandListAttribute {
+ // Implementation needs to be added here
+ }
+
+ suspend fun readEventListAttribute(): EventListAttribute {
+ // Implementation needs to be added here
+ }
+
+ suspend fun subscribeEventListAttribute(minInterval: Int, maxInterval: Int): EventListAttribute {
+ // Implementation needs to be added here
+ }
+
+ suspend fun readAttributeListAttribute(): AttributeListAttribute {
+ // Implementation needs to be added here
+ }
+
+ suspend fun subscribeAttributeListAttribute(
+ minInterval: Int,
+ maxInterval: Int
+ ): AttributeListAttribute {
+ // Implementation needs to be added here
+ }
+
+ suspend fun readFeatureMapAttribute(): UInt {
+ // Implementation needs to be added here
+ }
+
+ suspend fun subscribeFeatureMapAttribute(minInterval: Int, maxInterval: Int): UInt {
+ // Implementation needs to be added here
+ }
+
+ suspend fun readClusterRevisionAttribute(): UShort {
+ // Implementation needs to be added here
+ }
+
+ suspend fun subscribeClusterRevisionAttribute(minInterval: Int, maxInterval: Int): UShort {
+ // Implementation needs to be added here
+ }
+
+ companion object {
+ const val CLUSTER_ID: UInt = 150u
+ }
+}
diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent.kt
new file mode 100644
index 00000000000000..92b680ff01eb05
--- /dev/null
+++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent.kt
@@ -0,0 +1,244 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.devicecontroller.cluster.eventstructs
+
+import java.util.Optional
+import matter.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent(
+ val eventID: ByteArray,
+ val transitionIndex: UByte?,
+ val status: UInt,
+ val criticality: UInt,
+ val control: UInt,
+ val temperatureControl:
+ Optional<
+ matter.devicecontroller.cluster.structs.DemandResponseLoadControlClusterTemperatureControlStruct
+ >?,
+ val averageLoadControl:
+ Optional<
+ matter.devicecontroller.cluster.structs.DemandResponseLoadControlClusterAverageLoadControlStruct
+ >?,
+ val dutyCycleControl:
+ Optional<
+ matter.devicecontroller.cluster.structs.DemandResponseLoadControlClusterDutyCycleControlStruct
+ >?,
+ val powerSavingsControl:
+ Optional<
+ matter.devicecontroller.cluster.structs.DemandResponseLoadControlClusterPowerSavingsControlStruct
+ >?,
+ val heatingSourceControl:
+ Optional<
+ matter.devicecontroller.cluster.structs.DemandResponseLoadControlClusterHeatingSourceControlStruct
+ >?
+) {
+ override fun toString(): String = buildString {
+ append("DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent {\n")
+ append("\teventID : $eventID\n")
+ append("\ttransitionIndex : $transitionIndex\n")
+ append("\tstatus : $status\n")
+ append("\tcriticality : $criticality\n")
+ append("\tcontrol : $control\n")
+ append("\ttemperatureControl : $temperatureControl\n")
+ append("\taverageLoadControl : $averageLoadControl\n")
+ append("\tdutyCycleControl : $dutyCycleControl\n")
+ append("\tpowerSavingsControl : $powerSavingsControl\n")
+ append("\theatingSourceControl : $heatingSourceControl\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_EVENT_I_D), eventID)
+ if (transitionIndex != null) {
+ put(ContextSpecificTag(TAG_TRANSITION_INDEX), transitionIndex)
+ } else {
+ putNull(ContextSpecificTag(TAG_TRANSITION_INDEX))
+ }
+ put(ContextSpecificTag(TAG_STATUS), status)
+ put(ContextSpecificTag(TAG_CRITICALITY), criticality)
+ put(ContextSpecificTag(TAG_CONTROL), control)
+ if (temperatureControl != null) {
+ if (temperatureControl.isPresent) {
+ val opttemperatureControl = temperatureControl.get()
+ opttemperatureControl.toTlv(ContextSpecificTag(TAG_TEMPERATURE_CONTROL), this)
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_TEMPERATURE_CONTROL))
+ }
+ if (averageLoadControl != null) {
+ if (averageLoadControl.isPresent) {
+ val optaverageLoadControl = averageLoadControl.get()
+ optaverageLoadControl.toTlv(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL), this)
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL))
+ }
+ if (dutyCycleControl != null) {
+ if (dutyCycleControl.isPresent) {
+ val optdutyCycleControl = dutyCycleControl.get()
+ optdutyCycleControl.toTlv(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL), this)
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL))
+ }
+ if (powerSavingsControl != null) {
+ if (powerSavingsControl.isPresent) {
+ val optpowerSavingsControl = powerSavingsControl.get()
+ optpowerSavingsControl.toTlv(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL), this)
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL))
+ }
+ if (heatingSourceControl != null) {
+ if (heatingSourceControl.isPresent) {
+ val optheatingSourceControl = heatingSourceControl.get()
+ optheatingSourceControl.toTlv(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL), this)
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL))
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_EVENT_I_D = 0
+ private const val TAG_TRANSITION_INDEX = 1
+ private const val TAG_STATUS = 2
+ private const val TAG_CRITICALITY = 3
+ private const val TAG_CONTROL = 4
+ private const val TAG_TEMPERATURE_CONTROL = 5
+ private const val TAG_AVERAGE_LOAD_CONTROL = 6
+ private const val TAG_DUTY_CYCLE_CONTROL = 7
+ private const val TAG_POWER_SAVINGS_CONTROL = 8
+ private const val TAG_HEATING_SOURCE_CONTROL = 9
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader
+ ): DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent {
+ tlvReader.enterStructure(tlvTag)
+ val eventID = tlvReader.getByteArray(ContextSpecificTag(TAG_EVENT_I_D))
+ val transitionIndex =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUByte(ContextSpecificTag(TAG_TRANSITION_INDEX))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_TRANSITION_INDEX))
+ null
+ }
+ val status = tlvReader.getUInt(ContextSpecificTag(TAG_STATUS))
+ val criticality = tlvReader.getUInt(ContextSpecificTag(TAG_CRITICALITY))
+ val control = tlvReader.getUInt(ContextSpecificTag(TAG_CONTROL))
+ val temperatureControl =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_TEMPERATURE_CONTROL))) {
+ Optional.of(
+ matter.devicecontroller.cluster.structs
+ .DemandResponseLoadControlClusterTemperatureControlStruct
+ .fromTlv(ContextSpecificTag(TAG_TEMPERATURE_CONTROL), tlvReader)
+ )
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_TEMPERATURE_CONTROL))
+ null
+ }
+ val averageLoadControl =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL))) {
+ Optional.of(
+ matter.devicecontroller.cluster.structs
+ .DemandResponseLoadControlClusterAverageLoadControlStruct
+ .fromTlv(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL), tlvReader)
+ )
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL))
+ null
+ }
+ val dutyCycleControl =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL))) {
+ Optional.of(
+ matter.devicecontroller.cluster.structs
+ .DemandResponseLoadControlClusterDutyCycleControlStruct
+ .fromTlv(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL), tlvReader)
+ )
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL))
+ null
+ }
+ val powerSavingsControl =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL))) {
+ Optional.of(
+ matter.devicecontroller.cluster.structs
+ .DemandResponseLoadControlClusterPowerSavingsControlStruct
+ .fromTlv(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL), tlvReader)
+ )
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL))
+ null
+ }
+ val heatingSourceControl =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL))) {
+ Optional.of(
+ matter.devicecontroller.cluster.structs
+ .DemandResponseLoadControlClusterHeatingSourceControlStruct
+ .fromTlv(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL), tlvReader)
+ )
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL))
+ null
+ }
+
+ tlvReader.exitContainer()
+
+ return DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent(
+ eventID,
+ transitionIndex,
+ status,
+ criticality,
+ control,
+ temperatureControl,
+ averageLoadControl,
+ dutyCycleControl,
+ powerSavingsControl,
+ heatingSourceControl
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni
index 963f883c7c9649..54dbdd6875c852 100644
--- a/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni
+++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni
@@ -24,6 +24,14 @@ matter_structs_sources = [
"${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterAverageLoadControlStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterDutyCycleControlStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterHeatingSourceControlStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlEventStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlEventTransitionStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlProgramStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterPowerSavingsControlStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterTemperatureControlStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt",
@@ -98,6 +106,7 @@ matter_eventstructs_sources = [
"${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt",
"${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt",
"${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent.kt",
"${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt",
"${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt",
"${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt",
@@ -165,6 +174,7 @@ matter_clusters_sources = [
"${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ChannelCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ColorControlCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ContentLauncherCluster.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DemandResponseLoadControlCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DescriptorCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DiagnosticLogsCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DishwasherAlarmCluster.kt",
diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterAverageLoadControlStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterAverageLoadControlStruct.kt
new file mode 100644
index 00000000000000..1e4fd9f18cfe1d
--- /dev/null
+++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterAverageLoadControlStruct.kt
@@ -0,0 +1,55 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.devicecontroller.cluster.structs
+
+import matter.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class DemandResponseLoadControlClusterAverageLoadControlStruct(val loadAdjustment: Byte) {
+ override fun toString(): String = buildString {
+ append("DemandResponseLoadControlClusterAverageLoadControlStruct {\n")
+ append("\tloadAdjustment : $loadAdjustment\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_LOAD_ADJUSTMENT), loadAdjustment)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_LOAD_ADJUSTMENT = 0
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader
+ ): DemandResponseLoadControlClusterAverageLoadControlStruct {
+ tlvReader.enterStructure(tlvTag)
+ val loadAdjustment = tlvReader.getByte(ContextSpecificTag(TAG_LOAD_ADJUSTMENT))
+
+ tlvReader.exitContainer()
+
+ return DemandResponseLoadControlClusterAverageLoadControlStruct(loadAdjustment)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterDutyCycleControlStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterDutyCycleControlStruct.kt
new file mode 100644
index 00000000000000..1e23b648c727a9
--- /dev/null
+++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterDutyCycleControlStruct.kt
@@ -0,0 +1,55 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.devicecontroller.cluster.structs
+
+import matter.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class DemandResponseLoadControlClusterDutyCycleControlStruct(val dutyCycle: UByte) {
+ override fun toString(): String = buildString {
+ append("DemandResponseLoadControlClusterDutyCycleControlStruct {\n")
+ append("\tdutyCycle : $dutyCycle\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_DUTY_CYCLE), dutyCycle)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_DUTY_CYCLE = 0
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader
+ ): DemandResponseLoadControlClusterDutyCycleControlStruct {
+ tlvReader.enterStructure(tlvTag)
+ val dutyCycle = tlvReader.getUByte(ContextSpecificTag(TAG_DUTY_CYCLE))
+
+ tlvReader.exitContainer()
+
+ return DemandResponseLoadControlClusterDutyCycleControlStruct(dutyCycle)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterHeatingSourceControlStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterHeatingSourceControlStruct.kt
new file mode 100644
index 00000000000000..0be25f2696b61c
--- /dev/null
+++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterHeatingSourceControlStruct.kt
@@ -0,0 +1,55 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.devicecontroller.cluster.structs
+
+import matter.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class DemandResponseLoadControlClusterHeatingSourceControlStruct(val heatingSource: UInt) {
+ override fun toString(): String = buildString {
+ append("DemandResponseLoadControlClusterHeatingSourceControlStruct {\n")
+ append("\theatingSource : $heatingSource\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_HEATING_SOURCE), heatingSource)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_HEATING_SOURCE = 0
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader
+ ): DemandResponseLoadControlClusterHeatingSourceControlStruct {
+ tlvReader.enterStructure(tlvTag)
+ val heatingSource = tlvReader.getUInt(ContextSpecificTag(TAG_HEATING_SOURCE))
+
+ tlvReader.exitContainer()
+
+ return DemandResponseLoadControlClusterHeatingSourceControlStruct(heatingSource)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlEventStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlEventStruct.kt
new file mode 100644
index 00000000000000..fff221a680f729
--- /dev/null
+++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlEventStruct.kt
@@ -0,0 +1,147 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.devicecontroller.cluster.structs
+
+import java.util.Optional
+import matter.devicecontroller.cluster.*
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class DemandResponseLoadControlClusterLoadControlEventStruct(
+ val eventID: ByteArray,
+ val programID: ByteArray?,
+ val control: UInt,
+ val deviceClass: ULong,
+ val enrollmentGroup: Optional,
+ val criticality: UInt,
+ val startTime: UInt?,
+ val transitions: List
+) {
+ override fun toString(): String = buildString {
+ append("DemandResponseLoadControlClusterLoadControlEventStruct {\n")
+ append("\teventID : $eventID\n")
+ append("\tprogramID : $programID\n")
+ append("\tcontrol : $control\n")
+ append("\tdeviceClass : $deviceClass\n")
+ append("\tenrollmentGroup : $enrollmentGroup\n")
+ append("\tcriticality : $criticality\n")
+ append("\tstartTime : $startTime\n")
+ append("\ttransitions : $transitions\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_EVENT_I_D), eventID)
+ if (programID != null) {
+ put(ContextSpecificTag(TAG_PROGRAM_I_D), programID)
+ } else {
+ putNull(ContextSpecificTag(TAG_PROGRAM_I_D))
+ }
+ put(ContextSpecificTag(TAG_CONTROL), control)
+ put(ContextSpecificTag(TAG_DEVICE_CLASS), deviceClass)
+ if (enrollmentGroup.isPresent) {
+ val optenrollmentGroup = enrollmentGroup.get()
+ put(ContextSpecificTag(TAG_ENROLLMENT_GROUP), optenrollmentGroup)
+ }
+ put(ContextSpecificTag(TAG_CRITICALITY), criticality)
+ if (startTime != null) {
+ put(ContextSpecificTag(TAG_START_TIME), startTime)
+ } else {
+ putNull(ContextSpecificTag(TAG_START_TIME))
+ }
+ startArray(ContextSpecificTag(TAG_TRANSITIONS))
+ for (item in transitions.iterator()) {
+ item.toTlv(AnonymousTag, this)
+ }
+ endArray()
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_EVENT_I_D = 0
+ private const val TAG_PROGRAM_I_D = 1
+ private const val TAG_CONTROL = 2
+ private const val TAG_DEVICE_CLASS = 3
+ private const val TAG_ENROLLMENT_GROUP = 4
+ private const val TAG_CRITICALITY = 5
+ private const val TAG_START_TIME = 6
+ private const val TAG_TRANSITIONS = 7
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader
+ ): DemandResponseLoadControlClusterLoadControlEventStruct {
+ tlvReader.enterStructure(tlvTag)
+ val eventID = tlvReader.getByteArray(ContextSpecificTag(TAG_EVENT_I_D))
+ val programID =
+ if (!tlvReader.isNull()) {
+ tlvReader.getByteArray(ContextSpecificTag(TAG_PROGRAM_I_D))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_PROGRAM_I_D))
+ null
+ }
+ val control = tlvReader.getUInt(ContextSpecificTag(TAG_CONTROL))
+ val deviceClass = tlvReader.getULong(ContextSpecificTag(TAG_DEVICE_CLASS))
+ val enrollmentGroup =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENROLLMENT_GROUP))) {
+ Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_ENROLLMENT_GROUP)))
+ } else {
+ Optional.empty()
+ }
+ val criticality = tlvReader.getUInt(ContextSpecificTag(TAG_CRITICALITY))
+ val startTime =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUInt(ContextSpecificTag(TAG_START_TIME))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_START_TIME))
+ null
+ }
+ val transitions =
+ buildList {
+ tlvReader.enterArray(ContextSpecificTag(TAG_TRANSITIONS))
+ while (!tlvReader.isEndOfContainer()) {
+ add(
+ DemandResponseLoadControlClusterLoadControlEventTransitionStruct.fromTlv(
+ AnonymousTag,
+ tlvReader
+ )
+ )
+ }
+ tlvReader.exitContainer()
+ }
+
+ tlvReader.exitContainer()
+
+ return DemandResponseLoadControlClusterLoadControlEventStruct(
+ eventID,
+ programID,
+ control,
+ deviceClass,
+ enrollmentGroup,
+ criticality,
+ startTime,
+ transitions
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlEventTransitionStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlEventTransitionStruct.kt
new file mode 100644
index 00000000000000..46c70edba6e5c8
--- /dev/null
+++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlEventTransitionStruct.kt
@@ -0,0 +1,161 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.devicecontroller.cluster.structs
+
+import java.util.Optional
+import matter.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class DemandResponseLoadControlClusterLoadControlEventTransitionStruct(
+ val duration: UShort,
+ val control: UInt,
+ val temperatureControl: Optional,
+ val averageLoadControl: Optional,
+ val dutyCycleControl: Optional,
+ val powerSavingsControl: Optional,
+ val heatingSourceControl: Optional
+) {
+ override fun toString(): String = buildString {
+ append("DemandResponseLoadControlClusterLoadControlEventTransitionStruct {\n")
+ append("\tduration : $duration\n")
+ append("\tcontrol : $control\n")
+ append("\ttemperatureControl : $temperatureControl\n")
+ append("\taverageLoadControl : $averageLoadControl\n")
+ append("\tdutyCycleControl : $dutyCycleControl\n")
+ append("\tpowerSavingsControl : $powerSavingsControl\n")
+ append("\theatingSourceControl : $heatingSourceControl\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_DURATION), duration)
+ put(ContextSpecificTag(TAG_CONTROL), control)
+ if (temperatureControl.isPresent) {
+ val opttemperatureControl = temperatureControl.get()
+ opttemperatureControl.toTlv(ContextSpecificTag(TAG_TEMPERATURE_CONTROL), this)
+ }
+ if (averageLoadControl.isPresent) {
+ val optaverageLoadControl = averageLoadControl.get()
+ optaverageLoadControl.toTlv(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL), this)
+ }
+ if (dutyCycleControl.isPresent) {
+ val optdutyCycleControl = dutyCycleControl.get()
+ optdutyCycleControl.toTlv(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL), this)
+ }
+ if (powerSavingsControl.isPresent) {
+ val optpowerSavingsControl = powerSavingsControl.get()
+ optpowerSavingsControl.toTlv(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL), this)
+ }
+ if (heatingSourceControl.isPresent) {
+ val optheatingSourceControl = heatingSourceControl.get()
+ optheatingSourceControl.toTlv(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL), this)
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_DURATION = 0
+ private const val TAG_CONTROL = 1
+ private const val TAG_TEMPERATURE_CONTROL = 2
+ private const val TAG_AVERAGE_LOAD_CONTROL = 3
+ private const val TAG_DUTY_CYCLE_CONTROL = 4
+ private const val TAG_POWER_SAVINGS_CONTROL = 5
+ private const val TAG_HEATING_SOURCE_CONTROL = 6
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader
+ ): DemandResponseLoadControlClusterLoadControlEventTransitionStruct {
+ tlvReader.enterStructure(tlvTag)
+ val duration = tlvReader.getUShort(ContextSpecificTag(TAG_DURATION))
+ val control = tlvReader.getUInt(ContextSpecificTag(TAG_CONTROL))
+ val temperatureControl =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_TEMPERATURE_CONTROL))) {
+ Optional.of(
+ DemandResponseLoadControlClusterTemperatureControlStruct.fromTlv(
+ ContextSpecificTag(TAG_TEMPERATURE_CONTROL),
+ tlvReader
+ )
+ )
+ } else {
+ Optional.empty()
+ }
+ val averageLoadControl =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL))) {
+ Optional.of(
+ DemandResponseLoadControlClusterAverageLoadControlStruct.fromTlv(
+ ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL),
+ tlvReader
+ )
+ )
+ } else {
+ Optional.empty()
+ }
+ val dutyCycleControl =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL))) {
+ Optional.of(
+ DemandResponseLoadControlClusterDutyCycleControlStruct.fromTlv(
+ ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL),
+ tlvReader
+ )
+ )
+ } else {
+ Optional.empty()
+ }
+ val powerSavingsControl =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL))) {
+ Optional.of(
+ DemandResponseLoadControlClusterPowerSavingsControlStruct.fromTlv(
+ ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL),
+ tlvReader
+ )
+ )
+ } else {
+ Optional.empty()
+ }
+ val heatingSourceControl =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL))) {
+ Optional.of(
+ DemandResponseLoadControlClusterHeatingSourceControlStruct.fromTlv(
+ ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL),
+ tlvReader
+ )
+ )
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return DemandResponseLoadControlClusterLoadControlEventTransitionStruct(
+ duration,
+ control,
+ temperatureControl,
+ averageLoadControl,
+ dutyCycleControl,
+ powerSavingsControl,
+ heatingSourceControl
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlProgramStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlProgramStruct.kt
new file mode 100644
index 00000000000000..fd21d4d07fb729
--- /dev/null
+++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlProgramStruct.kt
@@ -0,0 +1,113 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.devicecontroller.cluster.structs
+
+import matter.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class DemandResponseLoadControlClusterLoadControlProgramStruct(
+ val programID: ByteArray,
+ val name: String,
+ val enrollmentGroup: UByte?,
+ val randomStartMinutes: UByte?,
+ val randomDurationMinutes: UByte?
+) {
+ override fun toString(): String = buildString {
+ append("DemandResponseLoadControlClusterLoadControlProgramStruct {\n")
+ append("\tprogramID : $programID\n")
+ append("\tname : $name\n")
+ append("\tenrollmentGroup : $enrollmentGroup\n")
+ append("\trandomStartMinutes : $randomStartMinutes\n")
+ append("\trandomDurationMinutes : $randomDurationMinutes\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_PROGRAM_I_D), programID)
+ put(ContextSpecificTag(TAG_NAME), name)
+ if (enrollmentGroup != null) {
+ put(ContextSpecificTag(TAG_ENROLLMENT_GROUP), enrollmentGroup)
+ } else {
+ putNull(ContextSpecificTag(TAG_ENROLLMENT_GROUP))
+ }
+ if (randomStartMinutes != null) {
+ put(ContextSpecificTag(TAG_RANDOM_START_MINUTES), randomStartMinutes)
+ } else {
+ putNull(ContextSpecificTag(TAG_RANDOM_START_MINUTES))
+ }
+ if (randomDurationMinutes != null) {
+ put(ContextSpecificTag(TAG_RANDOM_DURATION_MINUTES), randomDurationMinutes)
+ } else {
+ putNull(ContextSpecificTag(TAG_RANDOM_DURATION_MINUTES))
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_PROGRAM_I_D = 0
+ private const val TAG_NAME = 1
+ private const val TAG_ENROLLMENT_GROUP = 2
+ private const val TAG_RANDOM_START_MINUTES = 3
+ private const val TAG_RANDOM_DURATION_MINUTES = 4
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader
+ ): DemandResponseLoadControlClusterLoadControlProgramStruct {
+ tlvReader.enterStructure(tlvTag)
+ val programID = tlvReader.getByteArray(ContextSpecificTag(TAG_PROGRAM_I_D))
+ val name = tlvReader.getString(ContextSpecificTag(TAG_NAME))
+ val enrollmentGroup =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUByte(ContextSpecificTag(TAG_ENROLLMENT_GROUP))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_ENROLLMENT_GROUP))
+ null
+ }
+ val randomStartMinutes =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUByte(ContextSpecificTag(TAG_RANDOM_START_MINUTES))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_RANDOM_START_MINUTES))
+ null
+ }
+ val randomDurationMinutes =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUByte(ContextSpecificTag(TAG_RANDOM_DURATION_MINUTES))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_RANDOM_DURATION_MINUTES))
+ null
+ }
+
+ tlvReader.exitContainer()
+
+ return DemandResponseLoadControlClusterLoadControlProgramStruct(
+ programID,
+ name,
+ enrollmentGroup,
+ randomStartMinutes,
+ randomDurationMinutes
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterPowerSavingsControlStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterPowerSavingsControlStruct.kt
new file mode 100644
index 00000000000000..811e87bdc7c429
--- /dev/null
+++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterPowerSavingsControlStruct.kt
@@ -0,0 +1,55 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.devicecontroller.cluster.structs
+
+import matter.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class DemandResponseLoadControlClusterPowerSavingsControlStruct(val powerSavings: UInt) {
+ override fun toString(): String = buildString {
+ append("DemandResponseLoadControlClusterPowerSavingsControlStruct {\n")
+ append("\tpowerSavings : $powerSavings\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_POWER_SAVINGS), powerSavings)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_POWER_SAVINGS = 0
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader
+ ): DemandResponseLoadControlClusterPowerSavingsControlStruct {
+ tlvReader.enterStructure(tlvTag)
+ val powerSavings = tlvReader.getUInt(ContextSpecificTag(TAG_POWER_SAVINGS))
+
+ tlvReader.exitContainer()
+
+ return DemandResponseLoadControlClusterPowerSavingsControlStruct(powerSavings)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterScopedLoadControlEventStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterScopedLoadControlEventStruct.kt
new file mode 100644
index 00000000000000..f9ea556026897f
--- /dev/null
+++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterScopedLoadControlEventStruct.kt
@@ -0,0 +1,144 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.devicecontroller.cluster.structs
+
+import matter.devicecontroller.cluster.*
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class DemandResponseLoadControlClusterScopedLoadControlEventStruct(
+ val eventID: ByteArray,
+ val programControl: ByteArray,
+ val control: UInt,
+ val deviceClass: ULong,
+ val enrollmentGroup: UByte?,
+ val criticality: UInt,
+ val startTime: UInt?,
+ val transitions: List,
+ val fabricIndex: UByte
+) {
+ override fun toString(): String = buildString {
+ append("DemandResponseLoadControlClusterScopedLoadControlEventStruct {\n")
+ append("\teventID : $eventID\n")
+ append("\tprogramControl : $programControl\n")
+ append("\tcontrol : $control\n")
+ append("\tdeviceClass : $deviceClass\n")
+ append("\tenrollmentGroup : $enrollmentGroup\n")
+ append("\tcriticality : $criticality\n")
+ append("\tstartTime : $startTime\n")
+ append("\ttransitions : $transitions\n")
+ append("\tfabricIndex : $fabricIndex\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_EVENT_I_D), eventID)
+ put(ContextSpecificTag(TAG_PROGRAM_CONTROL), programControl)
+ put(ContextSpecificTag(TAG_CONTROL), control)
+ put(ContextSpecificTag(TAG_DEVICE_CLASS), deviceClass)
+ if (enrollmentGroup != null) {
+ put(ContextSpecificTag(TAG_ENROLLMENT_GROUP), enrollmentGroup)
+ } else {
+ putNull(ContextSpecificTag(TAG_ENROLLMENT_GROUP))
+ }
+ put(ContextSpecificTag(TAG_CRITICALITY), criticality)
+ if (startTime != null) {
+ put(ContextSpecificTag(TAG_START_TIME), startTime)
+ } else {
+ putNull(ContextSpecificTag(TAG_START_TIME))
+ }
+ startArray(ContextSpecificTag(TAG_TRANSITIONS))
+ for (item in transitions.iterator()) {
+ item.toTlv(AnonymousTag, this)
+ }
+ endArray()
+ put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_EVENT_I_D = 0
+ private const val TAG_PROGRAM_CONTROL = 1
+ private const val TAG_CONTROL = 2
+ private const val TAG_DEVICE_CLASS = 3
+ private const val TAG_ENROLLMENT_GROUP = 4
+ private const val TAG_CRITICALITY = 5
+ private const val TAG_START_TIME = 6
+ private const val TAG_TRANSITIONS = 7
+ private const val TAG_FABRIC_INDEX = 254
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader
+ ): DemandResponseLoadControlClusterScopedLoadControlEventStruct {
+ tlvReader.enterStructure(tlvTag)
+ val eventID = tlvReader.getByteArray(ContextSpecificTag(TAG_EVENT_I_D))
+ val programControl = tlvReader.getByteArray(ContextSpecificTag(TAG_PROGRAM_CONTROL))
+ val control = tlvReader.getUInt(ContextSpecificTag(TAG_CONTROL))
+ val deviceClass = tlvReader.getULong(ContextSpecificTag(TAG_DEVICE_CLASS))
+ val enrollmentGroup =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUByte(ContextSpecificTag(TAG_ENROLLMENT_GROUP))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_ENROLLMENT_GROUP))
+ null
+ }
+ val criticality = tlvReader.getUInt(ContextSpecificTag(TAG_CRITICALITY))
+ val startTime =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUInt(ContextSpecificTag(TAG_START_TIME))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_START_TIME))
+ null
+ }
+ val transitions =
+ buildList {
+ tlvReader.enterArray(ContextSpecificTag(TAG_TRANSITIONS))
+ while (!tlvReader.isEndOfContainer()) {
+ add(
+ DemandResponseLoadControlClusterLoadControlEventTransitionStruct.fromTlv(
+ AnonymousTag,
+ tlvReader
+ )
+ )
+ }
+ tlvReader.exitContainer()
+ }
+ val fabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX))
+
+ tlvReader.exitContainer()
+
+ return DemandResponseLoadControlClusterScopedLoadControlEventStruct(
+ eventID,
+ programControl,
+ control,
+ deviceClass,
+ enrollmentGroup,
+ criticality,
+ startTime,
+ transitions,
+ fabricIndex
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterTemperatureControlStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterTemperatureControlStruct.kt
new file mode 100644
index 00000000000000..89d78db74606f3
--- /dev/null
+++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterTemperatureControlStruct.kt
@@ -0,0 +1,146 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.devicecontroller.cluster.structs
+
+import java.util.Optional
+import matter.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class DemandResponseLoadControlClusterTemperatureControlStruct(
+ val coolingTempOffset: Optional?,
+ val heatingtTempOffset: Optional?,
+ val coolingTempSetpoint: Optional?,
+ val heatingTempSetpoint: Optional?
+) {
+ override fun toString(): String = buildString {
+ append("DemandResponseLoadControlClusterTemperatureControlStruct {\n")
+ append("\tcoolingTempOffset : $coolingTempOffset\n")
+ append("\theatingtTempOffset : $heatingtTempOffset\n")
+ append("\tcoolingTempSetpoint : $coolingTempSetpoint\n")
+ append("\theatingTempSetpoint : $heatingTempSetpoint\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ if (coolingTempOffset != null) {
+ if (coolingTempOffset.isPresent) {
+ val optcoolingTempOffset = coolingTempOffset.get()
+ put(ContextSpecificTag(TAG_COOLING_TEMP_OFFSET), optcoolingTempOffset)
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_COOLING_TEMP_OFFSET))
+ }
+ if (heatingtTempOffset != null) {
+ if (heatingtTempOffset.isPresent) {
+ val optheatingtTempOffset = heatingtTempOffset.get()
+ put(ContextSpecificTag(TAG_HEATINGT_TEMP_OFFSET), optheatingtTempOffset)
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_HEATINGT_TEMP_OFFSET))
+ }
+ if (coolingTempSetpoint != null) {
+ if (coolingTempSetpoint.isPresent) {
+ val optcoolingTempSetpoint = coolingTempSetpoint.get()
+ put(ContextSpecificTag(TAG_COOLING_TEMP_SETPOINT), optcoolingTempSetpoint)
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_COOLING_TEMP_SETPOINT))
+ }
+ if (heatingTempSetpoint != null) {
+ if (heatingTempSetpoint.isPresent) {
+ val optheatingTempSetpoint = heatingTempSetpoint.get()
+ put(ContextSpecificTag(TAG_HEATING_TEMP_SETPOINT), optheatingTempSetpoint)
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_HEATING_TEMP_SETPOINT))
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_COOLING_TEMP_OFFSET = 0
+ private const val TAG_HEATINGT_TEMP_OFFSET = 1
+ private const val TAG_COOLING_TEMP_SETPOINT = 2
+ private const val TAG_HEATING_TEMP_SETPOINT = 3
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader
+ ): DemandResponseLoadControlClusterTemperatureControlStruct {
+ tlvReader.enterStructure(tlvTag)
+ val coolingTempOffset =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_COOLING_TEMP_OFFSET))) {
+ Optional.of(tlvReader.getUShort(ContextSpecificTag(TAG_COOLING_TEMP_OFFSET)))
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_COOLING_TEMP_OFFSET))
+ null
+ }
+ val heatingtTempOffset =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_HEATINGT_TEMP_OFFSET))) {
+ Optional.of(tlvReader.getUShort(ContextSpecificTag(TAG_HEATINGT_TEMP_OFFSET)))
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_HEATINGT_TEMP_OFFSET))
+ null
+ }
+ val coolingTempSetpoint =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_COOLING_TEMP_SETPOINT))) {
+ Optional.of(tlvReader.getShort(ContextSpecificTag(TAG_COOLING_TEMP_SETPOINT)))
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_COOLING_TEMP_SETPOINT))
+ null
+ }
+ val heatingTempSetpoint =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_HEATING_TEMP_SETPOINT))) {
+ Optional.of(tlvReader.getShort(ContextSpecificTag(TAG_HEATING_TEMP_SETPOINT)))
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_HEATING_TEMP_SETPOINT))
+ null
+ }
+
+ tlvReader.exitContainer()
+
+ return DemandResponseLoadControlClusterTemperatureControlStruct(
+ coolingTempOffset,
+ heatingtTempOffset,
+ coolingTempSetpoint,
+ heatingTempSetpoint
+ )
+ }
+ }
+}
diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
index 4eb41ce3946849..2d8fe197e143f4 100644
--- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
+++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
@@ -17831,6 +17831,1389 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR
}
break;
}
+ case app::Clusters::DemandResponseLoadControl::Id: {
+ using namespace app::Clusters::DemandResponseLoadControl;
+ switch (aPath.mAttributeId)
+ {
+ case Attributes::DeviceClass::Id: {
+ using TypeInfo = Attributes::DeviceClass::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Long";
+ std::string valueCtorSignature = "(J)V";
+ jlong jnivalue = static_cast(cppValue.Raw());
+ chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(),
+ jnivalue, value);
+ return value;
+ }
+ case Attributes::LoadControlPrograms::Id: {
+ using TypeInfo = Attributes::LoadControlPrograms::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ jobject newElement_0_programID;
+ jbyteArray newElement_0_programIDByteArray = env->NewByteArray(static_cast(entry_0.programID.size()));
+ env->SetByteArrayRegion(newElement_0_programIDByteArray, 0, static_cast(entry_0.programID.size()),
+ reinterpret_cast(entry_0.programID.data()));
+ newElement_0_programID = newElement_0_programIDByteArray;
+ jobject newElement_0_name;
+ LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name));
+ jobject newElement_0_enrollmentGroup;
+ if (entry_0.enrollmentGroup.IsNull())
+ {
+ newElement_0_enrollmentGroup = nullptr;
+ }
+ else
+ {
+ std::string newElement_0_enrollmentGroupClassName = "java/lang/Integer";
+ std::string newElement_0_enrollmentGroupCtorSignature = "(I)V";
+ jint jninewElement_0_enrollmentGroup = static_cast(entry_0.enrollmentGroup.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject(
+ newElement_0_enrollmentGroupClassName.c_str(), newElement_0_enrollmentGroupCtorSignature.c_str(),
+ jninewElement_0_enrollmentGroup, newElement_0_enrollmentGroup);
+ }
+ jobject newElement_0_randomStartMinutes;
+ if (entry_0.randomStartMinutes.IsNull())
+ {
+ newElement_0_randomStartMinutes = nullptr;
+ }
+ else
+ {
+ std::string newElement_0_randomStartMinutesClassName = "java/lang/Integer";
+ std::string newElement_0_randomStartMinutesCtorSignature = "(I)V";
+ jint jninewElement_0_randomStartMinutes = static_cast(entry_0.randomStartMinutes.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject(
+ newElement_0_randomStartMinutesClassName.c_str(), newElement_0_randomStartMinutesCtorSignature.c_str(),
+ jninewElement_0_randomStartMinutes, newElement_0_randomStartMinutes);
+ }
+ jobject newElement_0_randomDurationMinutes;
+ if (entry_0.randomDurationMinutes.IsNull())
+ {
+ newElement_0_randomDurationMinutes = nullptr;
+ }
+ else
+ {
+ std::string newElement_0_randomDurationMinutesClassName = "java/lang/Integer";
+ std::string newElement_0_randomDurationMinutesCtorSignature = "(I)V";
+ jint jninewElement_0_randomDurationMinutes = static_cast(entry_0.randomDurationMinutes.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject(
+ newElement_0_randomDurationMinutesClassName.c_str(),
+ newElement_0_randomDurationMinutesCtorSignature.c_str(), jninewElement_0_randomDurationMinutes,
+ newElement_0_randomDurationMinutes);
+ }
+
+ jclass loadControlProgramStructStructClass_1;
+ err = chip::JniReferences::GetInstance().GetClassRef(
+ env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlProgramStruct",
+ loadControlProgramStructStructClass_1);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterLoadControlProgramStruct");
+ return nullptr;
+ }
+ jmethodID loadControlProgramStructStructCtor_1 =
+ env->GetMethodID(loadControlProgramStructStructClass_1, "",
+ "([BLjava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V");
+ if (loadControlProgramStructStructCtor_1 == nullptr)
+ {
+ ChipLogError(Zcl,
+ "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlProgramStruct constructor");
+ return nullptr;
+ }
+
+ newElement_0 = env->NewObject(loadControlProgramStructStructClass_1, loadControlProgramStructStructCtor_1,
+ newElement_0_programID, newElement_0_name, newElement_0_enrollmentGroup,
+ newElement_0_randomStartMinutes, newElement_0_randomDurationMinutes);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::NumberOfLoadControlPrograms::Id: {
+ using TypeInfo = Attributes::NumberOfLoadControlPrograms::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Integer";
+ std::string valueCtorSignature = "(I)V";
+ jint jnivalue = static_cast(cppValue);
+ chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue,
+ value);
+ return value;
+ }
+ case Attributes::Events::Id: {
+ using TypeInfo = Attributes::Events::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ jobject newElement_0_eventID;
+ jbyteArray newElement_0_eventIDByteArray = env->NewByteArray(static_cast(entry_0.eventID.size()));
+ env->SetByteArrayRegion(newElement_0_eventIDByteArray, 0, static_cast(entry_0.eventID.size()),
+ reinterpret_cast(entry_0.eventID.data()));
+ newElement_0_eventID = newElement_0_eventIDByteArray;
+ jobject newElement_0_programID;
+ if (entry_0.programID.IsNull())
+ {
+ newElement_0_programID = nullptr;
+ }
+ else
+ {
+ jbyteArray newElement_0_programIDByteArray =
+ env->NewByteArray(static_cast(entry_0.programID.Value().size()));
+ env->SetByteArrayRegion(newElement_0_programIDByteArray, 0,
+ static_cast(entry_0.programID.Value().size()),
+ reinterpret_cast(entry_0.programID.Value().data()));
+ newElement_0_programID = newElement_0_programIDByteArray;
+ }
+ jobject newElement_0_control;
+ std::string newElement_0_controlClassName = "java/lang/Integer";
+ std::string newElement_0_controlCtorSignature = "(I)V";
+ jint jninewElement_0_control = static_cast(entry_0.control.Raw());
+ chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_controlClassName.c_str(),
+ newElement_0_controlCtorSignature.c_str(),
+ jninewElement_0_control, newElement_0_control);
+ jobject newElement_0_deviceClass;
+ std::string newElement_0_deviceClassClassName = "java/lang/Long";
+ std::string newElement_0_deviceClassCtorSignature = "(J)V";
+ jlong jninewElement_0_deviceClass = static_cast(entry_0.deviceClass.Raw());
+ chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_deviceClassClassName.c_str(),
+ newElement_0_deviceClassCtorSignature.c_str(),
+ jninewElement_0_deviceClass, newElement_0_deviceClass);
+ jobject newElement_0_enrollmentGroup;
+ if (!entry_0.enrollmentGroup.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_enrollmentGroup);
+ }
+ else
+ {
+ jobject newElement_0_enrollmentGroupInsideOptional;
+ std::string newElement_0_enrollmentGroupInsideOptionalClassName = "java/lang/Integer";
+ std::string newElement_0_enrollmentGroupInsideOptionalCtorSignature = "(I)V";
+ jint jninewElement_0_enrollmentGroupInsideOptional = static_cast(entry_0.enrollmentGroup.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject(
+ newElement_0_enrollmentGroupInsideOptionalClassName.c_str(),
+ newElement_0_enrollmentGroupInsideOptionalCtorSignature.c_str(),
+ jninewElement_0_enrollmentGroupInsideOptional, newElement_0_enrollmentGroupInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(newElement_0_enrollmentGroupInsideOptional,
+ newElement_0_enrollmentGroup);
+ }
+ jobject newElement_0_criticality;
+ std::string newElement_0_criticalityClassName = "java/lang/Integer";
+ std::string newElement_0_criticalityCtorSignature = "(I)V";
+ jint jninewElement_0_criticality = static_cast(entry_0.criticality);
+ chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_criticalityClassName.c_str(),
+ newElement_0_criticalityCtorSignature.c_str(),
+ jninewElement_0_criticality, newElement_0_criticality);
+ jobject newElement_0_startTime;
+ if (entry_0.startTime.IsNull())
+ {
+ newElement_0_startTime = nullptr;
+ }
+ else
+ {
+ std::string newElement_0_startTimeClassName = "java/lang/Long";
+ std::string newElement_0_startTimeCtorSignature = "(J)V";
+ jlong jninewElement_0_startTime = static_cast(entry_0.startTime.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_startTimeClassName.c_str(),
+ newElement_0_startTimeCtorSignature.c_str(),
+ jninewElement_0_startTime, newElement_0_startTime);
+ }
+ jobject newElement_0_transitions;
+ chip::JniReferences::GetInstance().CreateArrayList(newElement_0_transitions);
+
+ auto iter_newElement_0_transitions_2 = entry_0.transitions.begin();
+ while (iter_newElement_0_transitions_2.Next())
+ {
+ auto & entry_2 = iter_newElement_0_transitions_2.GetValue();
+ jobject newElement_2;
+ jobject newElement_2_duration;
+ std::string newElement_2_durationClassName = "java/lang/Integer";
+ std::string newElement_2_durationCtorSignature = "(I)V";
+ jint jninewElement_2_duration = static_cast(entry_2.duration);
+ chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_durationClassName.c_str(),
+ newElement_2_durationCtorSignature.c_str(),
+ jninewElement_2_duration, newElement_2_duration);
+ jobject newElement_2_control;
+ std::string newElement_2_controlClassName = "java/lang/Integer";
+ std::string newElement_2_controlCtorSignature = "(I)V";
+ jint jninewElement_2_control = static_cast(entry_2.control.Raw());
+ chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_controlClassName.c_str(),
+ newElement_2_controlCtorSignature.c_str(),
+ jninewElement_2_control, newElement_2_control);
+ jobject newElement_2_temperatureControl;
+ if (!entry_2.temperatureControl.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_temperatureControl);
+ }
+ else
+ {
+ jobject newElement_2_temperatureControlInsideOptional;
+ jobject newElement_2_temperatureControlInsideOptional_coolingTempOffset;
+ if (!entry_2.temperatureControl.Value().coolingTempOffset.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(
+ nullptr, newElement_2_temperatureControlInsideOptional_coolingTempOffset);
+ }
+ else
+ {
+ jobject newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional;
+ if (entry_2.temperatureControl.Value().coolingTempOffset.Value().IsNull())
+ {
+ newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional = nullptr;
+ }
+ else
+ {
+ std::string newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalClassName =
+ "java/lang/Integer";
+ std::string
+ newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalCtorSignature =
+ "(I)V";
+ jint jninewElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional =
+ static_cast(entry_2.temperatureControl.Value().coolingTempOffset.Value().Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject(
+ newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalClassName.c_str(),
+ newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalCtorSignature
+ .c_str(),
+ jninewElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional,
+ newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional);
+ }
+ chip::JniReferences::GetInstance().CreateOptional(
+ newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional,
+ newElement_2_temperatureControlInsideOptional_coolingTempOffset);
+ }
+ jobject newElement_2_temperatureControlInsideOptional_heatingtTempOffset;
+ if (!entry_2.temperatureControl.Value().heatingtTempOffset.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(
+ nullptr, newElement_2_temperatureControlInsideOptional_heatingtTempOffset);
+ }
+ else
+ {
+ jobject newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional;
+ if (entry_2.temperatureControl.Value().heatingtTempOffset.Value().IsNull())
+ {
+ newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional = nullptr;
+ }
+ else
+ {
+ std::string
+ newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalClassName =
+ "java/lang/Integer";
+ std::string
+ newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalCtorSignature =
+ "(I)V";
+ jint jninewElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional =
+ static_cast