6 releases (1 stable)
1.0.0 | Feb 26, 2021 |
---|---|
0.4.1 | Feb 24, 2021 |
0.3.0 | Feb 14, 2021 |
0.2.0 | Feb 14, 2021 |
0.1.0 | Feb 14, 2021 |
#84 in #control-system
21KB
362 lines
BCS network
This crate contains all the necessary networking components for the BCS to operate.
note: this package is called
NavasotaBrewing/network
, but because the name needs to be more specific for crates.io, the crate is known asbcs_network
for Brewery Control System-network. I wish crates.io had namespacing.
brewdrivers
is all the device drivers and a CLI to use them; brewkit
is the web interface for the brewer to use; this crate is the networking components that link these two together.
Originally, everything here was part of brewdrivers
, which was convenient but cumbersome. Compile times were very long on the RPi, and the executable had grown to 100+ MB for debug. This pulls about 85 MB debug out of brewdrivers
so it can remain thinner.
Usage
There are 2 places you'd want to use this package:
- The master station
- The RTUs
See the architecture page for more information about layout.
On the master station, you don't need the device drivers because there's no hardware connected to it:
$ cargo install bcs_network
$ bcs_network master
On the RTUs, you do need brewdrivers
:
$ cargo install bcs_network --features=rtu
$ bcs_network rtu
Cargo should handle everything for you.
Specifying the Serial Port
The default serial port is /dev/ttyAMA0
. If this is incorrect, set the environment variable BREWDRIVERS_PORT
$ BREWDRIVERS_PORT=/dev/ttyUSB0 bcs_network rtu
Dependencies
~15–29MB
~471K SLoC