Skip to content

Commit c53eb71

Browse files
Multicast Prototype: EXPERIMENTAL.
1 parent 7dfd606 commit c53eb71

File tree

77 files changed

+6947
-192
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+6947
-192
lines changed

docs/ids_and_codes/zap_clusters.md

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ Generally regenerate using one of:
7171
| 96 | 0x60 | OperationalState |
7272
| 97 | 0x61 | RvcOperationalState |
7373
| 98 | 0x62 | ScenesManagement |
74+
| 100 | 0x64 | Multicast |
7475
| 113 | 0x71 | HepaFilterMonitoring |
7576
| 114 | 0x72 | ActivatedCarbonFilterMonitoring |
7677
| 128 | 0x80 | BooleanStateConfiguration |

examples/chip-tool/commands/common/CHIPCommand.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
#include <commands/icd/ICDCommand.h>
2222
#include <controller/CHIPDeviceControllerFactory.h>
23+
#include <credentials/MulticastDataProvider.h>
2324
#include <credentials/attestation_verifier/FileAttestationTrustStore.h>
2425
#include <credentials/attestation_verifier/TestDACRevocationDelegateImpl.h>
2526
#include <data-model-providers/codegen/Instance.h>
@@ -150,6 +151,7 @@ CHIP_ERROR CHIPCommand::MaybeSetUpStack()
150151
ReturnLogErrorOnFailure(sGroupDataProvider.Init());
151152
chip::Credentials::SetGroupDataProvider(&sGroupDataProvider);
152153
factoryInitParams.groupDataProvider = &sGroupDataProvider;
154+
chip::Multicast::DataProvider::Instance().Initialize(&mDefaultStorage, factoryInitParams.sessionKeystore);
153155

154156
uint16_t port = mDefaultStorage.GetListenPort();
155157
if (port != 0)

examples/lighting-app/silabs/data_model/lighting-thread-app.matter

+53
Original file line numberDiff line numberDiff line change
@@ -1976,6 +1976,47 @@ provisional cluster ScenesManagement = 98 {
19761976
fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64;
19771977
}
19781978

