[][src]Module brewdrivers::cli

Command line interaction for all driver modules

This is the command line interface (CLI) for brewdrivers. It provides a way to a) run the brewdrivers server and b) interact with the hardware directly from the command line (normally for debugging and testing).

To run it, just run the brewdrivers binary provided in the Github releases, or you can run it from Rust through the cli::run function

Commands

Server

Coming soon...

Relays

From the CLI you can:

  1. Set a relay
  2. Get a relay status
  3. Get all relay statuses
  4. Set controller number
// Set a relay
// Provide controller number, relay number, and new state
// This turns relay 4 on controller #2 on
$ brewdrivers relay 2 4 1
// And back off again
$ brewdrivers relay 2 4 0

// Get a relay status
// Same as above, but don't provide a state
$ brewdrivers relay 2 4

// Get all relay statuses
$ brewdrivers relay 2 all
Relay 0: Off
Relay 1: On
...

// Set controller number
Coming soon...

Functions

run

Runs the CLi