Skip to content

Personal-Data-Acquisition/bus_interface

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bus_interface

The interface repo/crate for connecting sensor_modules to a bus controller.

Abstracts away the physical hardware and bus being used to allow for platform agnostic communications.

Goals

  • Be Bus independant.
  • Be hardware/sensor independent.
  • Allow Plug and play of new sensor_modules.

Running tests

cd ./bus_interface
cargo test

Using for sensor_module(embedded)

[dependencies]
# This is shown as muli-line for visual appeal only.
bus_interface = {
    git = "https://github.com/Personal-Data-Acquisition/bus_interface.git",
    branch = "main", 
    features = []
    }

Using for Bus Controller

[dependencies]
# This is shown as muli-line for visual appeal only.
bus_interface = {
    git = "https://github.com/Personal-Data-Acquisition/bus_interface.git",
    branch = "main", 
    features = ["bus_master"]
    }

Implimenting needed functions

Controller(CAN master)

  • BUS:: The pub trait for the systems coms.

The controller side of things is pretty much ready to roll. It's assuming it's run on a system that's powerful enough to make use of vectors and the standard library.

Handler(CAN slave)

  • SensorInterface:: this is a public trait.
  • BUS:: another public trait.

For example on a stm32 system you would write a wrapper around the bxCAN functionality that was compatible with the pub trait Bus, in order to use the repo.

About

A template for creating or implimenting sensor shim layers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages