Skip to content

Commit

Permalink
Add ICD shell and make Light-switch LIT ICD
Browse files Browse the repository at this point in the history
  • Loading branch information
mkardous-silabs committed Oct 23, 2024
1 parent 42421c4 commit 2a64b39
Show file tree
Hide file tree
Showing 15 changed files with 397 additions and 89 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3131,8 +3131,21 @@ endpoint 0 {
callback attribute idleModeDuration;
callback attribute activeModeDuration;
callback attribute activeModeThreshold;
ram attribute featureMap default = 0x0000;
callback attribute registeredClients;
callback attribute ICDCounter;
callback attribute clientsSupportedPerFabric;
ram attribute userActiveModeTriggerHint default = 0x1115;
ram attribute userActiveModeTriggerInstruction default = "Power Cycle";
ram attribute operatingMode default = 0;
callback attribute maximumCheckInBackOff;
ram attribute featureMap default = 15;
ram attribute clusterRevision default = 3;

handle command RegisterClient;
handle command RegisterClientResponse;
handle command UnregisterClient;
handle command StayActiveRequest;
handle command StayActiveResponse;
}
}
endpoint 1 {
Expand Down
176 changes: 168 additions & 8 deletions examples/light-switch-app/light-switch-common/light-switch-app.zap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"fileFormat": 2,
"featureLevel": 103,
"featureLevel": 104,
"creator": "zap",
"keyValuePairs": [
{
Expand Down Expand Up @@ -41,14 +41,16 @@
"code": 22,
"profileId": 259,
"label": "MA-rootdevice",
"name": "MA-rootdevice"
"name": "MA-rootdevice",
"deviceTypeOrder": 0
},
"deviceTypes": [
{
"code": 22,
"profileId": 259,
"label": "MA-rootdevice",
"name": "MA-rootdevice"
"name": "MA-rootdevice",
"deviceTypeOrder": 0
}
],
"deviceVersions": [
Expand Down Expand Up @@ -4313,6 +4315,48 @@
"define": "ICD_MANAGEMENT_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [
{
"name": "RegisterClient",
"code": 0,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "RegisterClientResponse",
"code": 1,
"mfgCode": null,
"source": "server",
"isIncoming": 0,
"isEnabled": 1
},
{
"name": "UnregisterClient",
"code": 2,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "StayActiveRequest",
"code": 3,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "StayActiveResponse",
"code": 4,
"mfgCode": null,
"source": "server",
"isIncoming": 0,
"isEnabled": 1
}
],
"attributes": [
{
"name": "IdleModeDuration",
Expand Down Expand Up @@ -4362,6 +4406,118 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "RegisteredClients",
"code": 3,
"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": "ICDCounter",
"code": 4,
"mfgCode": null,
"side": "server",
"type": "int32u",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClientsSupportedPerFabric",
"code": 5,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "UserActiveModeTriggerHint",
"code": 6,
"mfgCode": null,
"side": "server",
"type": "UserActiveModeTriggerBitmap",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x1115",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "UserActiveModeTriggerInstruction",
"code": 7,
"mfgCode": null,
"side": "server",
"type": "char_string",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "Power Cycle",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "OperatingMode",
"code": 8,
"mfgCode": null,
"side": "server",
"type": "OperatingModeEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "MaximumCheckInBackOff",
"code": 9,
"mfgCode": null,
"side": "server",
"type": "int32u",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
Expand All @@ -4372,7 +4528,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0000",
"defaultValue": "15",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -4405,14 +4561,16 @@
"code": 259,
"profileId": 259,
"label": "MA-onofflightswitch",
"name": "MA-onofflightswitch"
"name": "MA-onofflightswitch",
"deviceTypeOrder": 0
},
"deviceTypes": [
{
"code": 259,
"profileId": 259,
"label": "MA-onofflightswitch",
"name": "MA-onofflightswitch"
"name": "MA-onofflightswitch",
"deviceTypeOrder": 0
}
],
"deviceVersions": [
Expand Down Expand Up @@ -5175,14 +5333,16 @@
"code": 15,
"profileId": 259,
"label": "MA-genericswitch",
"name": "MA-genericswitch"
"name": "MA-genericswitch",
"deviceTypeOrder": 0
},
"deviceTypes": [
{
"code": 15,
"profileId": 259,
"label": "MA-genericswitch",
"name": "MA-genericswitch"
"name": "MA-genericswitch",
"deviceTypeOrder": 0
}
],
"deviceVersions": [
Expand Down
13 changes: 8 additions & 5 deletions examples/light-switch-app/silabs/openthread.gni
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@ sl_enable_test_event_trigger = true

# ICD Default configurations
chip_enable_icd_server = true
chip_enable_icd_lit = true
chip_enable_icd_dsls = true

chip_subscription_timeout_resumption = false
sl_use_subscription_syncing = true

# Openthread Configuration flags
sl_ot_idle_interval_ms = 15000 # 15s Idle Intervals
sl_ot_active_interval_ms = 500 # 500ms Active Intervals
sl_ot_idle_interval_ms = 2100000 # 35 minutes Idle Intervals
sl_ot_active_interval_ms = 1000 # 1000ms Active Intervals

# ICD Matter Configuration flags
sl_idle_mode_duration_s = 3600 # 60min Idle Mode Duration
sl_active_mode_duration_ms = 60000 # 60s Active Mode Duration
sl_active_mode_threshold_ms = 1000 # 1s Active Mode Threshold
sl_idle_mode_duration_s = 1800 # 30min Idle Mode Duration
sl_active_mode_duration_ms = 0 # 0s Active Mode Duration
sl_active_mode_threshold_ms = 5000 # 5s Active Mode Threshold
1 change: 1 addition & 0 deletions examples/lit-icd-app/silabs/build_for_wifi_args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ chip_enable_icd_server = true
chip_subscription_timeout_resumption = false
sl_use_subscription_syncing = true
chip_enable_icd_lit = true
chip_enable_icd_dsls = true

# ICD Matter Configuration flags
sl_idle_mode_duration_s = 3600 # 60min Idle Mode Duration
Expand Down
1 change: 1 addition & 0 deletions examples/lit-icd-app/silabs/openthread.gni
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ chip_subscription_timeout_resumption = false
sl_use_subscription_syncing = true
chip_icd_report_on_active_mode = true
chip_enable_icd_lit = true
chip_enable_icd_dsls = true

# Openthread Configuration flags
sl_ot_idle_interval_ms = 3600000 # 60mins Idle Polling Interval
Expand Down
48 changes: 0 additions & 48 deletions examples/lit-icd-app/silabs/src/ShellCommands.cpp

This file was deleted.

Loading

0 comments on commit 2a64b39

Please sign in to comment.