Expand description
A rust driver for the DigOutBox
This driver provides all functionalities of the DigOutBox. Connecting the DigOutBox via USB cable to your computer creates a serial port interface that you can use to communicate with the box.
§Example
use instrumentrs::SerialInterface;
use digoutbox::DigOutBox;
let port = "/dev/ttyACM0";
let baud = 9600;
// Create a new serial instrument interface and use it to create a new DigOutBox instance.
let inst_interface = SerialInterface::simple(port, baud).unwrap();
let mut inst = DigOutBox::new(inst_interface);
// Get the first channel (index 0) and set it to high.
let mut channel = inst.get_channel(0).unwrap();
channel.set_output(true).unwrap();
// Now turn all channels off.
inst.all_off().unwrap();
Structs§
- Channel
- Channel structure representing a single channel of the DigOutBox.
- DigOut
Box - A rust driver for the DigOutBox.
Enums§
- Interlock
Status - Enum representing the current interlock state of the device.
- Software
Control Status - Enum representing the current software lockout state of the device.