export interface PositionLoggerOptions { /** Logging interval in seconds (default: 0.01) */ interval?: number; /** Maximum number of points to keep in history (default: 10000) */ maxHistorySize?: number; } export interface PositionHistoryUpdate { /** Replacement and/or appended points */ points: Float64Array; /** Number of trailing points to replace, or the complete history */ replace: number | "all"; } /** * Position Logger for tracking machine tool path * * This class provides functionality to log the position of a LinuxCNC machine tool * over time. All positions are returned as Float64Array with 10 elements per point: * [x, y, z, a, b, c, u, v, w, motionType] * * Use PositionLoggerIndex enum (or destructure it for shorter access like data[X]) and POSITION_STRIDE constant for array access. */ export declare class PositionLogger { private nativeLogger; constructor(); /** * Start position logging * @param options Logging options */ start(options?: PositionLoggerOptions): void; /** * Stop position logging */ stop(): void; /** Clear the position history. */ clear(): void; /** * Get the current position as a Float64Array * Layout: [x, y, z, a, b, c, u, v, w, motionType] * @returns Float64Array with 10 values, or null if no position available */ getCurrentPosition(): Float64Array | null; /** * Get the motion history as a Float64Array * Layout: [x, y, z, a, b, c, u, v, w, motionType] repeated for each point * Use POSITION_STRIDE (10) to iterate through points * @param startIndex Starting index (default: 0) * @param count Number of points to retrieve (default: all) * @returns Float64Array with 10 values per point */ getMotionHistory(startIndex?: number, count?: number): Float64Array; /** * Get the number of points in the motion history * @returns Number of logged points */ getHistoryCount(): number; /** * Get the next atomic history mutation for a single streaming consumer. * @returns Exact tail replacement update, or null when history did not change */ getHistoryUpdate(): PositionHistoryUpdate | null; /** * Make the next history update replace the consumer's complete snapshot. */ resetHistoryUpdates(): void; /** * Get the most recent points from the history * @param count Number of recent points to get (default: 10) * @returns Float64Array with 10 values per point */ getRecentHistory(count?: number): Float64Array; }