Skip to content

Commit

Permalink
review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wqx6 committed Jun 4, 2024
1 parent 28a8dfb commit 6b2e179
Show file tree
Hide file tree
Showing 19 changed files with 438 additions and 63 deletions.
1 change: 0 additions & 1 deletion src/app/common/templates/config-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ CommandHandlerInterfaceOnlyClusters:
- Electrical Power Measurement
- Electrical Energy Measurement
- Wi-Fi Network Management
- Thread Border Router Management

# We need a more configurable way of deciding which clusters have which init functions....
# See https://github.com/project-chip/connectedhomeip/issues/4369
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,39 +35,39 @@ limitations under the License.

<attribute side="server" code="0x0000" define="BORDER_ROUTER_NAME" type="char_string" length="63">BorderRouterName</attribute>

<attribute side="server" code="0x0001" define="BORDER_AGENT_ID" type="octet_string" length="16">BorderAgentId</attribute>
<attribute side="server" code="0x0001" define="BORDER_AGENT_ID" type="octet_string">BorderAgentId</attribute>

<attribute side="server" code="0x0002" define="THREAD_VERSION" type="int16u">ThreadVersion</attribute>

<attribute side="server" code="0x0003" define="INTERFACE_ENABLED" type="boolean">InterfaceEnabled</attribute>
<attribute side="server" code="0x0003" define="INTERFACE_ENABLED" type="boolean" default="0">InterfaceEnabled</attribute>

<attribute side="server" code="0x0005" define="ACTIVE_DATASET_TIMESTAMP" type="int64u" isNullable="true">ActiveDatasetTimestamp</attribute>


<command source="client" code="0x00" name="GetActiveDatasetRequest" response="DatasetResponse" optional="false">
<description>On receipt of this command, the Thread Border Router will read the active operational dataset of the Thread network that it is connaected to, and send the DatasetResponse as the response. This command must be sent over a valid CASE session</description>
<description>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</description>
<access op="invoke" privilege="manage"/>
</command>

<command source="client" code="0x01" name="GetPendingDatasetRequest" response="DatasetResponse" optional="false">
<description>On receipt of this command, the Thread Border Router will read the pending dataset and send the DatasetResponse as the response. This command must be sent over a valid CASE session</description>
<description>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</description>
<access op="invoke" privilege="manage"/>
</command>

<command source="server" code="0x02" name="DatasetResponse" optional="false">
<description>Generated response to GetActiveDatasetRequest or GetPendingDatasetRequest commands</description>
<command source="server" code="0x03" name="DatasetResponse" optional="false">
<description>Generated response to GetActiveDatasetRequest or GetPendingDatasetRequest commands.</description>
<arg name="Dataset" type="octet_string" length="254"/>
</command>

<command source="client" code="0x03" name="SetActiveDatasetRequest" optional="false">
<description>On receipt of this command, the Thread Border Router will set or update the active Dataset of the Thread network that the Stub Router is connected to.</description>
<command source="client" code="0x04" name="SetActiveDatasetRequest" optional="false">
<description>Command to set or update the active Dataset of the Thread network to which the Border Router is connected.</description>
<arg name="ActiveDataset" type="octet_string" length="254"/>
<arg name="Breadcrumb" type="int64u" optional="true"/>
<access op="invoke" privilege="manage"/>
</command>

