Skip to content

Commit

Permalink
Merge branch 'master' into update_names
Browse files Browse the repository at this point in the history
  • Loading branch information
hicklin authored Aug 1, 2024
2 parents d378b4e + 923619a commit 75a3369
Show file tree
Hide file tree
Showing 151 changed files with 11,667 additions and 2,802 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/chef.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-esp32:66
image: ghcr.io/project-chip/chip-build-esp32:67
options: --user root

steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/examples-esp32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-esp32:66
image: ghcr.io/project-chip/chip-build-esp32:67
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"

Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-esp32:66
image: ghcr.io/project-chip/chip-build-esp32:67
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/qemu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-esp32-qemu:66
image: ghcr.io/project-chip/chip-build-esp32-qemu:67
volumes:
- "/tmp/log_output:/tmp/test_logs"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: ghcr.io/project-chip/chip-build-esp32:66
image: ghcr.io/project-chip/chip-build-esp32:67

steps:
- name: Checkout
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,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_OPSTATE_2_3.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_OPSTATE_2_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_OPSTATE_2_5.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_OPSTATE_2_6.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_OVENOPSTATE_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_OVENOPSTATE_2_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_OVENOPSTATE_2_3.py'
Expand Down
2 changes: 2 additions & 0 deletions docs/tools/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ Source files for these tools are located at `scripts/tools`.
:maxdepth: 1
../scripts/tools/silabs/README
../scripts/tools/silabs/ota/README
../scripts/tools/silabs/factory_data_generator/README
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7151,6 +7151,7 @@ internal cluster UnitTesting = 4294048773 {
SimpleBitmap f = 5;
single g = 6;
double h = 7;
optional TestGlobalEnum i = 8;
}

