multican

Crates.iomultican
lib.rsmultican
version0.6.0-beta.1
sourcesrc
created_at2019-10-28 15:15:09.806318
updated_at2020-08-21 11:19:30.195799
descriptionProvides connections to multiple CAN busses at the same time. Allows use of different types of networks
homepage
repositoryhttps://github.com/Dawn-Equipment-Company/multican
max_upload_size
id176399
size101,640
Nick Gamroth (thebeekeeper)

documentation

README

MultiCan

Library that supports different CANBUS scenarios, especially those that require multiple busses to operate at the same time.

Typical usage: 3 busses, using mixed network types

[[can_networks]]
id = 0
kind = "socketcan"

[[can_networks]]
id = 1
kind = "socketcan"

[[can_networks]]
id = 2
kind = "udp"

// read the config file however you'd like
let network_config = read_config("can.toml");
let network = multican::from_config(network_config);

// receive from all busses:
for rx in network.recv() {
    println!("RX: {:?}", rx);
}

// send a message to bus 2
let m = CanMessage { bus: 2, header: 0x12345678, data: vec![1, 2, 3, 4] };
network.send(m);

Commit count: 31

cargo fmt