package socketcan
Module Socketcan.BCM
The SocketCAN BroadCast Manager (BCM) allows to send CAN message frames from kernel space; the kernel e.g. can then send periodic messages without having to be triggered by user space.
val create : string -> (t, [> `EUnix of Unix.error ]) Result.resultcreate s opens the can-interface named s (e.g. "can0")
val close : t -> unitclose s closes the socket s.
type timer = Posix_time.Timeval.ttime value with seconds tv_sec and microseconds tv_usec
val write :
t ->
opcode list ->
flag list ->
(int * timer * timer * Id.t) ->
Frame.t list ->
(unit, [> `EUnix of Unix.error ]) Result.resultwrite socket ops flags (x, t1, t2, id) frames writes the configuration to the broadcast socket
val fd : t -> Unix.file_descrfs s will return a Unix-file-descriptor of the socket s; this file-descriptor can then be used with e.g. Unix.select.