package socketcan

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Errors of the CAN interface

type t =
  1. | CAN_ERR_TX_TIMEOUT
  2. | CAN_ERR_LOSTARB
  3. | CAN_ERR_CRTL
  4. | CAN_ERR_PROT
  5. | CAN_ERR_TRX
  6. | CAN_ERR_ACK
  7. | CAN_ERR_BUSOFF
  8. | CAN_ERR_BUSERROR
  9. | CAN_ERR_RESTARTED

error class which gets encoded in the can-id of error-frames

type status =
  1. | CAN_ERR_CRTL_RX_OVERFLOW
  2. | CAN_ERR_CRTL_TX_OVERFLOW
  3. | CAN_ERR_CRTL_RX_WARNING
  4. | CAN_ERR_CRTL_TX_WARNING
  5. | CAN_ERR_CRTL_RX_PASSIVE
  6. | CAN_ERR_CRTL_TX_PASSIVE
  7. | CAN_ERR_PROT_BIT
  8. | CAN_ERR_PROT_FORM
  9. | CAN_ERR_PROT_STUFF
  10. | CAN_ERR_PROT_BIT0
  11. | CAN_ERR_PROT_BIT1
  12. | CAN_ERR_PROT_OVERLOAD
  13. | CAN_ERR_PROT_ACTIVE
  14. | CAN_ERR_PROT_TX
  15. | CAN_ERR_PROT_LOC_SOF
  16. | CAN_ERR_PROT_LOC_ID28_21
  17. | CAN_ERR_PROT_LOC_ID20_18
  18. | CAN_ERR_PROT_LOC_SRTR
  19. | CAN_ERR_PROT_LOC_IDE
  20. | CAN_ERR_PROT_LOC_ID17_13
  21. | CAN_ERR_PROT_LOC_ID12_05
  22. | CAN_ERR_PROT_LOC_ID04_00
  23. | CAN_ERR_PROT_LOC_RTR
  24. | CAN_ERR_PROT_LOC_RES1
  25. | CAN_ERR_PROT_LOC_RES0
  26. | CAN_ERR_PROT_LOC_DLC
  27. | CAN_ERR_PROT_LOC_DATA
  28. | CAN_ERR_PROT_LOC_CRC_SEQ
  29. | CAN_ERR_PROT_LOC_CRC_DEL
  30. | CAN_ERR_PROT_LOC_ACK
  31. | CAN_ERR_PROT_LOC_ACK_DEL
  32. | CAN_ERR_PROT_LOC_EOF
  33. | CAN_ERR_PROT_LOC_INTERM
  34. | CAN_ERR_TRX_CANH_NO_WIRE
  35. | CAN_ERR_TRX_CANH_SHORT_TO_BAT
  36. | CAN_ERR_TRX_CANH_SHORT_TO_VCC
  37. | CAN_ERR_TRX_CANH_SHORT_TO_GND
  38. | CAN_ERR_TRX_CANL_NO_WIRE
  39. | CAN_ERR_TRX_CANL_SHORT_TO_BAT
  40. | CAN_ERR_TRX_CANL_SHORT_TO_VCC
  41. | CAN_ERR_TRX_CANL_SHORT_TO_GND
  42. | CAN_ERR_TRX_CANL_SHORT_TO_CANH

error status that is encoded in the payload of error-frames

val of_frame : Frame.t -> t list * status list

of_frame f parses the given frame f for it's error class and error status. If f is not an error frame, empty lists are returned.

val string_of : t -> string
val string_of_status : status -> string
OCaml

Innovation. Community. Security.