"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var EthernetNetworkDiagnostics_exports = {};
__export(EthernetNetworkDiagnostics_exports, {
  EthernetNetworkDiagnostics: () => EthernetNetworkDiagnostics
});
module.exports = __toCommonJS(EthernetNetworkDiagnostics_exports);
var import_MatterDefinition = require("../MatterDefinition.js");
var import_elements = require("../../elements/index.js");
/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
const EthernetNetworkDiagnostics = (0, import_elements.ClusterElement)(
  {
    name: "EthernetNetworkDiagnostics",
    id: 55,
    classification: "node",
    pics: "DGETH",
    quality: "K",
    details: "The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that may be used by a Node to assist a user or Administrator in diagnosing potential problems. The Ethernet Network Diagnostics Cluster attempts to centralize all metrics that are relevant to a potential Ethernet connection to a Node.",
    xref: { document: "core", section: "11.16" }
  },
  (0, import_elements.AttributeElement)({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 1 }),
  (0, import_elements.AttributeElement)(
    { name: "FeatureMap", id: 65532, type: "FeatureMap", xref: { document: "core", section: "11.16.4" } },
    (0, import_elements.FieldElement)({
      name: "PKTCNT",
      constraint: "0",
      description: "PacketCounts",
      details: "Node makes available the counts for the number of received and transmitted packets on the ethernet interface."
    }),
    (0, import_elements.FieldElement)({
      name: "ERRCNT",
      constraint: "1",
      description: "ErrorCounts",
      details: "Node makes available the counts for the number of errors that have occurred during the reception and transmission of packets on the ethernet interface."
    })
  ),
  (0, import_elements.AttributeElement)({
    name: "PhyRate",
    id: 0,
    type: "PHYRateEnum",
    access: "R V",
    conformance: "O",
    default: null,
    quality: "X",
    details: "The PHYRate attribute shall indicate the current nominal, usable speed at the top of the physical layer of the Node. A value of null shall indicate that the interface is not currently configured or operational.",
    xref: { document: "core", section: "11.16.6.1" }
  }),
  (0, import_elements.AttributeElement)({
    name: "FullDuplex",
    id: 1,
    type: "bool",
    access: "R V",
    conformance: "O",
    default: null,
    quality: "X",
    details: "The FullDuplex attribute shall indicate if the Node is currently utilizing the full-duplex operating mode. A value of null shall indicate that the interface is not currently configured or operational.",
    xref: { document: "core", section: "11.16.6.2" }
  }),
  (0, import_elements.AttributeElement)({
    name: "PacketRxCount",
    id: 2,
    type: "uint64",
    access: "R V",
    conformance: "PKTCNT",
    default: 0,
    quality: "C",
    details: "The PacketRxCount attribute shall indicate the number of packets that have been received on the ethernet network interface. The PacketRxCount attribute shall be reset to 0 upon a reboot of the Node.",
    xref: { document: "core", section: "11.16.6.3" }
  }),
  (0, import_elements.AttributeElement)({
    name: "PacketTxCount",
    id: 3,
    type: "uint64",
    access: "R V",
    conformance: "PKTCNT",
    default: 0,
    quality: "C",
    details: "The PacketTxCount attribute shall indicate the number of packets that have been successfully transferred on the ethernet network interface. The PacketTxCount attribute shall be reset to 0 upon a reboot of the Node.",
    xref: { document: "core", section: "11.16.6.4" }
  }),
  (0, import_elements.AttributeElement)({
    name: "TxErrCount",
    id: 4,
    type: "uint64",
    access: "R V",
    conformance: "ERRCNT",
    default: 0,
    quality: "C",
    details: "The TxErrCount attribute shall indicate the number of failed packet transmissions that have occurred on the ethernet network interface. The TxErrCount attribute shall be reset to 0 upon a\nreboot of the Node.",
    xref: { document: "core", section: "11.16.6.5" }
  }),
  (0, import_elements.AttributeElement)({
    name: "CollisionCount",
    id: 5,
    type: "uint64",
    access: "R V",
    conformance: "ERRCNT",
    default: 0,
    quality: "C",
    details: "The CollisionCount attribute shall indicate the number of collisions that have occurred while attempting to transmit a packet on the ethernet network interface. The CollisionCount attribute shall be reset to 0 upon a reboot of the Node.",
    xref: { document: "core", section: "11.16.6.6" }
  }),
  (0, import_elements.AttributeElement)({
    name: "OverrunCount",
    id: 6,
    type: "uint64",
    access: "R V",
    conformance: "ERRCNT",
    default: 0,
    quality: "C",
    details: "The OverrunCount attribute shall indicate the number of packets dropped either at ingress or egress, due to lack of buffer memory to retain all packets on the ethernet network interface. The OverrunCount attribute shall be reset to 0 upon a reboot of the Node.",
    xref: { document: "core", section: "11.16.6.7" }
  }),
  (0, import_elements.AttributeElement)({
    name: "CarrierDetect",
    id: 7,
    type: "bool",
    access: "R V",
    conformance: "O",
    default: null,
    quality: "X C",
    details: "The CarrierDetect attribute shall indicate the value of the Carrier Detect control signal present on the ethernet network interface. A value of null shall indicate that the interface is not currently configured or operational.",
    xref: { document: "core", section: "11.16.6.8" }
  }),
  (0, import_elements.AttributeElement)({
    name: "TimeSinceReset",
    id: 8,
    type: "uint64",
    access: "R V",
    conformance: "O",
    default: 0,
    quality: "C",
    details: "The TimeSinceReset attribute shall indicate the duration of time, in minutes, that it has been since the ethernet network interface has reset for any reason.",
    xref: { document: "core", section: "11.16.6.9" }
  }),
  (0, import_elements.CommandElement)({
    name: "ResetCounts",
    id: 0,
    access: "M",
    conformance: "PKTCNT | ERRCNT",
    direction: "request",
    response: "status",
    details: "Reception of this command shall reset the following attributes to 0:\n  \u2022 PacketRxCount\n  \u2022 PacketTxCount\n  \u2022 TxErrCount\n  \u2022 CollisionCount\n  \u2022 OverrunCount\nThis command has no associated data.",
    xref: { document: "core", section: "11.16.7.1" }
  }),
  (0, import_elements.DatatypeElement)(
    { name: "PHYRateEnum", type: "enum8", xref: { document: "core", section: "11.16.5.1" } },
    (0, import_elements.FieldElement)({ name: "Rate10M", id: 0, conformance: "M", description: "PHY rate is 10Mbps" }),
    (0, import_elements.FieldElement)({ name: "Rate100M", id: 1, conformance: "M", description: "PHY rate is 100Mbps" }),
    (0, import_elements.FieldElement)({ name: "Rate1G", id: 2, conformance: "M", description: "PHY rate is 1Gbps" }),
    (0, import_elements.FieldElement)({ name: "Rate25G", id: 3, conformance: "M", description: "PHY rate is 2.5Gbps" }),
    (0, import_elements.FieldElement)({ name: "Rate5G", id: 4, conformance: "M", description: "PHY rate is 5Gbps" }),
    (0, import_elements.FieldElement)({ name: "Rate10G", id: 5, conformance: "M", description: "PHY rate is 10Gbps" }),
    (0, import_elements.FieldElement)({ name: "Rate40G", id: 6, conformance: "M", description: "PHY rate is 40Gbps" }),
    (0, import_elements.FieldElement)({ name: "Rate100G", id: 7, conformance: "M", description: "PHY rate is 100Gbps" }),
    (0, import_elements.FieldElement)({ name: "Rate200G", id: 8, conformance: "M", description: "PHY rate is 200Gbps" }),
    (0, import_elements.FieldElement)({ name: "Rate400G", id: 9, conformance: "M", description: "PHY rate is 400Gbps" })
  )
);
import_MatterDefinition.MatterDefinition.children.push(EthernetNetworkDiagnostics);
//# sourceMappingURL=EthernetNetworkDiagnostics.js.map