1979+
/** The Multicast Cluster. */
1980+
cluster Multicast = 100 {
1981+
revision 1; // NOTE: Default/not specifically set
1982+
1983+
bitmap Feature : bitmap32 {
1984+
kCacheAndSync = 0x1;
1985+
}
1986+
1987+
fabric_scoped struct MulticastTargetStruct {
1988+
group_id groupId = 1;
1989+
endpoint_no endpoints[] = 2;
1990+
fabric_idx fabricIndex = 254;
1991+
}
1992+
1993+
attribute access(write: manage) MulticastTargetStruct targets[] = 0;
1994+
readonly attribute command_id generatedCommandList[] = 65528;
1995+
readonly attribute command_id acceptedCommandList[] = 65529;
1996+
readonly attribute event_id eventList[] = 65530;
1997+
readonly attribute attrib_id attributeList[] = 65531;
1998+
readonly attribute bitmap32 featureMap = 65532;
1999+
readonly attribute int16u clusterRevision = 65533;
2000+
2001+
request struct SetTargetRequest {
2002+
group_id groupId = 0;
2003+
endpoint_no endpoints[] = 1;
2004+
octet_string<16> key = 2;
2005+
int32u gracePeriod = 3;
2006+
}
2007+
2008+
request struct RemoveTargetRequest {
2009+
group_id groupId = 0;
2010+
endpoint_no endpoints[] = 1;
2011+
int32u gracePeriod = 2;
2012+
}
2013+
2014+
/** Set a multicast target. */
2015+
fabric command access(invoke: administer) SetTarget(SetTargetRequest): DefaultSuccess = 0;
2016+
/** Set a multicast target. */
2017+
fabric command access(invoke: administer) RemoveTarget(RemoveTargetRequest): DefaultSuccess = 1;
2018+
}
2019+
19792020
/** Attributes and commands for controlling the color properties of a color-capable light. */
19802021
cluster ColorControl = 768 {
19812022
revision 7;
@@ -2549,6 +2590,18 @@ endpoint 0 {
25492590
handle command KeySetReadAllIndices;
25502591
handle command KeySetReadAllIndicesResponse;
25512592
}
2593+
2594+
server cluster Multicast {
2595+
callback attribute targets;
2596+
callback attribute generatedCommandList;
2597+
callback attribute acceptedCommandList;
2598+
callback attribute attributeList;
2599+
ram attribute featureMap default = 0;
2600+
ram attribute clusterRevision default = 1;
2601+
2602+
handle command SetTarget;
2603+
handle command RemoveTarget;
2604+
}
25522605
}
25532606
endpoint 1 {
25542607
device type ma_extendedcolorlight = 269, version 1;

examples/lighting-app/silabs/data_model/lighting-thread-app.zap

+140
Original file line numberDiff line numberDiff line change
@@ -3095,6 +3095,146 @@
30953095
"reportableChange": 0
30963096
}
30973097
]
3098+
},
3099+
{
3100+
"name": "Multicast",
3101+
"code": 100,
3102+
"mfgCode": null,
3103+
"define": "MULTICAST_CLUSTER",
3104+
"side": "server",
3105+
"enabled": 1,
3106+
"commands": [
3107+
{
3108+
"name": "SetTarget",
3109+
"code": 0,
3110+
"mfgCode": null,
3111+
"source": "client",
3112+
"isIncoming": 1,
3113+
"isEnabled": 1
3114+
},
3115+
{
3116+
"name": "RemoveTarget",
3117+
"code": 1,
3118+
"mfgCode": null,
3119+
"source": "client",
3120+
"isIncoming": 1,
3121+
"isEnabled": 1
3122+
}
3123+
],
3124+
"attributes": [
3125+
{
3126+
"name": "Target",
3127+
"code": 0,
3128+
"mfgCode": null,
3129+
"side": "server",
3130+
"type": "array",
3131+
"included": 1,
3132+
"storageOption": "External",
3133+
"singleton": 0,
3134+
"bounded": 0,
3135+
"defaultValue": null,
3136+
"reportable": 1,
3137+
"minInterval": 1,
3138+
"maxInterval": 65534,
3139+
"reportableChange": 0
3140+
},
3141+
{
3142+
"name": "GeneratedCommandList",
3143+
"code": 65528,
3144+
"mfgCode": null,
3145+
"side": "server",
3146+
"type": "array",
3147+
"included": 1,
3148+
"storageOption": "External",
3149+
"singleton": 0,
3150+
"bounded": 0,
3151+
"defaultValue": null,
3152+
"reportable": 1,
3153+
"minInterval": 1,
3154+
"maxInterval": 65534,
3155+
"reportableChange": 0
3156+
},
3157+
{
3158+
"name": "AcceptedCommandList",
3159+
"code": 65529,
3160+
"mfgCode": null,
3161+
"side": "server",
3162+
"type": "array",
3163+
"included": 1,
3164+
"storageOption": "External",
3165+
"singleton": 0,
3166+
"bounded": 0,
3167+
"defaultValue": null,
3168+
"reportable": 1,
3169+
"minInterval": 1,
3170+
"maxInterval": 65534,
3171+
"reportableChange": 0
3172+
},
3173+
{
3174+
"name": "EventList",
3175+
"code": 65530,
3176+
"mfgCode": null,
3177+
"side": "server",
3178+
"type": "array",
3179+
"included": 1,
3180+
"storageOption": "External",
3181+
"singleton": 0,
3182+
"bounded": 0,
3183+
"defaultValue": null,
3184+
"reportable": 1,
3185+
"minInterval": 1,
3186+
"maxInterval": 65534,
3187+
"reportableChange": 0
3188+
},
3189+
{
3190+
"name": "AttributeList",
3191+
"code": 65531,
3192+
"mfgCode": null,
3193+
"side": "server",
3194+
"type": "array",
3195+
"included": 1,
3196+
"storageOption": "External",
3197+
"singleton": 0,
3198+
"bounded": 0,
3199+
"defaultValue": null,
3200+
"reportable": 1,
3201+
"minInterval": 1,
3202+
"maxInterval": 65534,
3203+
"reportableChange": 0
3204+
},
3205+
{
3206+
"name": "FeatureMap",
3207+
"code": 65532,
3208+
"mfgCode": null,
3209+
"side": "server",
3210+
"type": "bitmap32",
3211+
"included": 1,
3212+
"storageOption": "RAM",
3213+
"singleton": 0,
3214+
"bounded": 0,
3215+
"defaultValue": "0",
3216+
"reportable": 1,
3217+
"minInterval": 1,
3218+
"maxInterval": 65534,
3219+
"reportableChange": 0
3220+
},
3221+
{
3222+
"name": "ClusterRevision",
3223+
"code": 65533,
3224+
"mfgCode": null,
3225+
"side": "server",
3226+
"type": "int16u",
3227+
"included": 1,
3228+
"storageOption": "RAM",
3229+
"singleton": 0,
3230+
"bounded": 0,
3231+
"defaultValue": "1",
3232+
"reportable": 1,
3233+
"minInterval": 1,
3234+
"maxInterval": 65534,
3235+
"reportableChange": 0
3236+
}
3237+
]
30983238
}
30993239
]
31003240
},

scripts/tools/zap/tests/outputs/lighting-app/app-templates/gen_config.h

+2
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
#define MATTER_DM_OPERATIONAL_STATE_CLUSTER_SERVER_ENDPOINT_COUNT (0)
8181
#define MATTER_DM_OPERATIONAL_STATE_RVC_CLUSTER_SERVER_ENDPOINT_COUNT (0)
8282
#define MATTER_DM_SCENES_CLUSTER_SERVER_ENDPOINT_COUNT (1)
83+
#define MATTER_DM_MULTICAST_CLUSTER_SERVER_ENDPOINT_COUNT (0)
8384
#define MATTER_DM_HEPA_FILTER_MONITORING_CLUSTER_SERVER_ENDPOINT_COUNT (0)
8485
#define MATTER_DM_ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER_SERVER_ENDPOINT_COUNT (0)
8586
#define MATTER_DM_BOOLEAN_STATE_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (0)
@@ -212,6 +213,7 @@
212213
#define MATTER_DM_OPERATIONAL_STATE_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
213214
#define MATTER_DM_OPERATIONAL_STATE_RVC_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
214215
#define MATTER_DM_SCENES_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
216+
#define MATTER_DM_MULTICAST_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
215217
#define MATTER_DM_HEPA_FILTER_MONITORING_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
216218
#define MATTER_DM_ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
217219
#define MATTER_DM_BOOLEAN_STATE_CONFIGURATION_CLUSTER_CLIENT_ENDPOINT_COUNT (0)

0 commit comments

Comments
 (0)