Skip to content

Commit

Permalink
Merge branch 'master' into fix-to-tlv-writer-overrun
Browse files Browse the repository at this point in the history
  • Loading branch information
tehampson authored Dec 13, 2023
2 parents c10695d + b6e465a commit 190c324
Show file tree
Hide file tree
Showing 649 changed files with 107,737 additions and 29,068 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/zap_templates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ jobs:
run: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -fy --fix-missing openjdk-17-jre
# Clean out java generated files: since java codegen will generate one file per
# structure/cluster, if clusters and structures are ever changed (for in progress work)
# this may leave obsolete files. Ensure we always check for clean regen.
- name: Ensure clean java
run: rm -rf src/controller/java/generated/
- name: Generate all
run: ./scripts/run_in_build_env.sh scripts/tools/zap_regen_all.py
- name: Generate script-maintained items (ERROR_CODES.md)
Expand Down
1 change: 1 addition & 0 deletions docs/clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ Generally regenerate using one of:
| 114 | 0x72 | ActivatedCarbonFilterMonitoring |
| 128 | 0x80 | BooleanSensorConfiguration |
| 129 | 0x81 | ValveConfigurationAndControl |
| 145 | 0x91 | ElectricalEnergyMeasurement |
| 150 | 0x96 | DemandResponseLoadControl |
| 152 | 0x98 | DeviceEnergyManagement |
| 153 | 0x99 | EnergyEvse |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7583,5 +7583,6 @@
"endpointId": 4,
"networkId": 0
}
]
],
"log": []
}
Original file line number Diff line number Diff line change
Expand Up @@ -6063,5 +6063,6 @@
"endpointId": 1,
"networkId": 0
}
]
],
"log": []
}
Original file line number Diff line number Diff line change
Expand Up @@ -3638,6 +3638,85 @@ cluster ActivatedCarbonFilterMonitoring = 114 {
command ResetCondition(): DefaultSuccess = 0;
}

/** This cluster provides a mechanism for querying data about the electrical energy imported or provided by the server. */
provisional cluster ElectricalEnergyMeasurement = 145 {
revision 1;

enum MeasurementTypeEnum : enum16 {
kUnspecified = 0;
kVoltage = 1;
kActiveCurrent = 2;
kReactiveCurrent = 3;
kApparentCurrent = 4;
kActivePower = 5;
kReactivePower = 6;
kApparentPower = 7;
kRMSVoltage = 8;
kRMSCurrent = 9;
kRMSPower = 10;
kFrequency = 11;
kPowerFactor = 12;
kNeutralCurrent = 13;
kElectricalEnergy = 14;
}

bitmap Feature : bitmap32 {
kImportedEnergy = 0x1;
kExportedEnergy = 0x2;
kCumulativeEnergy = 0x4;
kPeriodicEnergy = 0x8;
}

struct MeasurementAccuracyRangeStruct {
int64s rangeMin = 0;
int64s rangeMax = 1;
optional percent100ths percentMax = 2;
optional percent100ths percentMin = 3;
optional percent100ths percentTypical = 4;
optional int64u fixedMax = 5;
optional int64u fixedMin = 6;
optional int64u fixedTypical = 7;
}

struct MeasurementAccuracyStruct {
MeasurementTypeEnum measurementType = 0;
boolean measured = 1;
int64s minMeasuredValue = 2;
int64s maxMeasuredValue = 3;
MeasurementAccuracyRangeStruct accuracyRanges[] = 4;
}

struct EnergyMeasurementStruct {
int64s energy = 0;
optional epoch_s startTimestamp = 1;
optional epoch_s endTimestamp = 2;
optional systime_ms startSystime = 3;
optional systime_ms endSystime = 4;
}

info event CumulativeEnergyMeasured = 0 {
optional EnergyMeasurementStruct energyImported = 0;
optional EnergyMeasurementStruct energyExported = 1;
}

info event PeriodicEnergyMeasured = 1 {
optional EnergyMeasurementStruct energyImported = 0;
optional EnergyMeasurementStruct energyExported = 1;
}

readonly attribute MeasurementAccuracyStruct accuracy = 0;
readonly attribute optional nullable EnergyMeasurementStruct cumulativeEnergyImported = 1;
readonly attribute optional nullable EnergyMeasurementStruct cumulativeEnergyExported = 2;
readonly attribute optional nullable EnergyMeasurementStruct periodicEnergyImported = 3;
readonly attribute optional nullable EnergyMeasurementStruct periodicEnergyExported = 4;
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;
}

