import { PIDArgs } from '../interfaces'; /** * Used to create PID instances that will parse OBD data * @constructor * @param {Object} opts */ export declare abstract class PID { private constname; private fullpid; private opts; protected maxRandomValue: number; protected minRandomValue: number; constructor(opts: PIDArgs); protected getRandomInt(min: number, max: number): number; getRandomBytes(min?: number, max?: number): string[]; getName(): string; getPid(): string; /** * Returns the number of bytes that should should be extracted for * parsing in a payload of this PID type */ getParseableByteCount(): number; /** * Returns a prettier representation of a value that this PID represents, by * using the passed "units" value for the PID * * e.g f(10) => 10% * e.g f(55) => 55°C * * @param {Number} value * @return {String} */ getFormattedValueForBytes(bytes: string[]): string; /** * Generates the code that should be written to the ECU for querying this PID * Example is "010C" (CURRENT_DATA + "OC") for the engine RPM * * @return {String} */ getWriteString(): string; /** * The default conversion function for each PID. It will convert a byte value * to a number. * * Many PIDs will override this since more involved conversions are required * * @return {Number} */ getValueForBytes(bytes: string[]): number | string; /** * Given an input string of bytes, this will return them as pairs * e.g AE01CD => ['AE', '01', 'CD'] */ private getByteGroupings(str); } export declare class FuelLevel extends PID { constructor(); getValueForBytes(bytes: string[]): number; } export declare class Rpm extends PID { constructor(); getValueForBytes(bytes: string[]): number; getRandomBytes(): string[]; } export declare class CoolantTemp extends PID { constructor(); getValueForBytes(byte: string[]): number; } export declare class VehicleSpeed extends PID { constructor(); getValueForBytes(bytes: string[]): number; } export declare class CalculatedEngineLoad extends PID { constructor(); getValueForBytes(bytes: string[]): number; } export declare class FuelPressure extends PID { constructor(); getValueForBytes(bytes: string[]): number; } export declare class IntakeManifoldAbsolutePressure extends PID { constructor(); getValueForBytes(bytes: string[]): number; } export declare class IntakeAirTemperature extends PID { constructor(); getValueForBytes(bytes: string[]): number; } export declare class MafAirFlowRate extends PID { constructor(); getRandomBytes(min?: number, max?: number): string[]; getValueForBytes(bytes: string[]): number; } export declare class ThrottlePosition extends PID { constructor(); getValueForBytes(bytes: string[]): number; } export declare class ObdStandard extends PID { constructor(); getValueForBytes(bytes: string[]): string; } export declare class FuelSystemStatus extends PID { private types; constructor(); getRandomBytes(min?: number, max?: number): string[]; getValueForBytes(bytes: string[]): string; } export declare class SupportedPids extends PID { constructor(); getRandomBytes(min?: number, max?: number): string[]; getValueForBytes(bytes: string[]): string; }