Expand description
A rust driver for the Pfeiffer/Inficon TPG36x vacuum gauge controller.
This driver is by default set up to work with the dual gauge model (TPG362), but can also be set up to be used with the single gauge model (TPG361).
§Example
This example shows the usage via the TCP/IP interface. An example for the serial port is shown
in the Tpg36x documentation.
use instrumentrs::TcpIpInterface;
use pfeiffer_tpg36x::{SensorStatus, Tpg36x};
// IP address and port of the instrument. Adjust to your setup!
let addr = "192.168.1.10:8000";
// Create a new TCP/IP instrument interface and use it to create a new Tpg36x instance.
let tcpip_inst = TcpIpInterface::simple(addr).unwrap();
let mut inst = Tpg36x::try_new(tcpip_inst).unwrap();
// Check if the the first pressure sensor is on and if so, read the pressure and print it.
let mut sensor1 = inst.get_channel(0).unwrap();
let status = sensor1.get_status().unwrap();
if status == SensorStatus::On {
println!("Current pressure: {}", sensor1.get_pressure().unwrap());
}Structs§
- Channel
- Channel structure representing a single channel of the TPG36x.
- Ethernet
Config - Ethernet configuration for the TPG36x.
- Tpg36x
- A rust driver for the TPG36x.
Enums§
- Dhcp
Config - An enum for the DHCP configuration.
- Pressure
Unit - All the units the TPG36x can be configured to use.
- Sensor
Status - Status that can be sent to the an individual sensor to change its state.
- Tpg36x
Measurement - Since the TPG36x can return either a pressure or a voltage measurement, we return an enum for the measurements with unitful values that can contain either pressure or voltage.