/** Provides an interface for controlling and adjusting automatic window coverings. */
cluster WindowCovering = 258 {
revision 5;
Expand Down Expand Up @@ -7046,6 +7125,22 @@ endpoint 1 {
handle command ResetCondition;
}

server cluster ElectricalEnergyMeasurement {
emits event CumulativeEnergyMeasured;
emits event PeriodicEnergyMeasured;
callback attribute accuracy;
callback attribute cumulativeEnergyImported;
callback attribute cumulativeEnergyExported;
callback attribute periodicEnergyImported;
callback attribute periodicEnergyExported;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 0x000F;
ram attribute clusterRevision default = 1;
}

server cluster WindowCovering {
ram attribute type default = 0x08;
ram attribute physicalClosedLimitLift default = 0xFFFF;
Expand Down
221 changes: 220 additions & 1 deletion examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -11524,6 +11524,225 @@
}
]
},
{
"name": "Electrical Energy Measurement",
"code": 145,
"mfgCode": null,
"define": "ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER",
"side": "server",
"enabled": 1,
"apiMaturity": "provisional",
"attributes": [
{
"name": "Measured",
"code": 0,
"mfgCode": null,
"side": "server",
"type": "boolean",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "false",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "Accuracy",
"code": 1,
"mfgCode": null,
"side": "server",
"type": "MeasurementAccuracyStruct",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "CumulativeEnergyImported",
"code": 2,
"mfgCode": null,
"side": "server",
"type": "EnergyMeasurementStruct",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "CumulativeEnergyExported",
"code": 3,
"mfgCode": null,
"side": "server",
"type": "EnergyMeasurementStruct",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "PeriodicEnergyImported",
"code": 4,
"mfgCode": null,
"side": "server",
"type": "EnergyMeasurementStruct",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "PeriodicEnergyExported",
"code": 5,
"mfgCode": null,
"side": "server",
"type": "EnergyMeasurementStruct",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "GeneratedCommandList",
"code": 65528,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AcceptedCommandList",
"code": 65529,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "EventList",
"code": 65530,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AttributeList",
"code": 65531,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
"side": "server",
"type": "bitmap32",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x000F",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
}
],
"events": [
{
"name": "CumulativeEnergyMeasured",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1
},
{
"name": "PeriodicEnergyMeasured",
"code": 1,
"mfgCode": null,
"side": "server",
"included": 1
}
]
},
{
"name": "Window Covering",
"code": 258,
Expand Down Expand Up @@ -21742,4 +21961,4 @@
}
],
"log": []
}
}
5 changes: 4 additions & 1 deletion examples/all-clusters-app/cc13x4_26x4/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ ti_sysconfig("sysconfig") {
sources = [ "${project_dir}/chip.syscfg" ]

outputs = [
"ti_devices_config.c",
"ti_radio_config.c",
"ti_radio_config.h",
"ti_drivers_config.c",
Expand All @@ -47,6 +46,10 @@ ti_sysconfig("sysconfig") {
"ti_dmm_application_policy.c",
"ti_dmm_application_policy.h",

# CCFG generation disabled for OTA-able application
#"ti_devices_config.c",
#"ti_devices_config.h",

# disabled until upstream generation is aligned
#"tiop_config.h",
#"tiop_config.c",
Expand Down
Loading

0 comments on commit 190c324

Please sign in to comment.