UNPKG

rxjs-obd

Version:

RxJS Implementation for OBD (On Board Diagnostics) of vehicles via ELM 327 connections.

54 lines (53 loc) 1.7 kB
import { Subject } from 'rxjs'; import { OBDConnection } from '../connection'; import { OBDData } from './OBDData'; /** * OBD Event that will be used in the internal part of the rxjs-obd stream. */ export declare class OBDEvent { private _id; private _connection; private _subject; private _data; /** * Constructor for OBD Events, only rxjs-obd observables should use it. * * @param _id The event identifier. * @param _connection The connection to ELM 327 OBD Reader. * @param _subject The subject to be notified only by pluckODBData from rxjs-obd. * @param _data The previous ODB data (Optional). */ constructor(_id: number, _connection: OBDConnection, _subject: Subject<OBDData>, _data?: OBDData); /** * Update the supported PIDs. * * @param segment The segment. * @param value The value. */ supportedPIDs(segment: string, value: number): void; /** * Update a field of the public OBD Data. * @param name The field name. * @param value the new value of field. */ update(name: string, value: number | string): void; /** * The subject to be notified only by pluckODBData from rxjs-obd. */ next(data: OBDData): void; /** * Return the event id. * @returns the event id. */ readonly id: number; /** * Return the internal connection connection to be used by rxjs-obd operators only. * @returns The connection connection to ELM 327 OBD Reader. */ readonly connection: OBDConnection; /** * Return the public data of the rxjs-obd observables. * @returns The public data. */ readonly data: OBDData; }