Function isEncoderPortUsable

  • Determines whether a specific encoder port on a device is usable for a given product.

    The function checks:

    • If no product ID is provided or resolved, the port is considered usable (true).
    • For products in the SOMANET Circulo family (Circulo All):
      • Port 5 is always usable as a Digital I/O port.
      • Ports 1–4 are checked against the known usable product IDs for each internal/external port.
      • If a Circulo product ID is unrecognized, the port is considered usable by default.

    Returns

    true if the port is usable for the specified product, otherwise false.

    Parameters

    • port: number

      The encoder port number (1-based index).

    • Optional productId: null | string | number | HardwareDescription

      Optional product identifier. Can be a number, string, HardwareDescription, or null. If omitted, the function assumes the port is usable.

    Returns boolean

Generated using TypeDoc