Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add oven opstate yaml #31557

Merged
merged 106 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
e2256cf
Adding OvenOpState test scripts and ciTests.json file
prakashece Dec 7, 2023
7d18b18
Restyled by whitespace
restyled-commits Dec 7, 2023
2dfffeb
Restyled by prettier-json
restyled-commits Dec 7, 2023
a37a1dc
Restyled by prettier-yaml
restyled-commits Dec 7, 2023
23ba658
Restyled by autopep8
restyled-commits Dec 7, 2023
698eb4d
added OvenOpstate2_4 and updated other files
prakashece Dec 18, 2023
14f10b4
Delete src/app/tests/suites/certification/Test_TC_OVENOPSTATE_1_1.yml
prakashece Dec 18, 2023
5f8d6f7
Delete src/app/tests/suites/certification/Test_TC_OVENOPSTATE_2_2.yml
prakashece Dec 18, 2023
416103f
Restyled by whitespace
restyled-commits Dec 18, 2023
8388dca
Restyled by prettier-json
restyled-commits Dec 18, 2023
00ec6a0
Restyled by prettier-yaml
restyled-commits Dec 18, 2023
fa8d493
Merge branch 'add-oven-opstate-yaml' of https://github.com/prakashece…
prakashece Dec 18, 2023
8beee5e
updated test scripts
prakashece Dec 20, 2023
cc5a157
updated Test_TC_OVENOPSTATE_2_2.yaml
prakashece Dec 20, 2023
e76b771
Restyled by prettier-yaml
restyled-commits Dec 20, 2023
0907c00
updated yamls and ran zap regen
prakashece Jan 9, 2024
65ef6b3
Restyled by isort
restyled-commits Jan 9, 2024
bc0bf59
Merge branch 'master' into add-oven-opstate-yaml
prakashece Jan 9, 2024
5a76f8e
Restyled by isort
restyled-commits Jan 9, 2024
688d9b2
Merge branch 'master' into add-oven-opstate-yaml
prakashece Jan 9, 2024
18353b6
updated __init__.py
prakashece Jan 11, 2024
d92bd5e
updated init.py
prakashece Jan 15, 2024
944019e
Merge branch 'master' into add-oven-opstate-yaml
prakashece Jan 15, 2024
9b21400
updated citests and mannual tests
prakashece Jan 16, 2024
da5cd70
updated python scripts
prakashece Jan 16, 2024
9bf2070
Restyled by autopep8
restyled-commits Jan 16, 2024
b22f46c
Merge branch 'master' into add-oven-opstate-yaml
prakashece Jan 16, 2024
604b09a
updated step3 to automated test in 2_2
prakashece Jan 17, 2024
83b968a
updated citests.json
prakashece Jan 17, 2024
163c810
updated Tests and ciTest file
prakashece Jan 17, 2024
5125716
Merge branch 'master' into add-oven-opstate-yaml
prakashece Jan 17, 2024
83016e2
Revert "updated Tests and ciTest file"
beckerzito Jan 18, 2024
9f6f90c
Merge branch 'master' into add-oven-opstate-yaml
beckerzito Jan 19, 2024
9aecda4
updated according review
beckerzito Jan 19, 2024
b057c11
zap regen
beckerzito Jan 19, 2024
0121f7e
Revert "zap regen"
beckerzito Jan 19, 2024
76bcc49
removed zap gen
beckerzito Jan 19, 2024
2e0f6ca
revert zap gen
beckerzito Jan 19, 2024
f4fab6d
Merge branch 'master' into add-oven-opstate-yaml
beckerzito Jan 19, 2024
28cab2c
Fix opstate pics
beckerzito Jan 19, 2024
d67d9e5
Updated commands
beckerzito Jan 19, 2024
ac8492d
Merge branch 'master' into add-oven-opstate-yaml
beckerzito Jan 19, 2024
611843a
Fix white space
beckerzito Jan 19, 2024
7220ce5
Merge branch 'master' into add-oven-opstate-yaml
beckerzito Jan 20, 2024
939c969
fix for PR
beckerzito Jan 20, 2024
886f931
Update commands
beckerzito Jan 20, 2024
24d9dca
fixes PR
beckerzito Jan 22, 2024
ffe1fa1
fix
beckerzito Jan 22, 2024
c14598a
fix test cases
beckerzito Jan 22, 2024
8ed4160
Restyled by prettier-yaml
restyled-commits Jan 22, 2024
3319832
fixed place for test case
beckerzito Jan 22, 2024
301b7c3
Merge branch 'master' into add-oven-opstate-yaml
beckerzito Jan 22, 2024
643b4b7
fixed test json
beckerzito Jan 22, 2024
b94a8d2
zap regen
beckerzito Jan 22, 2024
483ff17
added Ovenopstate2_2 and 2_5 yaml and python files. Also some associa…
prakashece Feb 1, 2024
3e77228
Merge branch 'master' into add-oven-opstate-yaml
beckerzito Feb 6, 2024
d3b27e7
Removed YAML test
beckerzito Feb 6, 2024
a246444
added python tests
beckerzito Feb 6, 2024
938dadf
Updated zap all cluster app
beckerzito Feb 6, 2024
06dbc6c
improvements opstte 1_1
beckerzito Feb 7, 2024
f9f5577
improvement base code
beckerzito Feb 7, 2024
11ce332
update example app
beckerzito Feb 7, 2024
fb80b6b
improvements on ovenopstate
beckerzito Feb 7, 2024
ee21dba
ci pics update
beckerzito Feb 7, 2024
5ec0d00
ci pics updates
beckerzito Feb 7, 2024
524c9a4
fix matter testing support
beckerzito Feb 7, 2024
828433e
improvements on test cases
beckerzito Feb 9, 2024
72ab5cf
Adding commads for example app
beckerzito Feb 9, 2024
36be39d
Merge branch 'master' into add-oven-opstate-yaml
beckerzito Feb 9, 2024
36540cd
added TC 2.2 to the base test
beckerzito Feb 11, 2024
48639fa
enabled all tests for oven cavity opstate
beckerzito Feb 11, 2024
1de7948
added app id to the CI parameters
beckerzito Feb 11, 2024
8268334
Blocking start when in fault
beckerzito Feb 11, 2024
14daf27
added tests for CI
beckerzito Feb 11, 2024
3235e90
Fix lints
beckerzito Feb 12, 2024
199d72e
Added test 2.3
beckerzito Feb 12, 2024
51e056e
Updated business rules on application
beckerzito Feb 12, 2024
2d54422
Added app pid parameter to mobile test script
beckerzito Feb 12, 2024
0bab3a2
fix pipe
beckerzito Feb 12, 2024
daa5d77
fix lint
beckerzito Feb 12, 2024
d807f5e
Added test 2.4
beckerzito Feb 12, 2024
7fcbf8f
fixed parameter from run python script
beckerzito Feb 12, 2024
530390b
Fixed Lint
beckerzito Feb 12, 2024
8c16b38
Deleted OVENOPSTATE YAMLs
beckerzito Feb 12, 2024
471d587
Fix run python script
beckerzito Feb 12, 2024
cc78d1d
Fix lint
beckerzito Feb 12, 2024
2e85db4
Added opstate test cases
beckerzito Feb 12, 2024
b76fbfe
Fixed opstate app
beckerzito Feb 12, 2024
acc54c3
removed opstate from YAML
beckerzito Feb 12, 2024
fee6488
fixes according test plan update
beckerzito Feb 12, 2024
c363146
Fixed missing test errors
beckerzito Feb 12, 2024
86d6fbf
added countdown behavior to opstate
beckerzito Feb 13, 2024
4609f79
clean up command line linux
beckerzito Feb 13, 2024
d39466a
Added TC 2.5 automated
beckerzito Feb 13, 2024
ed94778
Added OPSTATE and OVENOPSTATE to CI
beckerzito Feb 13, 2024
640d33a
Merge branch 'master' into add-oven-opstate-yaml
beckerzito Feb 13, 2024
c0bbf43
fixed according review
beckerzito Feb 13, 2024
6581ab7
Restyled by whitespace
restyled-commits Feb 13, 2024
018ba5d
Restyled by clang-format
restyled-commits Feb 13, 2024
2bcf892
Restyled by autopep8
restyled-commits Feb 13, 2024
bac8f4e
Restyled by isort
restyled-commits Feb 13, 2024
26ffd94
Merge branch 'master' into add-oven-opstate-yaml
beckerzito Feb 13, 2024
f4c1997
Merge branch 'master' into add-oven-opstate-yaml
beckerzito Feb 14, 2024
261c7cd
Updates according review
beckerzito Feb 14, 2024
23e0eea
Restyled by autopep8
restyled-commits Feb 14, 2024
644a708
Restyled by isort
restyled-commits Feb 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,18 @@ jobs:
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TestMatterTestingSupport.py" --script-args "--trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TestSpecParsingSupport.py" --script-args "--trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_OPSTATE_1_1.py" --script-args "--endpoint 1 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_OPSTATE_2_1.py" --script-args "--endpoint 1 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_OPSTATE_2_2.py" --script-args "--endpoint 1 --int-arg PIXIT.WAITTIME.COUNTDOWN:5 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_OPSTATE_2_3.py" --script-args "--endpoint 1 --int-arg PIXIT.WAITTIME.COUNTDOWN:5 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_OPSTATE_2_4.py" --script-args "--endpoint 1 --int-arg PIXIT.OPSTATE.ErrorEventGen:1 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_OPSTATE_2_5.py" --script-args "--endpoint 1 --int-arg PIXIT.WAITTIME.REBOOT:5 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_OVENOPSTATE_1_1.py" --script-args "--endpoint 1 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_OVENOPSTATE_2_1.py" --script-args "--endpoint 1 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_OVENOPSTATE_2_2.py" --script-args "--endpoint 1 --int-arg PIXIT.WAITTIME.COUNTDOWN:5 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_OVENOPSTATE_2_3.py" --script-args "--endpoint 1 --int-arg PIXIT.WAITTIME.COUNTDOWN:5 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_OVENOPSTATE_2_4.py" --script-args "--endpoint 1 --int-arg PIXIT.OVENOPSTATE.ErrorEventGen:1 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_OVENOPSTATE_2_5.py" --script-args "--endpoint 1 --int-arg PIXIT.WAITTIME.REBOOT:5 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-microwave-oven-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_file json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_MWOCTRL_2_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-microwave-oven-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_file json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_MWOCTRL_2_3.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-microwave-oven-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_file json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_MWOCTRL_2_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7831,8 +7831,11 @@ endpoint 1 {
}

