Diagnostic: Diagnostic information

更新时间:
2024-05-15
下载文档

Diagnostic: Diagnostic information

This module is the vehicle diagnostic module. This module is provided in EdgerOS 2.0.0 and later, and apps need to have vehicle.diagnostic permission to use this module.

User can use the following code to import the Diagnostic module.

var Diagnostic = require('vehicle/diagnostic');   

Support

The following shows Diagnostic module APIs available for each permissions.

 User ModePrivilege Mode
Diagnostic
diagnostic.request
diagnostic.release
diagnostic.bms
diagnostic.thermal
diagnostic.fault
bms.statistics
bms.batteries
bms.obc
bms.dcdc
bms.lvsupply
bms.lvusage
thermal.status
fault.sys
fault.bms

Diagnostic Class

new Diagnostic()

  • Returns: {Object} Diagnostic object.

Create a diagnostic object.

Diagnostic Object

diagnostic.request(callback)

  • callback {Function} Callback.
    • error {Error} Specify the error message when the request is failed.

Request for vehicle diagnostic information acquire. After the request is successful, the vehicle diagnostic information can be obtained.

diagnostic.release()

Release the current diagnostic object, no operation is allowed after the object is released.

The object needs to be released as soon as possible when it is no longer used.

diagnostic.bms

  • {Object}

Get diagnostic BMS object.

diagnostic.thermal

  • {Object}

Get diagnostic thermal object.

diagnostic.fault

  • {Object}

Get diagnostic fault object.

BMS Object

bms.statistics(callback)

  • callback {Function} Callback.
    • error {Error} Specify the error message when failed.
    • statistics {Object} BMS statistics.

Get BMS statistics. The statistics member is not yet public.

bms.batteries(callback)

  • callback {Function} Callback.
    • error {Error} Specify the error message when failed.
    • batteries {Object} BMS batteries information.

Get BMS batteries information. The batteries member is not yet public.

bms.obc(callback)

  • callback {Function} Callback.
    • error {Error} Specify the error message when failed.
    • obc {Object} BMS OBC information.

Get BMS OBC information. The obc member is not yet public.

bms.dcdc(callback)

  • callback {Function} Callback.
    • error {Error} Specify the error message when failed.
    • dcdc {Object} BMS DCDC information.

Get BMS OBC information. The dcdc member is not yet public.

bms.lvsupply(callback)

  • callback {Function} Callback.
    • error {Error} Specify the error message when failed.
    • lvsupply {Object} BMS low voltage supply information.

Get BMS low voltage supply information. The lvsupply member is not yet public.

bms.lvusage(callback)

  • callback {Function} Callback.
    • error {Error} Specify the error message when failed.
    • lvusage {Object} BMS low voltage usage information.

Get BMS low voltage usage information. The lvusage member is not yet public.

BMS Object Events

The bms object inherits from the EventEmitter class. The following events are thrown in some specific situations.

statistics

This event is emitted when statistics is updated.

batteries

This event is emitted when batteries is updated.

obc

This event is emitted when obc is updated.

dcdc

This event is emitted when dcdc is updated.

lvsupply

This event is emitted when lvsupply is updated.

lvusage

This event is emitted when lvusage is updated.

Thermal Object

thermal.status(callback)

  • callback {Function} Callback.
    • error {Error} Specify the error message when failed.
    • thermal {Object} Thermal information.

Get vehicle thermal information. The thermal member is not yet public.

Thermal Object Events

The thermal object inherits from the EventEmitter class. The following events are thrown in some specific situations.

status

This event is emitted when status is updated.

Fault Object

fault.sys(callback)

  • callback {Function} Callback.
    • error {Error} Specify the error message when failed.
    • fault {Object} System fault information.

Get system fault information. The fault member is not yet public.

fault.bms(callback)

  • callback {Function} Callback.
    • error {Error} Specify the error message when failed.
    • fault {Object} BMS fault information.

Get BMS fault information. The fault member is not yet public.

Fault Object Events

The fault object inherits from the EventEmitter class. The following events are thrown in some specific situations.

sys

This event is emitted when system fault is updated.

bms

This event is emitted when BMS fault is updated.

文档内容是否对您有所帮助?
有帮助
没帮助