Skip to content

Commit

Permalink
Merge branch 'master' into launch-contentapp-on-command
Browse files Browse the repository at this point in the history
  • Loading branch information
lazarkov authored Jul 10, 2024
2 parents 89f25de + 8ebe19d commit 4d692bb
Show file tree
Hide file tree
Showing 149 changed files with 10,078 additions and 3,472 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/water-heater-management-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/wifi-network-management-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/window-covering.xml \
Expand Down Expand Up @@ -529,6 +530,7 @@ jobs:
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_ICDManagementCluster.py'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_IDM_1_2.py'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_IDM_1_4.py'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_IDM_4_2.py'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_PWRTL_2_1.py'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_RR_1_1.py'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_SC_3_6.py'
Expand Down
15 changes: 11 additions & 4 deletions config/python/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,19 @@
#define CHIP_CONFIG_EVENT_LOGGING_NUM_EXTERNAL_CALLBACKS 2

// Uncomment this for a large Tunnel MTU.
//#define CHIP_CONFIG_TUNNEL_INTERFACE_MTU (9000)
// #define CHIP_CONFIG_TUNNEL_INTERFACE_MTU (9000)

// Enable support functions for parsing command-line arguments
#define CHIP_CONFIG_ENABLE_ARG_PARSER 1

// Use a default pairing code if one hasn't been provisioned in flash.
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00
// Enable use of test setup parameters for testing purposes only.
//
// WARNING: This option makes it possible to circumvent basic chip security functionality.
// Because of this it SHOULD NEVER BE ENABLED IN PRODUCTION BUILDS.
//
#ifndef CHIP_DEVICE_CONFIG_ENABLE_TEST_SETUP_PARAMS
#define CHIP_DEVICE_CONFIG_ENABLE_TEST_SETUP_PARAMS 1
#endif

// Enable reading DRBG seed data from /dev/(u)random.
// This is needed for test applications and the CHIP device manager to function
Expand All @@ -46,6 +51,8 @@
// WARNING: These options make it possible to circumvent basic Chip security functionality,
// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
//
// To build with this flag, pass 'treat_warnings_as_errors=false' to gn/ninja.
//
#define CHIP_CONFIG_SECURITY_TEST_MODE 0

