Skip to content

Commit

Permalink
Regen after restoring deprecated electrical measurement cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
hasty committed Jan 19, 2024
1 parent 7b90986 commit 3f7447d
Show file tree
Hide file tree
Showing 42 changed files with 50,050 additions and 834 deletions.
1 change: 1 addition & 0 deletions src/app/zap_cluster_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
"ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER": [
"electrical-energy-measurement-server"
],
"ELECTRICAL_MEASUREMENT_CLUSTER": [],
"ELECTRICAL_POWER_MEASUREMENT_CLUSTER": [
"electrical-power-measurement-server"
],
Expand Down
3,631 changes: 3,631 additions & 0 deletions src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,9 @@ public static BaseCluster getCluster(long clusterId) {
if (clusterId == ContentAppObserver.ID) {
return new ContentAppObserver();
}
if (clusterId == ElectricalMeasurement.ID) {
return new ElectricalMeasurement();
}
if (clusterId == UnitTesting.ID) {
return new UnitTesting();
}
Expand Down Expand Up @@ -15876,6 +15879,253 @@ public long getCommandID(String name) throws IllegalArgumentException {
return Command.valueOf(name).getID();
}
}
public static class ElectricalMeasurement implements BaseCluster {
public static final long ID = 2820L;
public long getID() {
return ID;
}

public enum Attribute {
MeasurementType(0L),
DcVoltage(256L),
DcVoltageMin(257L),
DcVoltageMax(258L),
DcCurrent(259L),
DcCurrentMin(260L),
DcCurrentMax(261L),
DcPower(262L),
DcPowerMin(263L),
DcPowerMax(264L),
DcVoltageMultiplier(512L),
DcVoltageDivisor(513L),
DcCurrentMultiplier(514L),
DcCurrentDivisor(515L),
DcPowerMultiplier(516L),
DcPowerDivisor(517L),
AcFrequency(768L),
AcFrequencyMin(769L),
AcFrequencyMax(770L),
NeutralCurrent(771L),
TotalActivePower(772L),
TotalReactivePower(773L),
TotalApparentPower(774L),
Measured1stHarmonicCurrent(775L),
Measured3rdHarmonicCurrent(776L),
Measured5thHarmonicCurrent(777L),
Measured7thHarmonicCurrent(778L),
Measured9thHarmonicCurrent(779L),
Measured11thHarmonicCurrent(780L),
MeasuredPhase1stHarmonicCurrent(781L),
MeasuredPhase3rdHarmonicCurrent(782L),
MeasuredPhase5thHarmonicCurrent(783L),
MeasuredPhase7thHarmonicCurrent(784L),
MeasuredPhase9thHarmonicCurrent(785L),
MeasuredPhase11thHarmonicCurrent(786L),
AcFrequencyMultiplier(1024L),
AcFrequencyDivisor(1025L),
PowerMultiplier(1026L),
PowerDivisor(1027L),
HarmonicCurrentMultiplier(1028L),
PhaseHarmonicCurrentMultiplier(1029L),
InstantaneousVoltage(1280L),
InstantaneousLineCurrent(1281L),
InstantaneousActiveCurrent(1282L),
InstantaneousReactiveCurrent(1283L),
InstantaneousPower(1284L),
RmsVoltage(1285L),
RmsVoltageMin(1286L),
RmsVoltageMax(1287L),
RmsCurrent(1288L),
RmsCurrentMin(1289L),
RmsCurrentMax(1290L),
ActivePower(1291L),
ActivePowerMin(1292L),
ActivePowerMax(1293L),
ReactivePower(1294L),
ApparentPower(1295L),
PowerFactor(1296L),
AverageRmsVoltageMeasurementPeriod(1297L),
AverageRmsUnderVoltageCounter(1299L),
RmsExtremeOverVoltagePeriod(1300L),
RmsExtremeUnderVoltagePeriod(1301L),
RmsVoltageSagPeriod(1302L),
RmsVoltageSwellPeriod(1303L),
AcVoltageMultiplier(1536L),
AcVoltageDivisor(1537L),
AcCurrentMultiplier(1538L),
AcCurrentDivisor(1539L),
AcPowerMultiplier(1540L),
AcPowerDivisor(1541L),
OverloadAlarmsMask(1792L),
VoltageOverload(1793L),
CurrentOverload(1794L),
AcOverloadAlarmsMask(2048L),
AcVoltageOverload(2049L),
AcCurrentOverload(2050L),
AcActivePowerOverload(2051L),
AcReactivePowerOverload(2052L),
AverageRmsOverVoltage(2053L),
AverageRmsUnderVoltage(2054L),
RmsExtremeOverVoltage(2055L),
RmsExtremeUnderVoltage(2056L),
RmsVoltageSag(2057L),
RmsVoltageSwell(2058L),
LineCurrentPhaseB(2305L),
ActiveCurrentPhaseB(2306L),
ReactiveCurrentPhaseB(2307L),
RmsVoltagePhaseB(2309L),
RmsVoltageMinPhaseB(2310L),
RmsVoltageMaxPhaseB(2311L),
RmsCurrentPhaseB(2312L),
RmsCurrentMinPhaseB(2313L),
RmsCurrentMaxPhaseB(2314L),
ActivePowerPhaseB(2315L),
ActivePowerMinPhaseB(2316L),
ActivePowerMaxPhaseB(2317L),
ReactivePowerPhaseB(2318L),
ApparentPowerPhaseB(2319L),
PowerFactorPhaseB(2320L),
AverageRmsVoltageMeasurementPeriodPhaseB(2321L),
AverageRmsOverVoltageCounterPhaseB(2322L),
AverageRmsUnderVoltageCounterPhaseB(2323L),
RmsExtremeOverVoltagePeriodPhaseB(2324L),
RmsExtremeUnderVoltagePeriodPhaseB(2325L),
RmsVoltageSagPeriodPhaseB(2326L),
RmsVoltageSwellPeriodPhaseB(2327L),
LineCurrentPhaseC(2561L),
ActiveCurrentPhaseC(2562L),
ReactiveCurrentPhaseC(2563L),
RmsVoltagePhaseC(2565L),
RmsVoltageMinPhaseC(2566L),
RmsVoltageMaxPhaseC(2567L),
RmsCurrentPhaseC(2568L),
RmsCurrentMinPhaseC(2569L),
RmsCurrentMaxPhaseC(2570L),
ActivePowerPhaseC(2571L),
ActivePowerMinPhaseC(2572L),
ActivePowerMaxPhaseC(2573L),
ReactivePowerPhaseC(2574L),
ApparentPowerPhaseC(2575L),
PowerFactorPhaseC(2576L),
AverageRmsVoltageMeasurementPeriodPhaseC(2577L),
AverageRmsOverVoltageCounterPhaseC(2578L),
AverageRmsUnderVoltageCounterPhaseC(2579L),
RmsExtremeOverVoltagePeriodPhaseC(2580L),
RmsExtremeUnderVoltagePeriodPhaseC(2581L),
RmsVoltageSagPeriodPhaseC(2582L),
RmsVoltageSwellPeriodPhaseC(2583L),
GeneratedCommandList(65528L),
AcceptedCommandList(65529L),
EventList(65530L),
AttributeList(65531L),
FeatureMap(65532L),
ClusterRevision(65533L),;
private final long id;
Attribute(long id) {
this.id = id;
}

public long getID() {
return id;
}

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

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

public long getID() {
return id;
}

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

public enum Command {
GetProfileInfoCommand(0L),
GetMeasurementProfileCommand(1L),;
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 GetMeasurementProfileCommandCommandField {AttributeId(0),StartTime(1),NumberOfIntervals(2),;
private final int id;
GetMeasurementProfileCommandCommandField(int id) {
this.id = id;
}

public int getID() {
return id;
}
public static GetMeasurementProfileCommandCommandField value(int id) throws NoSuchFieldError {
for (GetMeasurementProfileCommandCommandField field : GetMeasurementProfileCommandCommandField.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 UnitTesting implements BaseCluster {
public static final long ID = 4294048773L;
public long getID() {
Expand Down
Loading

0 comments on commit 3f7447d

Please sign in to comment.