Skip to content

Commit

Permalink
Update the FS XML definations to algin with spec update (#35381)
Browse files Browse the repository at this point in the history
  • Loading branch information
yufengwangca authored Sep 5, 2024
1 parent e78a186 commit 1df53d8
Show file tree
Hide file tree
Showing 27 changed files with 219 additions and 219 deletions.
4 changes: 2 additions & 2 deletions examples/fabric-admin/device_manager/DeviceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ void DeviceManager::HandleCommissioningRequestResult(TLV::TLVReader & data)
return;
}

if (value.requestId != mRequestId)
if (value.requestID != mRequestId)
{
ChipLogError(NotSpecified, "The RequestId does not match the RequestId provided to RequestCommissioningApproval");
return;
Expand All @@ -296,7 +296,7 @@ void DeviceManager::HandleCommissioningRequestResult(TLV::TLVReader & data)

// The server is ready to begin commissioning the requested device, request the Commissioner Control Server to begin
// commissioning a previously approved request.
SendCommissionNodeRequest(value.requestId, kResponseTimeoutSeconds);
SendCommissionNodeRequest(value.requestID, kResponseTimeoutSeconds);
}

void DeviceManager::HandleAttributePartsListUpdate(chip::TLV::TLVReader & data)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1698,9 +1698,9 @@ provisional cluster CommissionerControl = 1873 {
}

fabric_sensitive info event access(read: manage) CommissioningRequestResult = 0 {
int64u requestId = 0;
node_id clientNodeId = 1;
enum8 statusCode = 2;
int64u requestID = 0;
node_id clientNodeID = 1;
status statusCode = 2;
fabric_idx fabricIndex = 254;
}

