import { HardwareDescription } from './hardware-description'; export declare const productCategories: readonly ["SOMANET", "ACTILINK", "OBLAC", "MOTORCORTEX"]; export type ProductCategory = (typeof productCategories)[number]; export declare const productFamilies: readonly ["Node", "Circulo", "Circulo NG", "Integro", "Core", "ACTILINK-S Integro", "ACTILINK-JD", "ACTILINK-JD Duo"]; export type ProductFamily = (typeof productFamilies)[number]; export declare const productGroups: readonly ["Node 400", "Node 1000", "Node 2000", "Circulo 7", "Circulo 9", "Circulo NG 60", "Circulo NG 70", "Circulo NG 80", "Circulo NG 85", "Circulo NG 100", "Integro 60", "Integro 80", "ACTILINK-S Integro 60", "ACTILINK-S Integro 80", "ACTILINK-JD 8", "ACTILINK-JD 9", "ACTILINK-JD 10", "ACTILINK-JD 12", "ACTILINK-JD Duo 10", "ACTILINK-JD Duo 12"]; export type ProductGroup = (typeof productGroups)[number]; export declare const somanetProductRangeNames: readonly ["Circulo", "Circulo Safe Motion", "Circulo NG", "Custom Projects", "Integro", "Node", "Node Safety", "ACTILINK-S", "ACTILINK-JD", "ACTILINK-JD Duo"]; export type SomanetProductRangeName = (typeof somanetProductRangeNames)[number]; export type SomanetProductRangeNameAll = SomanetProductRangeName | 'Circulo All' | 'Node All'; export interface SomanetProduct { category: ProductCategory; family: ProductFamily; group: ProductGroup; id: number; mpns?: string[]; name: string; } export declare const somanetProducts: SomanetProduct[]; /** * Defines a Somanet product range, including its name and firmware ID bounds. * * @property name - The logical name of the product range, e.g., "Circulo", "Node Safety". * Only values from `SomanetProductRangeName` are allowed. * * @property bounds - A tuple representing the inclusive firmware ID range for this product range. * The first element is the minimum ID, and the second element is the maximum ID. * Used for validating or filtering products by their firmware IDs. * ``` */ export interface SomanetProductRange { name: SomanetProductRangeName; bounds: [number, number]; } /** * List of all defined SOMANET product ranges with their corresponding firmware ID bounds. * * Each entry maps a `SomanetProductRangeName` to a numeric range that represents * the inclusive firmware IDs associated with that product range. * * These ranges are used for: * - Validating firmware IDs for a given product. * - Filtering or grouping products by range. * - Mapping devices to their logical product ranges in the UI or API. */ export declare const somanetProductRanges: SomanetProductRange[]; /** * Finds the Somanet product range corresponding to a given product ID. * * The function resolves the product ID (number, string, or `HardwareDescription`) * to a numeric ID, and then searches through `somanetProductRanges` to find * the range whose bounds include the ID. * * @param productId - The product identifier to look up. Can be: * - A numeric product ID * - A string representation of the ID * - A `HardwareDescription` object * - `null` or `undefined`, in which case the function returns `undefined` * * @returns The `SomanetProductRange` whose bounds contain the resolved ID, * or `undefined` if no matching range is found or the input is invalid. */ export declare function findSomanetProductRangeByProductId(productId?: number | string | HardwareDescription | null): SomanetProductRange | undefined; /** * Finds a SOMANET product by its product ID. * * This function resolves the input `productId` (number, string, or `HardwareDescription`) * to a numeric ID and searches the `somanetProducts` array for a product with a matching ID. * * @param productId - The product identifier to look up. Can be: * - A numeric product ID * - A string representing the product ID * - A `HardwareDescription` object * - `null` or `undefined`, in which case the function returns `undefined` * * @returns The matching `SomanetProduct` object if found, or `undefined` if no match exists * or if the input is invalid. */ export declare function findSomanetProductById(productId?: number | string | HardwareDescription | null): SomanetProduct | undefined; /** * @deprecated use isSomanetProductIdInRange instead */ export declare function isProductIdOfType(productId?: number | string | HardwareDescription | null, type?: SomanetProductRangeNameAll): boolean; /** * Checks whether a given product ID belongs to a specified SOMANET product range. * * This function resolves the `productId` to a numeric ID, determines the corresponding * `SomanetProductRange`, and checks if it matches the provided `rangeName`. * * Special aggregate ranges (`Circulo All` and `Node All`) are supported: * - `"Circulo All"` includes: `"Circulo"`, `"Circulo Safe Motion"`, `"Circulo NG"`, `"ACTILINK-JD"`, `"ACTILINK-JD Duo"` * - `"Node All"` includes: `"Node"`, `"Node Safety"` * * @param productId - The product identifier to check. Can be: * - A numeric product ID * - A string representing the product ID * - A `HardwareDescription` object * - `null` or `undefined`, in which case the function returns `false` * * @param rangeName - The product range to check against. Can be any `SomanetProductRangeName` * or the aggregate values `"Circulo All"` / `"Node All"`. * * @returns `true` if the product belongs to the specified range; otherwise, `false`. */ export declare function isSomanetProductIdInRange(productId?: number | string | HardwareDescription | null, rangeName?: SomanetProductRangeNameAll): boolean; export type SomanetCirculoVariantId = 'ECDN_E1' | 'ECAN' | 'ECBN' | 'ECNN' | 'ECDL' | 'ECDB_E1'; export interface SomanetCirculoVariant { id: SomanetCirculoVariantId; productIds: number[]; } export declare const ECDN_E1_IDS: number[]; export declare const ECAN_IDS: number[]; export declare const ECBN_IDS: number[]; export declare const ECNN_IDS: number[]; export declare const ECDL_IDS: number[]; export declare const ECDB_E1_IDS: number[]; export declare const usableCirculoEncoderPortProductIds: number[][]; export declare const somanetCirculoVariants: SomanetCirculoVariant[]; /** * Determines whether a given encoder port on a device is an internal port * based on the product type and port number. * * The function checks: * - If the product belongs to specific Somanet ranges (`Integro` or `ACTILINK-S`) and the port is 1. * - If the product is a `Circulo NG` and the port is 1 or 2. * - If the product ID matches known Circulo variants for specific ports (ECAN, ECBN, ECDN_E1, ECDL, ECDB_E1). * - Special case product IDs (8510, 8511, 8610, 8611) on ports 1 or 2. * * @param port - The encoder port number (1-based index). * @param productId - Optional product identifier. Can be a number, string, `HardwareDescription`, or `null`. * If omitted, the function returns `false`. * @returns `true` if the specified port is considered internal for the given product, otherwise `false`. */ export declare function isEncoderPortInternal(port: number, productId?: number | string | HardwareDescription | null): boolean; /** * 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. * * @param port - The encoder port number (1-based index). * @param productId - Optional product identifier. Can be a number, string, `HardwareDescription`, or `null`. * If omitted, the function assumes the port is usable. * @returns `true` if the port is usable for the specified product, otherwise `false`. */ export declare function isEncoderPortUsable(port: number, productId?: number | string | HardwareDescription | null): boolean; /** * Determines whether a given internal encoder port is usable for a specific product. * * Checks: * - Circulo products: ports 1 and 2 are considered internal and checked via `isEncoderPortUsable`. * - Integro products: port 1 is always usable. * * @param port - The encoder port number (1-based index). * @param productId - Optional product identifier (number, string, or `HardwareDescription`). * @returns `true` if the port is an internal port and usable, otherwise `false`. */ export declare function isInternalEncoderPortUsable(port: number, productId?: number | string | HardwareDescription | null): boolean; /** * Returns a human-readable name for an encoder port for a given product. * * Circulo products: * - Ports 1–2 → "Integrated encoder 1/2" * - Ports 3–4 → "External encoder 1/2" * - Port 5 → "Digital I/O" * * Other products: returns `"Port X"`. * * @param port - The encoder port number (1-based index). * @param productId - Optional product identifier (number, string, or `HardwareDescription`). * @returns The display name for the encoder port. */ export declare function getEncoderPortName(port: number, productId?: number | string | HardwareDescription | null): string; /** * Resolves a product ID from different possible representations. * * Supports: * - Numbers → returned as-is * - Strings → serial number format or 4-digit product ID * - `HardwareDescription` objects → uses `getIdFromHardwareDescription` * * @param value - The value to resolve into a numeric product ID. * @returns The numeric product ID, or `undefined` if it cannot be resolved. */ export declare function resolveProductId(value?: number | string | HardwareDescription | null): number | undefined; /** * Resolves the product id to use for encoder-recognition helpers * (`isEncoderPortInternal`, `isEncoderPortUsable`, `getEncoderPortName`, * `getCirculoEncoderBatteryModeOptions`, `getEncoderConfigurationExceptionCase`, ...). * * ACTILINK-JD / ACTILINK-JD Duo are Circulo drives wrapped in an assembly, so their assembly id * (6400–6599) is not recognized by the encoder helpers; the underlying Circulo `device.id` * (e.g. `8604`) is. For those, resolve to the device id so all the Circulo encoder logic applies. * * Every other product uses the normal (assembly-preferring) resolution. In particular ACTILINK-S * keeps its assembly id (`6000`) — remapping it to its underlying Integro device would mis-detect * it as an Integro (see `getEncoderConfigurationExceptionCase` case3). * * The remap only happens for a `HardwareDescription`, because only it carries the underlying * `device.id`; a bare assembly id/number cannot be remapped and is returned unchanged. */ export declare function resolveEncoderProductId(value?: number | string | HardwareDescription | null): number | undefined; /** * Returns the number of encoder ports available for a given product. * * Mapping of product families to encoder ports: * - **Circulo All** → 5 ports * - **Integro** → 2 ports * - **Node All** → 3 ports * - **ACTILINK-S** → 2 ports * - **Others** → 5 ports (fallback for unrecognized products) * * @param productId - Optional product identifier. Can be a number, string, or `HardwareDescription`. * @returns The number of encoder ports for the specified product. */ export declare function getNumberOfEncoderPortsByProductId(productId?: number | string | HardwareDescription | null): number; /** * Determines whether a given product is a Safe Motion Module (SMM) type * based on its product ID. * * @param value - The product identifier, which can be a numeric ID, * a string, a {@link HardwareDescription} object, or null/undefined. * @returns `true` if the product is identified as an SMM type; otherwise, `false`. * @remarks * The identification logic follows these hardware rules: * - **Circulo 7 / Circulo 9:** IDs in the range [8600, 8699] are always SMM. * - **ACTILINK-JD:** IDs in the range [6400, 6599] are SMM only if the ID is odd. * - **Circulo NG:** every ID in the range [4100, 5899] is SMM. * - All other IDs (or unresolved values) are considered non-SMM. */ export declare function isProductOfTypeSmm(value?: number | string | HardwareDescription | null): boolean;