Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion examples/all-clusters-app/linux/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ openthread_project_core_config_file = rebase_path(
get_path_info(
"${chip_root}/third_party/openthread/repo/examples/platforms/simulation/openthread-core-simulation-config.h",
"abspath"))
chip_config_enable_groupcast = true
chip_config_enable_groupcast = false
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,17 @@ CHIP_ERROR RootNodeDevice::Register(EndpointId endpointId, CodeDrivenDataModelPr
ReturnErrorOnFailure(provider.AddCluster(mGroupKeyManagementCluster.Registration()));

#if CHIP_CONFIG_ENABLE_GROUPCAST
mGroupcastCluster.Create(GroupcastContext{ .fabricTable = mContext.fabricTable,
.groupDataProvider = mContext.groupDataProvider,
.timerDelegate = mContext.timerDelegate,
.accessControl = mContext.accessControl },
BitFlags<Clusters::Groupcast::Feature>(Clusters::Groupcast::Feature::kListener,
Clusters::Groupcast::Feature::kSender,
Clusters::Groupcast::Feature::kPerGroup));
ReturnErrorOnFailure(provider.AddCluster(mGroupcastCluster.Registration()));
if (mContext.groupDataProvider.IsGroupcastEnabled())
{
mGroupcastCluster.Create(GroupcastContext{ .fabricTable = mContext.fabricTable,
.groupDataProvider = mContext.groupDataProvider,
.timerDelegate = mContext.timerDelegate,
.accessControl = mContext.accessControl },
BitFlags<Clusters::Groupcast::Feature>(Clusters::Groupcast::Feature::kListener,
Clusters::Groupcast::Feature::kSender,
Clusters::Groupcast::Feature::kPerGroup));
ReturnErrorOnFailure(provider.AddCluster(mGroupcastCluster.Registration()));
}
#endif // CHIP_CONFIG_ENABLE_GROUPCAST

mSoftwareDiagnosticsServerCluster.Create(SoftwareDiagnosticsServerCluster::OptionalAttributeSet{},
Expand Down
6 changes: 6 additions & 0 deletions examples/all-devices-app/posix/app_options/AppOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ constexpr uint16_t kOptionProductId = 0xffd6;
constexpr uint16_t kOptionPort = 0xffd7;
constexpr uint16_t kOptionInterfaceId = 0xffd8;
constexpr uint16_t kOptionBLE = 0xffd9;
constexpr uint16_t kOptionGroupcast = 0xffda;

DeviceTypeParser AppOptions::sParser;
AppOptions::AppConfig AppOptions::mConfig;
Expand Down Expand Up @@ -113,6 +114,10 @@ bool AppOptions::AllDevicesAppOptionHandler(const char * program, OptionSet * op
case kOptionInterfaceId:
mConfig.interfaceId = static_cast<uint32_t>(strtoul(value, nullptr, 0));
return true;
case kOptionGroupcast:
mConfig.enableGroupcast = true;
ChipLogProgress(AppServer, "Groupcast usage enabled");
return true;
default:
ChipLogError(Support, "%s: INTERNAL ERROR: Unhandled option: %s\n", program, name);
return false;
Expand All @@ -137,6 +142,7 @@ OptionSet * AppOptions::GetOptions()
{ "product-id", kArgumentRequired, kOptionProductId },
{ "port", kArgumentRequired, kOptionPort },
{ "interface-id", kArgumentRequired, kOptionInterfaceId },
{ "groupcast", kNoArgument, kOptionGroupcast },
{}, // need empty terminator
};

Expand Down
1 change: 1 addition & 0 deletions examples/all-devices-app/posix/app_options/AppOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class AppOptions
std::optional<uint16_t> productId;
std::optional<uint16_t> port;
std::optional<uint32_t> interfaceId;
bool enableGroupcast = false;
};

static chip::ArgParser::OptionSet * GetOptions();
Expand Down
12 changes: 8 additions & 4 deletions examples/all-devices-app/posix/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,14 @@ void RunApplication(AppMainLoopImplementation * mainLoop = nullptr)
SuccessOrDie(initParams.InitializeStaticResourcesBeforeServerInit());

#if CHIP_CONFIG_ENABLE_GROUPCAST
static chip::Access::Examples::GroupAuxiliaryAccessControlDelegate groupAuxDelegate(&gGroupDataProvider,
&Server::GetInstance().GetFabricTable());
initParams.groupAuxiliaryAccessControlDelegate = &groupAuxDelegate;
gGroupDataProvider.SetGroupcastEnabled(true);
// TODO(#72056): Once groupcast is enabled by default, this should not be dependent on the app argument.
if (AppOptions::GetConfig().enableGroupcast)
{
static chip::Access::Examples::GroupAuxiliaryAccessControlDelegate groupAuxDelegate(
&gGroupDataProvider, &Server::GetInstance().GetFabricTable());
initParams.groupAuxiliaryAccessControlDelegate = &groupAuxDelegate;
gGroupDataProvider.SetGroupcastEnabled(true);
}
#endif // CHIP_CONFIG_ENABLE_GROUPCAST

gGroupDataProvider.SetStorageDelegate(initParams.persistentStorageDelegate);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2398,116 +2398,6 @@ provisional cluster ScenesManagement = 98 {
fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64;
}

/** The Groupcast cluster manages the content of the node-wide multicast Group membership that is part of the underlying interaction layer. */
provisional cluster Groupcast = 101 {
revision 1;

enum GroupcastTestResultEnum : enum8 {
kSuccess = 0;
kGeneralError = 1;
kMessageReplay = 2;
kFailedAuth = 3;
kNoAvailableKey = 4;
kSendFailure = 5;
}

enum GroupcastTestingEnum : enum8 {
kDisableTesting = 0;
kEnableListenerTesting = 1;
kEnableSenderTesting = 2;
}

enum MulticastAddrPolicyEnum : enum8 {
kIanaAddr = 0;
kPerGroup = 1;
}

bitmap Feature : bitmap32 {
kListener = 0x1;
kSender = 0x2;
kPerGroup = 0x4;
}

fabric_scoped struct MembershipStruct {
group_id groupID = 0;
optional endpoint_no endpoints[] = 1;
fabric_sensitive int16u keySetID = 2;
optional boolean hasAuxiliaryACL = 3;
MulticastAddrPolicyEnum mcastAddrPolicy = 4;
fabric_idx fabricIndex = 254;
}

provisional fabric_sensitive info event access(read: administer) GroupcastTesting = 0 {
optional octet_string sourceIpAddress = 0;
optional octet_string destinationIpAddress = 1;
optional group_id groupID = 2;
optional endpoint_no endpointID = 3;
optional cluster_id clusterID = 4;
optional int32u elementID = 5;
optional boolean accessAllowed = 6;
GroupcastTestResultEnum groupcastTestResult = 7;
fabric_idx fabricIndex = 254;
}

provisional readonly attribute MembershipStruct membership[] = 0;
provisional readonly attribute int16u maxMembershipCount = 1;
provisional readonly attribute int16u maxMcastAddrCount = 2;
provisional readonly attribute int16u usedMcastAddrCount = 3;
provisional readonly attribute fabric_idx fabricUnderTest = 4;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

request struct JoinGroupRequest {
group_id groupID = 0;
endpoint_no endpoints[] = 1;
int16u keySetID = 2;
optional octet_string<16> key = 3;
optional boolean useAuxiliaryACL = 4;
optional boolean replaceEndpoints = 5;
optional MulticastAddrPolicyEnum mcastAddrPolicy = 6;
}

request struct LeaveGroupRequest {
group_id groupID = 0;
optional endpoint_no endpoints[] = 1;
}

response struct LeaveGroupResponse = 2 {
group_id groupID = 0;
endpoint_no endpoints[] = 1;
}

request struct UpdateGroupKeyRequest {
group_id groupID = 0;
int16u keySetID = 1;
optional octet_string<16> key = 2;
}

request struct ConfigureAuxiliaryACLRequest {
group_id groupID = 0;
boolean useAuxiliaryACL = 1;
}

request struct GroupcastTestingRequest {
GroupcastTestingEnum testOperation = 0;
optional int16u durationSeconds = 1;
}

/** This command SHALL be used to instruct the server to join a multicast group. */
fabric command access(invoke: manage) JoinGroup(JoinGroupRequest): DefaultSuccess = 0;
/** This command SHALL allow a maintainer to request that the server withdraws itself or specific endpoints from a specific group or from all groups of this client's fabric. */
fabric command access(invoke: manage) LeaveGroup(LeaveGroupRequest): LeaveGroupResponse = 1;
/** This command SHALL allow a fabric administrator to update the OperationalGroupKey associated with the existing group identified by GroupID, which is already joined. */
fabric command access(invoke: manage) UpdateGroupKey(UpdateGroupKeyRequest): DefaultSuccess = 3;
/** This command SHALL allow an Administrator to enable or disable the generation of AuxiliaryACL entries in the Access Control Cluster based on the groups joined (see Groupcast Auxiliary ACL Handling). */
fabric command access(invoke: administer) ConfigureAuxiliaryACL(ConfigureAuxiliaryACLRequest): DefaultSuccess = 4;
/** This command SHALL allow an Administrator to configure test modes that allow validation of Groupcast communication. */
fabric command access(invoke: administer) GroupcastTesting(GroupcastTestingRequest): DefaultSuccess = 5;
}

/** Attributes and commands for controlling the color properties of a color-capable light. */
cluster ColorControl = 768 {
revision 9;
Expand Down Expand Up @@ -3145,26 +3035,6 @@ endpoint 0 {
callback attribute featureMap;
callback attribute clusterRevision;
}

server cluster Groupcast {
emits event GroupcastTesting;
callback attribute membership;
callback attribute maxMembershipCount;
callback attribute maxMcastAddrCount;
callback attribute usedMcastAddrCount;
callback attribute fabricUnderTest;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 1;
callback attribute clusterRevision default = 1;

handle command JoinGroup;
handle command LeaveGroup;
handle command UpdateGroupKey;
handle command ConfigureAuxiliaryACL;
handle command GroupcastTesting;
}
}
endpoint 1 {
device type ma_dimmablelight = 257, version 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3918,7 +3918,7 @@
"mfgCode": null,
"define": "GROUPCAST_CLUSTER",
"side": "server",
"enabled": 1,
"enabled": 0,
"apiMaturity": "provisional",
"commands": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ chip_enable_rotating_device_id = true

chip_enable_read_client = false

chip_config_enable_groupcast = true
chip_config_enable_groupcast = false
130 changes: 0 additions & 130 deletions examples/lighting-app/lighting-common/lighting-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2189,116 +2189,6 @@ cluster UserLabel = 65 {
readonly attribute int16u clusterRevision = 65533;
}

/** The Groupcast cluster manages the content of the node-wide multicast Group membership that is part of the underlying interaction layer. */
provisional cluster Groupcast = 101 {
revision 1;

enum GroupcastTestResultEnum : enum8 {
kSuccess = 0;
kGeneralError = 1;
kMessageReplay = 2;
kFailedAuth = 3;
kNoAvailableKey = 4;
kSendFailure = 5;
}

enum GroupcastTestingEnum : enum8 {
kDisableTesting = 0;
kEnableListenerTesting = 1;
kEnableSenderTesting = 2;
}

enum MulticastAddrPolicyEnum : enum8 {
kIanaAddr = 0;
kPerGroup = 1;
}

bitmap Feature : bitmap32 {
kListener = 0x1;
kSender = 0x2;
kPerGroup = 0x4;
}

fabric_scoped struct MembershipStruct {
group_id groupID = 0;
optional endpoint_no endpoints[] = 1;
fabric_sensitive int16u keySetID = 2;
optional boolean hasAuxiliaryACL = 3;
MulticastAddrPolicyEnum mcastAddrPolicy = 4;
fabric_idx fabricIndex = 254;
}

provisional fabric_sensitive info event access(read: administer) GroupcastTesting = 0 {
optional octet_string sourceIpAddress = 0;
optional octet_string destinationIpAddress = 1;
optional group_id groupID = 2;
optional endpoint_no endpointID = 3;
optional cluster_id clusterID = 4;
optional int32u elementID = 5;
optional boolean accessAllowed = 6;
GroupcastTestResultEnum groupcastTestResult = 7;
fabric_idx fabricIndex = 254;
}

provisional readonly attribute MembershipStruct membership[] = 0;
provisional readonly attribute int16u maxMembershipCount = 1;
provisional readonly attribute int16u maxMcastAddrCount = 2;
provisional readonly attribute int16u usedMcastAddrCount = 3;
provisional readonly attribute fabric_idx fabricUnderTest = 4;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

request struct JoinGroupRequest {
group_id groupID = 0;
endpoint_no endpoints[] = 1;
int16u keySetID = 2;
optional octet_string<16> key = 3;
optional boolean useAuxiliaryACL = 4;
optional boolean replaceEndpoints = 5;
optional MulticastAddrPolicyEnum mcastAddrPolicy = 6;
}

request struct LeaveGroupRequest {
group_id groupID = 0;
optional endpoint_no endpoints[] = 1;
}

response struct LeaveGroupResponse = 2 {
group_id groupID = 0;
endpoint_no endpoints[] = 1;
}

request struct UpdateGroupKeyRequest {
group_id groupID = 0;
int16u keySetID = 1;
optional octet_string<16> key = 2;
}

request struct ConfigureAuxiliaryACLRequest {
group_id groupID = 0;
boolean useAuxiliaryACL = 1;
}

request struct GroupcastTestingRequest {
GroupcastTestingEnum testOperation = 0;
optional int16u durationSeconds = 1;
}

/** This command SHALL be used to instruct the server to join a multicast group. */
fabric command access(invoke: manage) JoinGroup(JoinGroupRequest): DefaultSuccess = 0;
/** This command SHALL allow a maintainer to request that the server withdraws itself or specific endpoints from a specific group or from all groups of this client's fabric. */
fabric command access(invoke: manage) LeaveGroup(LeaveGroupRequest): LeaveGroupResponse = 1;
/** This command SHALL allow a fabric administrator to update the OperationalGroupKey associated with the existing group identified by GroupID, which is already joined. */
fabric command access(invoke: manage) UpdateGroupKey(UpdateGroupKeyRequest): DefaultSuccess = 3;
/** This command SHALL allow an Administrator to enable or disable the generation of AuxiliaryACL entries in the Access Control Cluster based on the groups joined (see Groupcast Auxiliary ACL Handling). */
fabric command access(invoke: administer) ConfigureAuxiliaryACL(ConfigureAuxiliaryACLRequest): DefaultSuccess = 4;
/** This command SHALL allow an Administrator to configure test modes that allow validation of Groupcast communication. */
fabric command access(invoke: administer) GroupcastTesting(GroupcastTestingRequest): DefaultSuccess = 5;
}

/** Attributes and commands for controlling the color properties of a color-capable light. */
cluster ColorControl = 768 {
revision 9;
Expand Down Expand Up @@ -2958,26 +2848,6 @@ endpoint 0 {
callback attribute featureMap;
callback attribute clusterRevision;
}

server cluster Groupcast {
emits event GroupcastTesting;
callback attribute membership;
callback attribute maxMembershipCount;
callback attribute maxMcastAddrCount;
callback attribute usedMcastAddrCount;
callback attribute fabricUnderTest;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 1;
callback attribute clusterRevision default = 1;

handle command JoinGroup;
handle command LeaveGroup;
handle command UpdateGroupKey;
handle command ConfigureAuxiliaryACL;
handle command GroupcastTesting;
}
}
endpoint 1 {
device type ma_colortemperaturelight = 268, version 4;
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/lighting-common/lighting-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -4316,7 +4316,7 @@
"mfgCode": null,
"define": "GROUPCAST_CLUSTER",
"side": "server",
"enabled": 1,
"enabled": 0,
"commands": [
{
"name": "JoinGroup",
Expand Down
Loading
Loading