<command source="client" code="0x04" name="SetPendingDatasetRequest" optional="true">
<description>On receipt of this command, the Thread Border Router will set or update the pending Dataset</description>
<command source="client" code="0x05" name="SetPendingDatasetRequest" optional="true">
<description>Command set or update the pending Dataset of the Thread network to which the Border Router is connected.</description>
<arg name="PendingDataset" type="octet_string" length="254"/>
<access op="invoke" privilege="manage"/>
</command>
Expand Down
8 changes: 0 additions & 8 deletions src/app/zap-templates/zcl/zcl-with-test-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -291,14 +291,6 @@
"general_error_boolean",
"cluster_error_boolean"
],
"Thread Border Router Management": [
"BorderRouterName",
"BorderAgentId",
"ThreadVersion",
"InterfaceEnabled",
"ActiveDatasetTimestamp",
"FeatureMap"
],
"Thread Network Diagnostics": [
"Channel",
"RoutingRole",
Expand Down
8 changes: 0 additions & 8 deletions src/app/zap-templates/zcl/zcl.json
Original file line number Diff line number Diff line change
Expand Up @@ -289,14 +289,6 @@
"general_error_boolean",
"cluster_error_boolean"
],
"Thread Border Router Management": [
"BorderRouterName",
"BorderAgentId",
"ThreadVersion",
"InterfaceEnabled",
"ActiveDatasetTimestamp",
"FeatureMap"
],
"Thread Network Diagnostics": [
"Channel",
"RoutingRole",
Expand Down
16 changes: 8 additions & 8 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -7683,7 +7683,7 @@ cluster ThreadBorderRouterManagement = 1106 {
}

readonly attribute char_string<63> borderRouterName = 0;
readonly attribute octet_string<16> borderAgentId = 1;
readonly attribute octet_string<254> borderAgentId = 1;
readonly attribute int16u threadVersion = 2;
readonly attribute boolean interfaceEnabled = 3;
readonly attribute nullable int64u activeDatasetTimestamp = 5;
Expand All @@ -7694,7 +7694,7 @@ cluster ThreadBorderRouterManagement = 1106 {
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

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

Expand All @@ -7707,14 +7707,14 @@ cluster ThreadBorderRouterManagement = 1106 {
octet_string<254> pendingDataset = 0;
}

/** On receipt of this command, the Thread Border Router will read the active operational dataset of the Thread network that it is connaected to, and send the DatasetResponse as the response. This command must be sent over a valid CASE session */
/** 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;
/** On receipt of this command, the Thread Border Router will read the pending dataset and send the DatasetResponse as the response. This command must be sent over a valid CASE session */
/** 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;
/** On receipt of this command, the Thread Border Router will set or update the active Dataset of the Thread network that the Stub Router is connected to. */
command access(invoke: manage) SetActiveDatasetRequest(SetActiveDatasetRequestRequest): DefaultSuccess = 3;
/** On receipt of this command, the Thread Border Router will set or update the pending Dataset */
command access(invoke: manage) SetPendingDatasetRequest(SetPendingDatasetRequestRequest): DefaultSuccess = 4;
/** 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 = 4;
/** 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 = 5;
}

/** This cluster provides an interface for managing low power mode on a device that supports the Wake On LAN protocol. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53165,7 +53165,7 @@ public void setActiveDatasetRequest(DefaultClusterCallback callback, byte[] acti
}

public void setActiveDatasetRequest(DefaultClusterCallback callback, byte[] activeDataset, Optional<Long> breadcrumb, int timedInvokeTimeoutMs) {
final long commandId = 3L;
final long commandId = 4L;

ArrayList<StructElement> elements = new ArrayList<>();
final long activeDatasetFieldID = 0L;
Expand All @@ -53189,7 +53189,7 @@ public void setPendingDatasetRequest(DefaultClusterCallback callback, byte[] pen
}

public void setPendingDatasetRequest(DefaultClusterCallback callback, byte[] pendingDataset, int timedInvokeTimeoutMs) {
final long commandId = 4L;
final long commandId = 5L;

ArrayList<StructElement> elements = new ArrayList<>();
final long pendingDatasetFieldID = 0L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14481,8 +14481,8 @@ public static Event value(long id) throws NoSuchFieldError {
public enum Command {
GetActiveDatasetRequest(0L),
GetPendingDatasetRequest(1L),
SetActiveDatasetRequest(3L),
SetPendingDatasetRequest(4L),;
SetActiveDatasetRequest(4L),
SetPendingDatasetRequest(5L),;
private final long id;
Command(long id) {
this.id = id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class ThreadBorderRouterManagementCluster(
breadcrumb: ULong?,
timedInvokeTimeout: Duration? = null
) {
val commandId: UInt = 3u
val commandId: UInt = 4u

val tlvWriter = TlvWriter()
tlvWriter.startStructure(AnonymousTag)
Expand All @@ -212,7 +212,7 @@ class ThreadBorderRouterManagementCluster(
pendingDataset: ByteArray,
timedInvokeTimeout: Duration? = null
) {
val commandId: UInt = 4u
val commandId: UInt = 5u

val tlvWriter = TlvWriter()
tlvWriter.startStructure(AnonymousTag)
Expand Down
8 changes: 4 additions & 4 deletions src/controller/python/chip/clusters/CHIPClusters.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/controller/python/chip/clusters/Objects.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6b2e179

Please sign in to comment.