server cluster OvenCavityOperationalState {
emits event OperationalError;
emits event OperationCompletion;
callback attribute phaseList;
callback attribute currentPhase;
callback attribute countdownTime;
callback attribute operationalStateList;
callback attribute operationalState;
callback attribute operationalError;
Expand All @@ -7842,6 +7845,12 @@ endpoint 1 {
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;

handle command Pause;
handle command Stop;
handle command Start;
handle command Resume;
handle command OperationalCommandResponse;
}

server cluster OvenMode {
Expand Down Expand Up @@ -8076,7 +8085,7 @@ endpoint 1 {
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;
ram attribute clusterRevision default = 2;
beckerzito marked this conversation as resolved.
Show resolved Hide resolved

handle command Pause;
handle command Stop;
Expand Down
88 changes: 81 additions & 7 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@
}
],
"package": [
{
"pathRelativity": "relativeToZap",
"path": "../../../src/app/zap-templates/app-templates.json",
"type": "gen-templates-json",
"version": "chip-v1"
},
{
"pathRelativity": "relativeToZap",
"path": "../../../src/app/zap-templates/zcl/zcl-with-test-extensions.json",
"type": "zcl-properties",
"category": "matter",
"version": 1,
"description": "Matter SDK ZCL data with some extensions"
},
{
"pathRelativity": "relativeToZap",
"path": "../../../src/app/zap-templates/app-templates.json",
"type": "gen-templates-json",
"version": "chip-v1"
}
],
"endpointTypes": [
Expand Down Expand Up @@ -8227,6 +8227,48 @@
"side": "server",
"enabled": 1,
"apiMaturity": "provisional",
"commands": [
{
"name": "Pause",
"code": 0,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "Stop",
"code": 1,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "Start",
"code": 2,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "Resume",
"code": 3,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "OperationalCommandResponse",
"code": 4,
"mfgCode": null,
"source": "server",
"isIncoming": 0,
"isEnabled": 1
}
],
"attributes": [
{
"name": "PhaseList",
Expand Down Expand Up @@ -8260,6 +8302,22 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "CountdownTime",
"code": 2,
"mfgCode": null,
"side": "server",
"type": "elapsed_s",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "OperationalStateList",
"code": 3,
Expand Down Expand Up @@ -8404,6 +8462,22 @@
"maxInterval": 65534,
"reportableChange": 0
}
],
"events": [
{
"name": "OperationalError",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1
},
{
"name": "OperationCompletion",
"code": 1,
"mfgCode": null,
"side": "server",
"included": 1
}
]
},
{
Expand Down Expand Up @@ -11175,7 +11249,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"defaultValue": "2",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,15 @@ namespace OperationalState {
class GenericOperationalStateDelegateImpl : public Delegate
{
public:
uint32_t mRunningTime = 0;
uint32_t mPausedTime = 0;
app::DataModel::Nullable<uint32_t> mCountDownTime;

/**
* Get the countdown time. This attribute is not used in this application.
* @return The current countdown time.
*/
app::DataModel::Nullable<uint32_t> GetCountdownTime() override { return {}; };
app::DataModel::Nullable<uint32_t> GetCountdownTime() override;

/**
* Fills in the provided GenericOperationalState with the state at index `index` if there is one,
Expand Down Expand Up @@ -104,11 +108,33 @@ class OperationalStateDelegate : public GenericOperationalStateDelegateImpl
GenericOperationalState(to_underlying(OperationalStateEnum::kError)),
};

const uint32_t kExampleCountDown = 30;

public:
OperationalStateDelegate()
{
GenericOperationalStateDelegateImpl::mOperationalStateList = Span<const GenericOperationalState>(opStateList);
}

/**
* Handle Command Callback in application: Start
* @param[out] get operational error after callback.
*/
void HandleStartStateCallback(GenericOperationalError & err) override
{
mCountDownTime.SetNonNull(static_cast<uint32_t>(kExampleCountDown));
GenericOperationalStateDelegateImpl::HandleStartStateCallback(err);
}

/**
* Handle Command Callback in application: Stop
* @param[out] get operational error after callback.
*/
void HandleStopStateCallback(GenericOperationalError & err) override
{
GenericOperationalStateDelegateImpl::HandleStopStateCallback(err);
mCountDownTime.SetNull();
}
};

Instance * GetOperationalStateInstance();
Expand Down
Loading
Loading