"use strict";
var import_Resource = require("#models/Resource.js");
/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import_Resource.Resource.add({
  tag: "cluster",
  name: "CommissionerControl",
  pics: "CCTRL",
  xref: "core\xA711.26",
  details: "The Commissioner Control Cluster supports the ability for clients to request the commissioning of themselves or other nodes onto a fabric which the cluster server can commission onto. An example use case is ecosystem to ecosystem Fabric Synchronization setup.\nThe generalized flow supported by the Commissioner Control Cluster can be seen in the following diagram.",
  children: [
    {
      tag: "attribute",
      name: "SupportedDeviceCategories",
      xref: "core\xA711.26.5.1",
      details: "Indicates the device categories specified in SupportedDeviceCategoryBitmap that are supported by this Commissioner Control Cluster server.\nA client shall NOT send the RequestCommissioningApproval command if the intended node to be commissioned does not conform to any of the values specified in SupportedDeviceCategories."
    },
    {
      tag: "event",
      name: "CommissioningRequestResult",
      xref: "core\xA711.26.7.1",
      details: "This event shall be generated by the server following a RequestCommissioningApproval command which the server responded to with SUCCESS.\n> [!NOTE]\n> The approval is valid for a period determined by the manufacturer and characteristics of the node   presenting the Commissioner Control Cluster. Clients SHOULD send the CommissionNode command   immediately upon receiving a CommissioningRequestResult event.\n11.26.7.2. RequestID / ClientNodeID Fields The RequestID shall match the RequestID provided to RequestCommissioningApproval and the ClientNodeID shall match the NodeID of the client which generated the RequestCommissioningApproval command."
    },
    {
      tag: "command",
      name: "RequestCommissioningApproval",
      xref: "core\xA711.26.6.1",
      details: "This command is sent by a client to request approval for a future CommissionNode call. This is required to be a separate step in order to provide the server time for interacting with a user before informing the client that the CommissionNode operation may be successful.\nIf the command is not executed via a CASE session, the command shall fail with a status code of UNSUPPORTED_ACCESS.\nThe server may request approval from the user, but it is not required.\nThe server shall always return SUCCESS to a correctly formatted RequestCommissioningApproval command, and then generate a CommissioningRequestResult event associated with the command\u2019s accessing fabric once the result is ready.\nClients SHOULD avoid using the same RequestID. If the RequestID and client NodeID of a RequestCommissioningApproval match a previously received RequestCommissioningApproval and the server has not returned an error or completed commissioning of a device for the prior request, then the server SHOULD return FAILURE.\nThe parameters for RequestCommissioningApproval command are as follows:"
    },
    {
      tag: "command",
      name: "CommissionNode",
      xref: "core\xA711.26.6.5",
      details: "This command is sent by a client to request that the server begins commissioning a previously approved request.\nThe server shall return FAILURE if the CommissionNode command is not sent from the same NodeID and on the same fabric as the RequestCommissioningApproval or if the provided RequestID to CommissionNode does not match the value provided to RequestCommissioningApproval.\nIf the command is not executed via a CASE session, the command shall fail with a status code of UNSUPPORTED_ACCESS.\nUpon receipt, the server shall respond with ReverseOpenCommissioningWindow if CommissioningRequestResult was generated with StatusCode of SUCCESS for the matching RequestID field and NodeID of the client.\nThe server shall return FAILURE if the CommissionNode command is received after the server has already responded to a client with ReverseOpenCommissioningWindow for a matching RequestID field and NodeID of the client unless the client has sent another RequestCommissioningApproval and received an additional CommissioningRequestResult.\nThe parameters for CommissionNode command are as follows:"
    },
    {
      tag: "command",
      name: "ReverseOpenCommissioningWindow",
      xref: "core\xA711.26.6.8",
      details: "When received within the timeout specified by ResponseTimeoutSeconds in the CommissionNode command, the client shall open a commissioning window on a node which matches the VendorID and ProductID provided in the associated RequestCommissioningApproval command.\nWhen commissioning this node, the server shall check that the VendorID and ProductID fields provided in the RequestCommissioningApproval command match the VendorID and ProductID attributes of the Basic Information Cluster which have already been verified during the Device Attestation Procedure. If they do not match, the server shall NOT complete commissioning and SHOULD indicate an error to the user.\n> [!NOTE]\n> This is an alias onto the OpenCommissioningWindow command within the Administrator Commissioning   Cluster. Refer to the OpenCommissioningWindow command for a description of the command behavior   and parameters.\nThe parameters for ReverseOpenCommissioningWindow command are as follows:"
    },
    {
      tag: "datatype",
      name: "SupportedDeviceCategoryBitmap",
      xref: "core\xA711.26.4.1",
      children: [{
        tag: "field",
        name: "FabricSynchronization",
        description: "Aggregators which support Fabric Synchronization may be commissioned.",
        xref: "core\xA711.26.4.1.1",
        details: "The FabricSynchronization bit shall be set to 1 if and only if the server supports commissioning nodes that support Fabric Synchronization."
      }]
    }
  ]
});
//# sourceMappingURL=commissioner-control.resource.js.map