Expand All @@ -1713,14 +1713,14 @@ provisional cluster CommissionerControl = 1873 {
readonly attribute int16u clusterRevision = 65533;

request struct RequestCommissioningApprovalRequest {
int64u requestId = 0;
vendor_id vendorId = 1;
int16u productId = 2;
int64u requestID = 0;
vendor_id vendorID = 1;
int16u productID = 2;
optional char_string<64> label = 3;
}

request struct CommissionNodeRequest {
int64u requestId = 0;
int64u requestID = 0;
int16u responseTimeoutSeconds = 1;
}

Expand Down
4 changes: 2 additions & 2 deletions examples/fabric-bridge-app/linux/CommissionerControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ CHIP_ERROR CommissionerControlDelegate::HandleCommissioningApprovalRequest(const
VerifyOrReturnError(mNextStep == Step::kIdle, CHIP_ERROR_INCORRECT_STATE);

CommissionerControl::Events::CommissioningRequestResult::Type result;
result.requestId = request.requestId;
result.clientNodeId = request.clientNodeId;
result.requestID = request.requestId;
result.clientNodeID = request.clientNodeId;
result.fabricIndex = request.fabricIndex;
result.statusCode = static_cast<uint8_t>(Protocols::InteractionModel::Status::Success);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ bool emberAfCommissionerControlClusterRequestCommissioningApprovalCallback(
}

auto fabricIndex = commandObj->GetAccessingFabricIndex();
auto requestId = commandData.requestId;
auto vendorId = commandData.vendorId;
auto productId = commandData.productId;
auto requestId = commandData.requestID;
auto vendorId = commandData.vendorID;
auto productId = commandData.productID;

// The label assigned from commandData need to be stored in CommissionerControl::Delegate which ensure that the backing buffer
// of it has a valid lifespan during fabric sync setup process.
Expand Down Expand Up @@ -232,7 +232,7 @@ bool emberAfCommissionerControlClusterCommissionNodeCallback(
return true;
}

auto requestId = commandData.requestId;
auto requestId = commandData.requestID;

auto commissioningWindowParams = std::make_unique<Clusters::CommissionerControl::CommissioningWindowParams>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ limitations under the License.
<event side="server" code="0x02" name="Leave" priority="info" optional="true">
<description>The Leave event SHOULD be emitted by a Node prior to permanently leaving the Fabric.</description>
</event>
<event side="server" code="0x03" name="ReachableChanged" priority="info" optional="false">
<event side="server" code="0x03" name="ReachableChanged" priority="info">
<description>This event SHALL be generated when there is a change in the Reachable attribute.</description>
<field id="0" name="ReachableNewValue" type="boolean"/>
</event>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,21 @@ limitations under the License.

<command source="client" code="0x00" name="RequestCommissioningApproval" optional="false">
<description>This command is sent by a client to request approval for a future CommissionNode call.</description>
<arg id="0" name="RequestId" type="int64u"/>
<arg id="1" name="VendorId" type="vendor_id"/>
<arg id="2" name="ProductId" type="int16u"/>
<arg id="0" name="RequestID" type="int64u"/>
<arg id="1" name="VendorID" type="vendor_id"/>
<arg id="2" name="ProductID" type="int16u"/>
<arg id="3" name="Label" type="char_string" optional="true" length="64"/>
<access op="invoke" privilege="manage"/>
</command>

<command source="client" code="0x01" name="CommissionNode" response="ReverseOpenCommissioningWindow" optional="false">
<description>This command is sent by a client to request that the server begins commissioning a previously approved request.</description>
<arg id="0" name="RequestId" type="int64u"/>
<arg id="0" name="RequestID" type="int64u"/>
<arg id="1" name="ResponseTimeoutSeconds" type="int16u" min="30" max="120" default="30"/>
<access op="invoke" privilege="manage"/>
</command>

<command source="server" code="0x02" name="ReverseOpenCommissioningWindow" optional="false">
<command source="server" code="0x02" name="ReverseOpenCommissioningWindow" optional="false" disableDefaultResponse="true">
<description>When received within the timeout specified by CommissionNode, the client SHALL open a commissioning window on to the node which the client called RequestCommissioningApproval to have commissioned.</description>
<arg id="0" name="CommissioningTimeout" type="int16u"/>
<arg id="1" name="PAKEPasscodeVerifier" type="octet_string"/>
Expand All @@ -64,9 +64,9 @@ limitations under the License.

<event code="0x00" name="CommissioningRequestResult" priority="info" side="server" isFabricSensitive="true">
<description>This event SHALL be sent by the server following a RequestCommissioningApproval command which the server responded to with SUCCESS.</description>
<field id="0" name="RequestId" type="int64u"/>
<field id="1" name="ClientNodeId" type="node_id"/>
<field id="2" name="StatusCode" type="enum8"/>
<field id="0" name="RequestID" type="int64u"/>
<field id="1" name="ClientNodeID" type="node_id"/>
<field id="2" name="StatusCode" type="status"/>
<access op="read" privilege="manage"/>
</event>

Expand Down
14 changes: 7 additions & 7 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -9422,9 +9422,9 @@ provisional cluster CommissionerControl = 1873 {
}

fabric_sensitive info event access(read: manage) CommissioningRequestResult = 0 {
int64u requestId = 0;
node_id clientNodeId = 1;
enum8 statusCode = 2;
int64u requestID = 0;
node_id clientNodeID = 1;
status statusCode = 2;
fabric_idx fabricIndex = 254;
}

Expand All @@ -9437,14 +9437,14 @@ provisional cluster CommissionerControl = 1873 {
readonly attribute int16u clusterRevision = 65533;

request struct RequestCommissioningApprovalRequest {
int64u requestId = 0;
vendor_id vendorId = 1;
int16u productId = 2;
int64u requestID = 0;
vendor_id vendorID = 1;
int16u productID = 2;
optional char_string<64> label = 3;
}

request struct CommissionNodeRequest {
int64u requestId = 0;
int64u requestID = 0;
int16u responseTimeoutSeconds = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61069,25 +61069,25 @@ public long initWithDevice(long devicePtr, int endpointId) {
return 0L;
}

public void requestCommissioningApproval(DefaultClusterCallback callback, Long requestId, Integer vendorId, Integer productId, Optional<String> label) {
requestCommissioningApproval(callback, requestId, vendorId, productId, label, 0);
public void requestCommissioningApproval(DefaultClusterCallback callback, Long requestID, Integer vendorID, Integer productID, Optional<String> label) {
requestCommissioningApproval(callback, requestID, vendorID, productID, label, 0);
}

public void requestCommissioningApproval(DefaultClusterCallback callback, Long requestId, Integer vendorId, Integer productId, Optional<String> label, int timedInvokeTimeoutMs) {
public void requestCommissioningApproval(DefaultClusterCallback callback, Long requestID, Integer vendorID, Integer productID, Optional<String> label, int timedInvokeTimeoutMs) {
final long commandId = 0L;

ArrayList<StructElement> elements = new ArrayList<>();
final long requestIdFieldID = 0L;
BaseTLVType requestIdtlvValue = new UIntType(requestId);
elements.add(new StructElement(requestIdFieldID, requestIdtlvValue));
final long requestIDFieldID = 0L;
BaseTLVType requestIDtlvValue = new UIntType(requestID);
elements.add(new StructElement(requestIDFieldID, requestIDtlvValue));

final long vendorIdFieldID = 1L;
BaseTLVType vendorIdtlvValue = new UIntType(vendorId);
elements.add(new StructElement(vendorIdFieldID, vendorIdtlvValue));
final long vendorIDFieldID = 1L;
BaseTLVType vendorIDtlvValue = new UIntType(vendorID);
elements.add(new StructElement(vendorIDFieldID, vendorIDtlvValue));

final long productIdFieldID = 2L;
BaseTLVType productIdtlvValue = new UIntType(productId);
elements.add(new StructElement(productIdFieldID, productIdtlvValue));
final long productIDFieldID = 2L;
BaseTLVType productIDtlvValue = new UIntType(productID);
elements.add(new StructElement(productIDFieldID, productIDtlvValue));

final long labelFieldID = 3L;
BaseTLVType labeltlvValue = label.<BaseTLVType>map((nonOptionallabel) -> new StringType(nonOptionallabel)).orElse(new EmptyType());
Expand All @@ -61101,17 +61101,17 @@ public void onResponse(StructType invokeStructValue) {
}}, commandId, commandArgs, timedInvokeTimeoutMs);
}

public void commissionNode(ReverseOpenCommissioningWindowCallback callback, Long requestId, Integer responseTimeoutSeconds) {
commissionNode(callback, requestId, responseTimeoutSeconds, 0);
public void commissionNode(ReverseOpenCommissioningWindowCallback callback, Long requestID, Integer responseTimeoutSeconds) {
commissionNode(callback, requestID, responseTimeoutSeconds, 0);
}

public void commissionNode(ReverseOpenCommissioningWindowCallback callback, Long requestId, Integer responseTimeoutSeconds, int timedInvokeTimeoutMs) {
public void commissionNode(ReverseOpenCommissioningWindowCallback callback, Long requestID, Integer responseTimeoutSeconds, int timedInvokeTimeoutMs) {
final long commandId = 1L;

ArrayList<StructElement> elements = new ArrayList<>();
final long requestIdFieldID = 0L;
BaseTLVType requestIdtlvValue = new UIntType(requestId);
elements.add(new StructElement(requestIdFieldID, requestIdtlvValue));
final long requestIDFieldID = 0L;
BaseTLVType requestIDtlvValue = new UIntType(requestID);
elements.add(new StructElement(requestIDFieldID, requestIDtlvValue));

final long responseTimeoutSecondsFieldID = 1L;
BaseTLVType responseTimeoutSecondstlvValue = new UIntType(responseTimeoutSeconds);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6188,8 +6188,8 @@ public String toString() {
}
}
public static class CommissionerControlClusterCommissioningRequestResultEvent {
public Long requestId;
public Long clientNodeId;
public Long requestID;
public Long clientNodeID;
public Integer statusCode;
public Integer fabricIndex;
private static final long REQUEST_ID_ID = 0L;
Expand All @@ -6198,21 +6198,21 @@ public static class CommissionerControlClusterCommissioningRequestResultEvent {
private static final long FABRIC_INDEX_ID = 254L;

public CommissionerControlClusterCommissioningRequestResultEvent(
Long requestId,
Long clientNodeId,
Long requestID,
Long clientNodeID,
Integer statusCode,
Integer fabricIndex
) {
this.requestId = requestId;
this.clientNodeId = clientNodeId;
this.requestID = requestID;
this.clientNodeID = clientNodeID;
this.statusCode = statusCode;
this.fabricIndex = fabricIndex;
}

public StructType encodeTlv() {
ArrayList<StructElement> values = new ArrayList<>();
values.add(new StructElement(REQUEST_ID_ID, new UIntType(requestId)));
values.add(new StructElement(CLIENT_NODE_ID_ID, new UIntType(clientNodeId)));
values.add(new StructElement(REQUEST_ID_ID, new UIntType(requestID)));
values.add(new StructElement(CLIENT_NODE_ID_ID, new UIntType(clientNodeID)));
values.add(new StructElement(STATUS_CODE_ID, new UIntType(statusCode)));
values.add(new StructElement(FABRIC_INDEX_ID, new UIntType(fabricIndex)));

Expand All @@ -6223,20 +6223,20 @@ public static CommissionerControlClusterCommissioningRequestResultEvent decodeTl
if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
return null;
}
Long requestId = null;
Long clientNodeId = null;
Long requestID = null;
Long clientNodeID = null;
Integer statusCode = null;
Integer fabricIndex = null;
for (StructElement element: ((StructType)tlvValue).value()) {
if (element.contextTagNum() == REQUEST_ID_ID) {
if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
UIntType castingValue = element.value(UIntType.class);
requestId = castingValue.value(Long.class);
requestID = castingValue.value(Long.class);
}
} else if (element.contextTagNum() == CLIENT_NODE_ID_ID) {
if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
UIntType castingValue = element.value(UIntType.class);
clientNodeId = castingValue.value(Long.class);
clientNodeID = castingValue.value(Long.class);
}
} else if (element.contextTagNum() == STATUS_CODE_ID) {
if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
Expand All @@ -6251,8 +6251,8 @@ public static CommissionerControlClusterCommissioningRequestResultEvent decodeTl
}
}
return new CommissionerControlClusterCommissioningRequestResultEvent(
requestId,
clientNodeId,
requestID,
clientNodeID,
statusCode,
fabricIndex
);
Expand All @@ -6262,11 +6262,11 @@ public static CommissionerControlClusterCommissioningRequestResultEvent decodeTl
public String toString() {
StringBuilder output = new StringBuilder();
output.append("CommissionerControlClusterCommissioningRequestResultEvent {\n");
output.append("\trequestId: ");
output.append(requestId);
output.append("\trequestID: ");
output.append(requestID);
output.append("\n");
output.append("\tclientNodeId: ");
output.append(clientNodeId);
output.append("\tclientNodeID: ");
output.append(clientNodeID);
output.append("\n");
output.append("\tstatusCode: ");
output.append(statusCode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17406,7 +17406,7 @@ public static Command value(long id) throws NoSuchFieldError {
}
throw new NoSuchFieldError();
}
}public enum RequestCommissioningApprovalCommandField {RequestId(0),VendorId(1),ProductId(2),Label(3),;
}public enum RequestCommissioningApprovalCommandField {RequestID(0),VendorID(1),ProductID(2),Label(3),;
private final int id;
RequestCommissioningApprovalCommandField(int id) {
this.id = id;
Expand All @@ -17423,7 +17423,7 @@ public static RequestCommissioningApprovalCommandField value(int id) throws NoSu
}
throw new NoSuchFieldError();
}
}public enum CommissionNodeCommandField {RequestId(0),ResponseTimeoutSeconds(1),;
}public enum CommissionNodeCommandField {RequestID(0),ResponseTimeoutSeconds(1),;
private final int id;
CommissionNodeCommandField(int id) {
this.id = id;
Expand Down
Loading

0 comments on commit 1df53d8

Please sign in to comment.