#define CHIP_CONFIG_ENABLE_UPDATE 1
Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started/SDKBasics.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ logic is handled in the run-time installed interface layers.
- examples
- [examples/chip-tool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool) -
main controller example
- [examples/all-clusters-app](https://github.com/project-chip/connectedhomeip/blob/master/examples/all-cluster-app) -
- [examples/all-clusters-app](https://github.com/project-chip/connectedhomeip/blob/master/examples/all-clusters-app) -
QA app
- [examples/\<others\>](https://github.com/project-chip/connectedhomeip/blob/master/examples) -
Specific Device examples
Expand Down
4 changes: 2 additions & 2 deletions docs/testing/unit_testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ your overriding function make sure to check `HasFailure()` and return if the
parent function failed.

If you don't override any of the setup/teardown functions, you can simply make a
type alias: `using YourTestContext = Test::AppContextPW;` instead of defining
your own text context class.
type alias: `using YourTestContext = Test::AppContext;` instead of defining your
own text context class.

## Best practices

Expand Down
1 change: 1 addition & 0 deletions docs/zap_clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Generally regenerate using one of:
| 129 | 0x81 | ValveConfigurationAndControl |
| 144 | 0x90 | ElectricalPowerMeasurement |
| 145 | 0x91 | ElectricalEnergyMeasurement |
| 148 | 0x94 | WaterHeaterManagement |
| 150 | 0x96 | DemandResponseLoadControl |
| 151 | 0x97 | Messages |
| 152 | 0x98 | DeviceEnergyManagement |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4298,7 +4298,7 @@ provisional cluster DeviceEnergyManagement = 152 {

/** Electric Vehicle Supply Equipment (EVSE) is equipment used to charge an Electric Vehicle (EV) or Plug-In Hybrid Electric Vehicle. This cluster provides an interface to the functionality of Electric Vehicle Supply Equipment (EVSE) management. */
cluster EnergyEvse = 153 {
revision 2;
revision 4;

enum EnergyTransferStoppedReasonEnum : enum8 {
kEVStopped = 0;
Expand Down Expand Up @@ -4342,6 +4342,7 @@ cluster EnergyEvse = 153 {
kDischargingEnabled = 2;
kDisabledError = 3;
kDisabledDiagnostics = 4;
kEnabled = 5;
}

bitmap Feature : bitmap32 {
Expand Down Expand Up @@ -4389,13 +4390,15 @@ cluster EnergyEvse = 153 {
int32u sessionID = 0;
StateEnum state = 1;
amperage_ma maximumCurrent = 2;
optional amperage_ma maximumDischargeCurrent = 3;
}

info event EnergyTransferStopped = 3 {
int32u sessionID = 0;
StateEnum state = 1;
EnergyTransferStoppedReasonEnum reason = 2;
energy_mwh energyTransferred = 4;
optional energy_mwh energyDischarged = 5;
}

critical event Fault = 4 {
Expand Down Expand Up @@ -4460,15 +4463,15 @@ cluster EnergyEvse = 153 {

/** Allows a client to disable the EVSE from charging and discharging. */
timed command Disable(): DefaultSuccess = 1;
/** Allows a client to enable the EVSE to charge an EV. */
/** This command allows a client to enable the EVSE to charge an EV, */
timed command EnableCharging(EnableChargingRequest): DefaultSuccess = 2;
/** Allows a client to enable the EVSE to discharge an EV. */
/** Upon receipt, this SHALL allow a client to enable the discharge of an EV, */
timed command EnableDischarging(EnableDischargingRequest): DefaultSuccess = 3;
/** Allows a client to put the EVSE into a self-diagnostics mode. */
timed command StartDiagnostics(): DefaultSuccess = 4;
/** Allows a client to set the user specified charging targets. */
timed command SetTargets(SetTargetsRequest): DefaultSuccess = 5;
/** Allows a client to retrieve the user specified charging targets. */
/** Allows a client to retrieve the current set of charging targets. */
timed command GetTargets(): GetTargetsResponse = 6;
/** Allows a client to clear all stored charging targets. */
timed command ClearTargets(): DefaultSuccess = 7;
Expand Down
3 changes: 2 additions & 1 deletion examples/chip-tool/commands/common/RemoteDataModelLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ CHIP_ERROR LogDiscoveredNodeData(const chip::Dnssd::CommissionNodeData & nodeDat
value["rotatingIdLen"] = static_cast<uint64_t>(commissionData.rotatingIdLen);
value["pairingHint"] = commissionData.pairingHint;
value["pairingInstruction"] = commissionData.pairingInstruction;
value["supportsTcp"] = resolutionData.supportsTcp;
value["supportsTcpClient"] = resolutionData.supportsTcpClient;
value["supportsTcpServer"] = resolutionData.supportsTcpServer;
value["port"] = resolutionData.port;
value["numIPs"] = static_cast<uint8_t>(resolutionData.numIPs);

Expand Down
3 changes: 2 additions & 1 deletion examples/chip-tool/commands/discover/Commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ class Resolve : public DiscoverCommand, public chip::AddressResolve::NodeListene
result.mrpRemoteConfig.mIdleRetransTimeout.count());
ChipLogProgress(chipTool, " MRP retry interval (active): %" PRIu32 "ms",
result.mrpRemoteConfig.mActiveRetransTimeout.count());
ChipLogProgress(chipTool, " Supports TCP: %s", result.supportsTcp ? "yes" : "no");
ChipLogProgress(chipTool, " Supports TCP Client: %s", result.supportsTcpClient ? "yes" : "no");
ChipLogProgress(chipTool, " Supports TCP Server: %s", result.supportsTcpServer ? "yes" : "no");
ChipLogProgress(chipTool, " ICD is operating as: %s", result.isICDOperatingAsLIT ? "LIT" : "SIT");
SetCommandExitStatus(CHIP_NO_ERROR);
}
Expand Down
7 changes: 6 additions & 1 deletion examples/contact-sensor-app/nxp/k32w/k32w0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -730,9 +730,14 @@ Please see more in the
Here is an example that generates an OTA image with application update TLV:

```
./scripts/tools/nxp/ota/ota_image_tool.py create -v 0xDEAD -p 0xBEEF -vn 42021 -vs "1.0" -da sha256 --app-input-file chip-k32w0x-contact-example.bin chip-k32w0x-contact-example.ota
./scripts/tools/nxp/ota/ota_image_tool.py create -v 0xDEAD -p 0xBEEF -vn 2 -vs "2.0" -da sha256 --enc_enable --input_ota_key "1234567890ABCDEFA1B2C3D4E5F6F1B4" --app-input-file chip-k32w0x-contact-example.bin chip-k32w0x-contact-example.ota
```

Please note the two options `--enc_enable` and `--input_ota_key`, which are
mandatory when `chip_with_ota_encryption=1`. The value of `--input_ota_key` must
match the value of `chip_with_ota_key`. See `args.gni` for the default gn
configuration.

A note regarding OTA image header version (`-vn` option). An application binary
has its own software version, given by
`CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION` (`42020` by default), which can be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1651,7 +1651,7 @@ provisional cluster DeviceEnergyManagement = 152 {

/** Electric Vehicle Supply Equipment (EVSE) is equipment used to charge an Electric Vehicle (EV) or Plug-In Hybrid Electric Vehicle. This cluster provides an interface to the functionality of Electric Vehicle Supply Equipment (EVSE) management. */
cluster EnergyEvse = 153 {
revision 2;
revision 4;

enum EnergyTransferStoppedReasonEnum : enum8 {
kEVStopped = 0;
Expand Down Expand Up @@ -1695,6 +1695,7 @@ cluster EnergyEvse = 153 {
kDischargingEnabled = 2;
kDisabledError = 3;
kDisabledDiagnostics = 4;
kEnabled = 5;
}

bitmap Feature : bitmap32 {
Expand Down Expand Up @@ -1742,13 +1743,15 @@ cluster EnergyEvse = 153 {
int32u sessionID = 0;
StateEnum state = 1;
amperage_ma maximumCurrent = 2;
optional amperage_ma maximumDischargeCurrent = 3;
}

info event EnergyTransferStopped = 3 {
int32u sessionID = 0;
StateEnum state = 1;
EnergyTransferStoppedReasonEnum reason = 2;
energy_mwh energyTransferred = 4;
optional energy_mwh energyDischarged = 5;
}

critical event Fault = 4 {
Expand Down Expand Up @@ -1813,15 +1816,15 @@ cluster EnergyEvse = 153 {

/** Allows a client to disable the EVSE from charging and discharging. */
timed command Disable(): DefaultSuccess = 1;
/** Allows a client to enable the EVSE to charge an EV. */
/** This command allows a client to enable the EVSE to charge an EV, */
timed command EnableCharging(EnableChargingRequest): DefaultSuccess = 2;
/** Allows a client to enable the EVSE to discharge an EV. */
/** Upon receipt, this SHALL allow a client to enable the discharge of an EV, */
timed command EnableDischarging(EnableDischargingRequest): DefaultSuccess = 3;
/** Allows a client to put the EVSE into a self-diagnostics mode. */
timed command StartDiagnostics(): DefaultSuccess = 4;
/** Allows a client to set the user specified charging targets. */
timed command SetTargets(SetTargetsRequest): DefaultSuccess = 5;
/** Allows a client to retrieve the user specified charging targets. */
/** Allows a client to retrieve the current set of charging targets. */
timed command GetTargets(): GetTargetsResponse = 6;
/** Allows a client to clear all stored charging targets. */
timed command ClearTargets(): DefaultSuccess = 7;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ CHIP_ERROR LogDiscoveredNodeData(const chip::Dnssd::CommissionNodeData & nodeDat
value["rotatingIdLen"] = static_cast<uint64_t>(commissionData.rotatingIdLen);
value["pairingHint"] = commissionData.pairingHint;
value["pairingInstruction"] = commissionData.pairingInstruction;
value["supportsTcp"] = resolutionData.supportsTcp;
value["supportsTcpClient"] = resolutionData.supportsTcpClient;
value["supportsTcpServer"] = resolutionData.supportsTcpServer;
value["port"] = resolutionData.port;
value["numIPs"] = static_cast<uint8_t>(resolutionData.numIPs);

Expand Down
Loading

0 comments on commit 4d692bb

Please sign in to comment.