/** * Checks if a string is a valid representation of a CANopen PDO mapping entry. * * A valid entry is a 32-bit hexadecimal value representing: * - **Index** (16 bits) * - **Subindex** (8 bits) * - **Bit Length** (8 bits) * * It accepts formats with or without the '0x' prefix (e.g., "0x60400010" or "60400010"). * * @param value The string to validate. * @returns `true` if the string follows the PDO mapping entry hex format, `false` otherwise. * * @example * isPdoMappingEntry('0x60400010'); // true * isPdoMappingEntry('60400010'); // true * isPdoMappingEntry('invalid'); // false */ export declare function isPdoMappingEntry(value: string): boolean; /** * Represents the components of a single CANopen PDO Mapping Entry. * * A PDO Mapping Entry is a 32-bit value describing which object dictionary parameter * maps to a specific location in a PDO message. * * The 32-bit structure is defined as: * - **Index (16-bit):** The object dictionary index (e.g., `0x6040`). * - **Subindex (8-bit):** The specific sub-element of the object (e.g., `0x00`). * - **Bit Length (8-bit):** The size of the data in bits (e.g., `16`). */ export interface PdoMappingEntry { /** * The Object Dictionary Index (16-bit unsigned integer). * * @example 0x6040 (Controlword) */ index: number; /** * The Object Dictionary Subindex (8-bit unsigned integer). * * @example 0x00 (Main value) */ subindex: number; /** * The length of the mapped parameter in bits (8-bit unsigned integer). * * @example 16 (for a 16-bit integer) * @example 0x10 (hex representation of 16) */ bitLength: number; } /** * Parses a CANopen PDO Mapping Entry (32-bit value) into its components. * * Structure: Index (16-bit) | Subindex (8-bit) | Bit Length (8-bit) * * @param entry The mapping entry as a raw number or hex string (e.g., 0x60400010). * @returns An object containing the parsed index, subindex, and bit length. * @throws Error if the input string is not a valid hex number. */ export declare function parsePdoMappingEntry(entry: number | string): PdoMappingEntry;