import { ModelInformation, RunnerClassifyResponseSuccess, RunnerSetThresholdResponse, SetRunnerBlockThreshold } from './linux-impulse-runner-types'; export * from './linux-impulse-runner-types'; export declare class LinuxImpulseRunner { private _path; private _runner; private _helloResponse; private _runnerEe; private _id; private _stopped; private _socket; private _inputShm; private _freeformOutputShm; private _verbose; private _shmBehavior; private _valgrind; private _stdout; private _tempDir; /** * Start a new impulse runner * @param path Path to the runner's executable */ constructor(path: string, opts?: { valgrind?: boolean; verbose?: boolean; shmBehavior?: 'auto' | 'always' | 'never'; throwOnShmInitFailed?: boolean; }); /** * Initialize the runner * This returns information about the model */ init(modelPath?: string): Promise; /** * Whether we should warm up the GPU for this model * @param modelInfo Model information returned from EIM (hello message response) */ shouldWarmGpu(modelInfo: ModelInformation): boolean; /** * Stop the classification process */ stop(): Promise; /** * Get information about the model, this is only available * after the runner has been initialized */ getModel(): ModelInformation; /** * Classify data * @param data An array of numbers, already formatted according to the rules in * https://docs.edgeimpulse.com/docs/running-your-impulse-locally-1 */ classify(data: number[], timeout?: number): Promise; /** * Classify data (continuous mode, pass in slice_size data) * @param data An array of numbers, already formatted according to the rules in * https://docs.edgeimpulse.com/docs/running-your-impulse-locally-1 */ classifyContinuous(data: number[], timeout?: number): Promise; setLearnBlockThreshold(obj: SetRunnerBlockThreshold): Promise; /** * Set a parameter for the model * @param parameters An object containing the parameters to set */ setParameter(parameters: { [key: string]: number | string | boolean; }): Promise; private sendHello; private send; /** * Whether a file exists (Node.js API cannot be converted using promisify) * @param path */ private exists; private runTensorRTWarmup; private mapClassifyResponseSuccess; private cleanupTempDirAsync; }