fabric_scoped struct TestFabricScoped {
Expand Down Expand Up @@ -7183,6 +7184,7 @@ internal cluster UnitTesting = 4294048773 {
int8u a = 0;
boolean b = 1;
SimpleStruct c = 2;
optional TestGlobalStruct d = 3;
}

struct NestedStructList {
Expand Down Expand Up @@ -7268,6 +7270,8 @@ internal cluster UnitTesting = 4294048773 {
timedwrite attribute boolean timedWriteBoolean = 48;
attribute boolean generalErrorBoolean = 49;
attribute boolean clusterErrorBoolean = 50;
attribute TestGlobalEnum globalEnum = 51;
attribute TestGlobalStruct globalStruct = 52;
attribute optional boolean unsupported = 255;
attribute nullable boolean nullableBoolean = 16384;
attribute nullable Bitmap8MaskMap nullableBitmap8 = 16385;
Expand Down Expand Up @@ -7303,6 +7307,8 @@ internal cluster UnitTesting = 4294048773 {
attribute nullable int16u nullableRangeRestrictedInt16u = 16424;
attribute nullable int16s nullableRangeRestrictedInt16s = 16425;
attribute optional int8u writeOnlyInt8u = 16426;
attribute nullable TestGlobalEnum nullableGlobalEnum = 16435;
attribute nullable TestGlobalStruct nullableGlobalStruct = 16436;
attribute int8u meiInt8u = 4294070017;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
Expand Down Expand Up @@ -7454,6 +7460,11 @@ internal cluster UnitTesting = 4294048773 {
SimpleEnum arg2 = 1;
}

response struct GlobalEchoResponse = 14 {
TestGlobalStruct field1 = 0;
TestGlobalEnum field2 = 1;
}

request struct TestNullableOptionalRequestRequest {
optional nullable int8u arg1 = 0;
}
Expand Down Expand Up @@ -7507,6 +7518,11 @@ internal cluster UnitTesting = 4294048773 {
octet_string payload = 0;
}

request struct GlobalEchoRequestRequest {
TestGlobalStruct field1 = 0;
TestGlobalEnum field2 = 1;
}

request struct TestDifferentVendorMeiRequestRequest {
int8u arg1 = 0;
}
Expand Down Expand Up @@ -7590,6 +7606,9 @@ internal cluster UnitTesting = 4294048773 {
the string back. If the string is large then it would require a session that
supports large payloads. */
command StringEchoRequest(StringEchoRequestRequest): StringEchoResponse = 24;
/** Command that takes arguments that are global structs/enums and the
response just echoes them back. */
command GlobalEchoRequest(GlobalEchoRequestRequest): GlobalEchoResponse = 25;
/** Command having a different MEI vendor ID than the cluster. Also emits TestDifferentVendorMeiEvent. */
command TestDifferentVendorMeiRequest(TestDifferentVendorMeiRequestRequest): TestDifferentVendorMeiResponse = 4294049962;
}
Expand Down Expand Up @@ -9485,6 +9504,8 @@ endpoint 1 {
ram attribute timedWriteBoolean;
callback attribute generalErrorBoolean;
callback attribute clusterErrorBoolean;
ram attribute globalEnum;
callback attribute globalStruct;
ram attribute nullableBoolean default = false;
ram attribute nullableBitmap8 default = 0;
ram attribute nullableBitmap16 default = 0;
Expand Down Expand Up @@ -9519,6 +9540,8 @@ endpoint 1 {
ram attribute nullableRangeRestrictedInt16u default = 200;
ram attribute nullableRangeRestrictedInt16s default = -100;
callback attribute writeOnlyInt8u default = 0;
ram attribute nullableGlobalEnum;
callback attribute nullableGlobalStruct;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;
ram attribute meiInt8u default = 0;
Expand All @@ -9544,6 +9567,7 @@ endpoint 1 {
handle command TestListInt8UReverseRequest;
handle command StringEchoResponse;
handle command TestEnumsRequest;
handle command GlobalEchoResponse;
handle command TestNullableOptionalRequest;
handle command SimpleStructEchoRequest;
handle command TimedInvokeRequest;
Expand All @@ -9553,6 +9577,7 @@ endpoint 1 {
handle command TestBatchHelperRequest;
handle command TestSecondBatchHelperRequest;
handle command StringEchoRequest;
handle command GlobalEchoRequest;
handle command TestDifferentVendorMeiRequest;
handle command TestDifferentVendorMeiResponse;
}
Expand Down
80 changes: 80 additions & 0 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -22341,6 +22341,14 @@
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "GlobalEchoResponse",
"code": 14,
"mfgCode": null,
"source": "server",
"isIncoming": 0,
"isEnabled": 1
},
{
"name": "TestNullableOptionalRequest",
"code": 15,
Expand Down Expand Up @@ -22413,6 +22421,14 @@
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "GlobalEchoRequest",
"code": 25,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "TestDifferentVendorMeiRequest",
"code": 4294049962,
Expand Down Expand Up @@ -23183,6 +23199,38 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "global_enum",
"code": 51,
"mfgCode": null,
"side": "server",
"type": "TestGlobalEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "global_struct",
"code": 52,
"mfgCode": null,
"side": "server",
"type": "TestGlobalStruct",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "nullable_boolean",
"code": 16384,
Expand Down Expand Up @@ -23727,6 +23775,38 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "nullable_global_enum",
"code": 16435,
"mfgCode": null,
"side": "server",
"type": "TestGlobalEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "nullable_global_struct",
"code": 16436,
"mfgCode": null,
"side": "server",
"type": "TestGlobalStruct",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ class OperationalStateDelegate : public GenericOperationalStateDelegateImpl
};

Instance * GetOperationalStateInstance();
OperationalStateDelegate * GetOperationalStateDelegate();

void Shutdown();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ void GenericOperationalStateDelegateImpl::HandlePauseStateCallback(GenericOperat
auto error = GetInstance()->SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kPaused));
if (error == CHIP_NO_ERROR)
{
GetInstance()->UpdateCountdownTimeFromDelegate();
err.Set(to_underlying(ErrorStateEnum::kNoError));
}
else
Expand All @@ -73,6 +74,7 @@ void GenericOperationalStateDelegateImpl::HandleResumeStateCallback(GenericOpera
auto error = GetInstance()->SetOperationalState(to_underlying(OperationalStateEnum::kRunning));
if (error == CHIP_NO_ERROR)
{
GetInstance()->UpdateCountdownTimeFromDelegate();
err.Set(to_underlying(ErrorStateEnum::kNoError));
}
else
Expand All @@ -96,6 +98,7 @@ void GenericOperationalStateDelegateImpl::HandleStartStateCallback(GenericOperat
auto error = GetInstance()->SetOperationalState(to_underlying(OperationalStateEnum::kRunning));
if (error == CHIP_NO_ERROR)
{
GetInstance()->UpdateCountdownTimeFromDelegate();
(void) DeviceLayer::SystemLayer().StartTimer(System::Clock::Seconds16(1), onOperationalStateTimerTick, this);
err.Set(to_underlying(ErrorStateEnum::kNoError));
}
Expand All @@ -113,6 +116,8 @@ void GenericOperationalStateDelegateImpl::HandleStopStateCallback(GenericOperati
{
(void) DeviceLayer::SystemLayer().CancelTimer(onOperationalStateTimerTick, this);

GetInstance()->UpdateCountdownTimeFromDelegate();

OperationalState::GenericOperationalError current_err(to_underlying(OperationalState::ErrorStateEnum::kNoError));
GetInstance()->GetCurrentOperationalError(current_err);

Expand Down Expand Up @@ -152,6 +157,11 @@ static void onOperationalStateTimerTick(System::Layer * systemLayer, void * data
delegate->mPausedTime++;
}
}
else if (!countdown_time.IsNull() && countdown_time.Value() <= 0)
{
OperationalState::GenericOperationalError noError(to_underlying(OperationalState::ErrorStateEnum::kNoError));
delegate->HandleStopStateCallback(noError);
}

if (state == OperationalState::OperationalStateEnum::kRunning || state == OperationalState::OperationalStateEnum::kPaused)
{
Expand All @@ -173,6 +183,11 @@ OperationalState::Instance * OperationalState::GetOperationalStateInstance()
return gOperationalStateInstance;
}

OperationalStateDelegate * OperationalState::GetOperationalStateDelegate()
{
return gOperationalStateDelegate;
}

void OperationalState::Shutdown()
{
if (gOperationalStateInstance != nullptr)
Expand Down
2 changes: 1 addition & 1 deletion examples/all-clusters-app/cc13x4_26x4/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Ninja to build the executable.
to the GN call.
```
gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"]"
gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"] chip_generate_link_map_file=true"
```
## Programming
Expand Down
8 changes: 7 additions & 1 deletion examples/all-clusters-app/cc13x4_26x4/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ AppTask AppTask::sAppTask;

constexpr EndpointId kNetworkCommissioningEndpointSecondary = 0xFFFE;

#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
void StartTimer(uint32_t aTimeoutMs);
void CancelTimer(void);
#endif

uint8_t sTestEventTriggerEnableKey[TestEventTriggerDelegate::kEnableKeyLength] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff };
Expand All @@ -100,9 +102,9 @@ void InitializeOTARequestor(void)
sDownloader.SetImageProcessorDelegate(&sImageProcessor);
sRequestorUser.Init(&sRequestorCore, &sImageProcessor);
}
#endif

TimerHandle_t sOTAInitTimer = 0;
#endif

// The OTA Init Timer is only started upon the first Thread State Change
// detected if the device is already on a Thread Network, or during the AppTask
Expand Down Expand Up @@ -176,10 +178,12 @@ void DeviceEventCallback(const ChipDeviceEvent * event, intptr_t arg)
#endif
}

#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
void OTAInitTimerEventHandler(TimerHandle_t xTimer)
{
InitializeOTARequestor();
}
#endif

int AppTask::StartAppTask()
{
Expand Down Expand Up @@ -224,6 +228,7 @@ int AppTask::Init()
;
}

#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
// Create FreeRTOS sw timer for OTA timer.
sOTAInitTimer = xTimerCreate("OTAInitTmr", // Just a text name, not used by the RTOS kernel
OTAREQUESTOR_INIT_TIMER_DELAY_MS, // timer period (mS)
Expand All @@ -240,6 +245,7 @@ int AppTask::Init()
{
PLAT_LOG("sOTAInitTimer timer created successfully ");
}
#endif

ret = ThreadStackMgr().InitThreadStack();
if (ret != CHIP_NO_ERROR)
Expand Down
Loading

0 comments on commit 75a3369

Please sign in to comment.