CANbus_Diag.GetBusState (METH)ΒΆ

METHOD GetBusState : DED.BUS_STATE

Returns the bus state of the associated CANBus.

Following table defines the mapping between CAA Device Diagnosis DED.BUS_STATE and CL2.BUSSTATE.

CAA Device Diagnosis

CANbus state

DED.BUS_STATE.RUNNING

CL2.BUSSTATE.ERR_FREE,
CL2.BUSSTATE.ACTIVE,
CL2.BUSSTATE.WARNING (with xDiagnosisInfoAvailable``=``TRUE)
CL2.BUSSTATE.PASSIVE (with xDiagnosisInfoAvailable``=``TRUE)

DED.BUS_STATE.ERROR

Specified CAN interface not found,
CL2.BUSSTATE.BUSOFF

DED.BUS_STATE.STOPPED

CAN driver is not ready (e.g. in case of gateway devices)

DED.BUS_STATE.UNKNOWN

CL2.BUSSTATE.UNKNOWN

InOut:

Scope

Name

Type

Comment

Return

GetBusState

DED.BUS_STATE

current bus state.

Output

xDiagnosisInfoAvailable

BOOL

TRUE, if red exclamation mark in device tree

eError

DED.ERROR

DED.ERROR.NO_ERROR if bus state was retrieved wihout error.