/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { MatterDefinition } from "../MatterDefinition.js";
import {
  ClusterElement as Cluster,
  AttributeElement as Attribute,
  FieldElement as Field,
  EventElement as Event,
  CommandElement as Command,
  DatatypeElement as Datatype
} from "../../elements/index.js";
const WiFiNetworkDiagnostics = Cluster(
  { name: "WiFiNetworkDiagnostics", id: 54, classification: "node", quality: "K" },
  Attribute({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 1 }),
  Attribute(
    { name: "FeatureMap", id: 65532, type: "FeatureMap" },
    Field({ name: "PKTCNT", constraint: "0", title: "PacketCounts" }),
    Field({ name: "ERRCNT", constraint: "1", title: "ErrorCounts" })
  ),
  Attribute({
    name: "Bssid",
    id: 0,
    type: "octstr",
    access: "R V",
    conformance: "M",
    constraint: "6",
    default: null,
    quality: "X"
  }),
  Attribute({
    name: "SecurityType",
    id: 1,
    type: "SecurityTypeEnum",
    access: "R V",
    conformance: "M",
    default: null,
    quality: "X"
  }),
  Attribute({
    name: "WiFiVersion",
    id: 2,
    type: "WiFiVersionEnum",
    access: "R V",
    conformance: "M",
    default: null,
    quality: "X"
  }),
  Attribute({ name: "ChannelNumber", id: 3, type: "uint16", access: "R V", conformance: "M", default: null, quality: "X" }),
  Attribute({
    name: "Rssi",
    id: 4,
    type: "int8",
    access: "R V",
    conformance: "M",
    constraint: "-120 to 0",
    default: null,
    quality: "X C"
  }),
  Attribute({
    name: "BeaconLostCount",
    id: 5,
    type: "uint32",
    access: "R V",
    conformance: "ERRCNT",
    default: 0,
    quality: "X C"
  }),
  Attribute({
    name: "BeaconRxCount",
    id: 6,
    type: "uint32",
    access: "R V",
    conformance: "PKTCNT",
    default: 0,
    quality: "X C"
  }),
  Attribute({
    name: "PacketMulticastRxCount",
    id: 7,
    type: "uint32",
    access: "R V",
    conformance: "PKTCNT",
    default: 0,
    quality: "X C"
  }),
  Attribute({
    name: "PacketMulticastTxCount",
    id: 8,
    type: "uint32",
    access: "R V",
    conformance: "PKTCNT",
    default: 0,
    quality: "X C"
  }),
  Attribute({
    name: "PacketUnicastRxCount",
    id: 9,
    type: "uint32",
    access: "R V",
    conformance: "PKTCNT",
    default: 0,
    quality: "X C"
  }),
  Attribute({
    name: "PacketUnicastTxCount",
    id: 10,
    type: "uint32",
    access: "R V",
    conformance: "PKTCNT",
    default: 0,
    quality: "X C"
  }),
  Attribute({ name: "CurrentMaxRate", id: 11, type: "uint64", access: "R V", conformance: "O", default: 0, quality: "X C" }),
  Attribute({ name: "OverrunCount", id: 12, type: "uint64", access: "R V", conformance: "ERRCNT", default: 0, quality: "X C" }),
  Event(
    { name: "Disconnection", id: 0, access: "V", conformance: "O", priority: "info" },
    Field({ name: "ReasonCode", id: 0, type: "uint16", conformance: "M" })
  ),
  Event(
    { name: "AssociationFailure", id: 1, access: "V", conformance: "O", priority: "info" },
    Field({ name: "AssociationFailureCause", id: 0, type: "AssociationFailureCauseEnum", conformance: "M" }),
    Field({ name: "Status", id: 1, type: "uint16", conformance: "M" })
  ),
  Event(
    { name: "ConnectionStatus", id: 2, access: "V", conformance: "O", priority: "info" },
    Field({ name: "ConnectionStatus", id: 0, type: "ConnectionStatusEnum", conformance: "M" })
  ),
  Command({ name: "ResetCounts", id: 0, access: "O", conformance: "ERRCNT", direction: "request", response: "status" }),
  Datatype(
    { name: "SecurityTypeEnum", type: "enum8" },
    Field({ name: "Unspecified", id: 0, conformance: "M" }),
    Field({ name: "None", id: 1, conformance: "M" }),
    Field({ name: "Wep", id: 2, conformance: "M" }),
    Field({ name: "Wpa", id: 3, conformance: "M" }),
    Field({ name: "Wpa2", id: 4, conformance: "M" }),
    Field({ name: "Wpa3", id: 5, conformance: "M" })
  ),
  Datatype(
    { name: "WiFiVersionEnum", type: "enum8" },
    Field({
      name: "A",
      id: 0,
      conformance: "M",
      title: "Indicate the network interface is currently using IEEE 802.11a against the wireless access point."
    }),
    Field({
      name: "B",
      id: 1,
      conformance: "M",
      title: "Indicate the network interface is currently using IEEE 802.11b against the wireless access point."
    }),
    Field({
      name: "G",
      id: 2,
      conformance: "M",
      title: "Indicate the network interface is currently using IEEE 802.11g against the wireless access point."
    }),
    Field({
      name: "N",
      id: 3,
      conformance: "M",
      title: "Indicate the network interface is currently using IEEE 802.11n against the wireless access point."
    }),
    Field({ name: "Ac", id: 4, conformance: "M" }),
    Field({ name: "Ax", id: 5, conformance: "M" }),
    Field({ name: "Ah", id: 6, conformance: "M" })
  ),
  Datatype(
    { name: "AssociationFailureCauseEnum", type: "enum8" },
    Field({ name: "Unknown", id: 0, conformance: "M" }),
    Field({ name: "AssociationFailed", id: 1, conformance: "M" }),
    Field({ name: "AuthenticationFailed", id: 2, conformance: "M" }),
    Field({ name: "SsidNotFound", id: 3, conformance: "M" })
  ),
  Datatype(
    { name: "ConnectionStatusEnum", type: "enum8" },
    Field({ name: "Connected", id: 0, conformance: "M" }),
    Field({ name: "NotConnected", id: 1, conformance: "M" })
  )
);
MatterDefinition.children.push(WiFiNetworkDiagnostics);
export {
  WiFiNetworkDiagnostics
};
//# sourceMappingURL=wi-fi-network-diagnostics.element.js.map
