Skip to content

Commit

Permalink
Add TBRM cluster to placeholder app1 (#35362)
Browse files Browse the repository at this point in the history
Fixes #35330
  • Loading branch information
ksperling-apple authored and pull[bot] committed Nov 28, 2024
1 parent abf7e2b commit 2449554
Show file tree
Hide file tree
Showing 4 changed files with 396 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/placeholder/linux/apps/app1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ source_set("app1") {
"../../resource-monitoring-delegates.cpp",
"../../src/bridged-actions-stub.cpp",
"../../static-supported-modes-manager.cpp",
"../../thread-border-router-management.cpp",
]

public_deps = [ ":configuration" ]
Expand Down
65 changes: 65 additions & 0 deletions examples/placeholder/linux/apps/app1/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -6716,6 +6716,50 @@ cluster OccupancySensing = 1030 {
readonly attribute int16u clusterRevision = 65533;
}

/** Manage the Thread network of Thread Border Router */
provisional cluster ThreadBorderRouterManagement = 1106 {
revision 1;

bitmap Feature : bitmap32 {
kPANChange = 0x1;
}

provisional readonly attribute char_string<63> borderRouterName = 0;
provisional readonly attribute octet_string<254> borderAgentID = 1;
provisional readonly attribute int16u threadVersion = 2;
provisional readonly attribute boolean interfaceEnabled = 3;
provisional readonly attribute nullable int64u activeDatasetTimestamp = 4;
provisional readonly attribute nullable int64u pendingDatasetTimestamp = 5;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

response struct DatasetResponse = 2 {
octet_string<254> dataset = 0;
}

request struct SetActiveDatasetRequestRequest {
octet_string<254> activeDataset = 0;
optional int64u breadcrumb = 1;
}

request struct SetPendingDatasetRequestRequest {
octet_string<254> pendingDataset = 0;
}

/** Command to request the active operational dataset of the Thread network to which the border router is connected. This command must be sent over a valid CASE session */
command access(invoke: manage) GetActiveDatasetRequest(): DatasetResponse = 0;
/** Command to request the pending dataset of the Thread network to which the border router is connected. This command must be sent over a valid CASE session */
command access(invoke: manage) GetPendingDatasetRequest(): DatasetResponse = 1;
/** Command to set or update the active Dataset of the Thread network to which the Border Router is connected. */
command access(invoke: manage) SetActiveDatasetRequest(SetActiveDatasetRequestRequest): DefaultSuccess = 3;
/** Command set or update the pending Dataset of the Thread network to which the Border Router is connected. */
command access(invoke: manage) SetPendingDatasetRequest(SetPendingDatasetRequestRequest): DefaultSuccess = 4;
}

/** This cluster provides an interface for controlling the current Channel on a device. */
cluster Channel = 1284 {
revision 2;
Expand Down Expand Up @@ -9619,6 +9663,27 @@ endpoint 1 {
callback attribute featureMap;
callback attribute clusterRevision default = 5;
}

server cluster ThreadBorderRouterManagement {
callback attribute borderRouterName;
callback attribute borderAgentID;
callback attribute threadVersion;
callback attribute interfaceEnabled;
callback attribute activeDatasetTimestamp;
callback attribute pendingDatasetTimestamp;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
callback attribute featureMap;
ram attribute clusterRevision default = 1;

handle command GetActiveDatasetRequest;
handle command GetPendingDatasetRequest;
handle command DatasetResponse;
handle command SetActiveDatasetRequest;
handle command SetPendingDatasetRequest;
}
}


245 changes: 245 additions & 0 deletions examples/placeholder/linux/apps/app1/config.zap
Original file line number Diff line number Diff line change
Expand Up @@ -15107,6 +15107,251 @@
"reportableChange": 0
}
]
},
{
"name": "Thread Border Router Management",
"code": 1106,
"mfgCode": null,
"define": "THREAD_BORDER_ROUTER_MANAGEMENT_CLUSTER",
"side": "server",
"enabled": 1,
"apiMaturity": "provisional",
"commands": [
{
"name": "GetActiveDatasetRequest",
"code": 0,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "GetPendingDatasetRequest",
"code": 1,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "DatasetResponse",
"code": 2,
"mfgCode": null,
"source": "server",
"isIncoming": 0,
"isEnabled": 1
},
{
"name": "SetActiveDatasetRequest",
"code": 3,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "SetPendingDatasetRequest",
"code": 4,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
}
],
"attributes": [
{
"name": "BorderRouterName",
"code": 0,
"mfgCode": null,
"side": "server",
"type": "char_string",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "BorderAgentID",
"code": 1,
"mfgCode": null,
"side": "server",
"type": "octet_string",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ThreadVersion",
"code": 2,
"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": "InterfaceEnabled",
"code": 3,
"mfgCode": null,
"side": "server",
"type": "boolean",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ActiveDatasetTimestamp",
"code": 4,
"mfgCode": null,
"side": "server",
"type": "int64u",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "PendingDatasetTimestamp",
"code": 5,
"mfgCode": null,
"side": "server",
"type": "int64u",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "GeneratedCommandList",
"code": 65528,
"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": "AcceptedCommandList",
"code": 65529,
"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": "EventList",
"code": 65530,
"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": "AttributeList",
"code": 65531,
"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": "FeatureMap",
"code": 65532,
"mfgCode": null,
"side": "server",
"type": "bitmap32",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
}
]
}
]
}
Expand Down
Loading

0 comments on commit 2449554

Please sign in to comment.