# IdnPattern

## class IdnPattern( vendors: tuple[str, ...], model: str, num_channels: int | None = None, )[source]

Bases: [`object`](https://docs.python.org/3/builtins/functions.html#object "(in Python v3.15)")

Which `*IDN?` replies a driver handles.

Variables:
:   - **vendors** ([*tuple*](https://docs.python.org/3/builtins/stdtypes.html#tuple "(in Python v3.15)")*[*[*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)")*,* *...**]*) – Case-insensitive substrings, one of which must appear in the manufacturer field
      (e.g. `("KEYSIGHT TECHNOLOGIES", "AGILENT TECHNOLOGIES")`).
    - **model** ([*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)")) – Regular expression searched case-insensitively in the model field. Anchor it
      (`r"^DP83[12]"`) so a family pattern doesn’t swallow a longer model number.
    - **num_channels** ([*int*](https://docs.python.org/3/builtins/functions.html#int "(in Python v3.15)") *|* *None*) – SCPI-programmable channel count for the matched model, or `None` where the
      category doesn’t track channels (dmm, eload). Not necessarily the physical output count.

Example:

```
IdnPattern(vendors=("RIGOL TECHNOLOGIES",), model=r"^DP83[12]", num_channels=3)
```

### vendors: tuple[str, ...]

### model: str

### num_channels: int | None = None

### matches(manufacturer: str, model: str) → bool[source]

True when `manufacturer` contains one of `vendors` and `model` matches the regex.
