IoDrvJ1939Diag (FB) ¶ FUNCTION_BLOCK IoDrvJ1939Diag EXTENDS IoDrvJ1939 IMPLEMENTS DED.IDevice2, DED.IBus, DED.IStack, DED.IReconfigureProvider This function block implements the diagnosis code for CAA Device Diagnosis. Properties: ChildNodeCount Connector Enable FirstChildNode Index IsRootNode NextSiblingNode ParentNode SiblingNodeCount Methods: GetBusInfo GetBusState GetDeviceInfo GetDeviceState GetQoS Structure: IBus GetBusInfo (Method) GetBusState (Method) GetQoS (Method) IDevice GetDeviceInfo (Method) GetDeviceState (Method) INode ChildNodeCount (Property) Connector (Property) Enable (Property) FirstChildNode (Property) Index (Property) IsRootNode (Property) NextSiblingNode (Property) ParentNode (Property) SiblingNodeCount (Property)
IBus ¶ GetBusInfo (Method) GetBusState (Method) GetQoS (Method)
IoDrvJ1939Diag.GetBusInfo (METH) ¶ METHOD GetBusInfo : DED.ERROR Returns the bus information of the current node InOut: Scope Name Type Comment Return GetBusInfo DED.ERROR Inout buiInfo DED.BUS_INFO Bus information struct
IoDrvJ1939Diag.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 DED.BUS_STATE.ERROR no driver found, CL2.BUSSTATE.BUSOFF , CL2.BUSSTATE.PASSIVE 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.
IoDrvJ1939Diag.GetQoS (METH) ¶ METHOD GetQoS : DED.ERROR QualityInfo contains following information: usiBusload: Current Busload (if supported by CAN driver, else always 0) ctError: Total Sum of TxErrorCounter, RxErrorCounter and LostCounter. Returns quality of service information for the CANbus. Interpretation of DED.QOS_INFO is as follows: Component Interpretation ctError Total sum of TxErrorCounter, RxErrorCounter and LostCounter. usiBusload Current busload in percent (if supported by CAN driver, else always 0) InOut: Scope Name Type Comment Return GetQoS DED.ERROR DED.ERROR.NO_ERROR if no error occurred while getting information. Inout QualityInfo DED.QOS_INFO
IDevice ¶ GetDeviceInfo (Method) GetDeviceState (Method)
IoDrvJ1939Diag.GetDeviceInfo (METH) ¶ METHOD GetDeviceInfo : DED.ERROR Returns the device information of the current node InOut: Scope Name Type Comment Return GetDeviceInfo DED.ERROR Inout deiInfo DED.DEVICE_INFO Device information struct
IoDrvJ1939Diag.NextSiblingNode (PROP) ¶ PROPERTY NextSiblingNode : DED.INode returns the next sibling node at the same level used for step through all nodes
IoDrvJ1939Diag.ParentNode (PROP) ¶ PROPERTY ParentNode : DED.INode Returns the parent node or zero if already the root node is reached
IoDrvJ1939Diag.SiblingNodeCount (PROP) ¶ PROPERTY SiblingNodeCount : CAA.COUNT Returns the number of sibling (same level) nodes