package socketcan
Library
Module
Module type
Parameter
Class
Class type
CAN identifiers of either standard (11 Bit) or extended frame format (29 Bit) size
A CAN identifier of up to 29 bit; it includes the property of it either being a CAN 2.0A (sff, 11 Bit) or CAN 2.0B (eff, 29 Bit) identifier.
val create_sff : int -> t
Create a valid CAN 2.0A standard frame format identifier with 11 bit from an integer value. Masks all bits that are not in sff_mask
.
val create_eff : int -> t
Create a valid CAN 2.0B extended frame format identifier with 29 bit from an integer value. Masks all bits that are not in eff_mask
.
val to_int : t -> int
Get the 11 bit (sff) or 29 bit (eff) CAN identifier as integer.
make_sff id
transforms a CAN id making it a standard frame format identifier. If id
already is a CAN2.0A identifier, this is a no-op.
val is_sff : t -> bool
is_sff id
returns whether the id id
is a standard frame format identifier.
make_eff id
transforms a CAN id making it an extended frame format identifier. If id
already is a CAN2.0B identifier, this is a no-op.
val is_eff : t -> bool
is_eff id
returns whether the id id
is an extended frame format identifier. This is the negation of is_sff
: is_eff x = not is_sff x
.