Skip to content

Commit

Permalink
travis and some README updates
Browse files Browse the repository at this point in the history
  • Loading branch information
biancode committed May 11, 2018
1 parent e1753fe commit bfaca40
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
sudo: required
language: rust
matrix:
include:
- rust: stable
- rust: nightly

addons:
apt:
packages:
- libudev-dev
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- binutils-dev
- cmake
sources:
- kalakris-cmake

# load travis-cargo
before_script:
- |
export PATH=$HOME/.local/bin:$PATH
cargo install cargo-update || echo "cargo-update already installed" &&
cargo install cargo-travis || echo "cargo-travis already installed" &&
cargo install-update -a
script:
- |
cargo build &&
cargo test
after_success:
- cargo coveralls
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
[![Crates.io version](https://img.shields.io/crates/v/modbus-iiot.svg)](https://crates.io/crates/modbus-iiot)
[![Docs](https://docs.rs/modbus-iiot/badge.svg)](https://docs.rs/modbus-iiot/0.1.0/modbus_iiot/)
[![Coverage](https://coveralls.io/repos/github/BiancoRoyal/modbus-iiot-rust/badge.svg?branch=master)](https://coveralls.io/github/BiancoRoyal/modbus-iiot-rust?branch=master)
[![CI](https://travis-ci.org/BiancoRoyal/modbus-iiot-rust.svg?branch=master)](https://travis-ci.org/BiancoRoyal/modbus-iiot-rust/)
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/BiancoRoyal/modbus-iiot-rust.svg)](http://isitmaintained.com/project/BiancoRoyal/modbus-iiot-rust "Average time to resolve an issue")
[![Percentage of issues still open](http://isitmaintained.com/badge/open/BiancoRoyal/modbus-iiot-rust.svg)](http://isitmaintained.com/project/BiancoRoyal/modbus-iiot-rust "Percentage of issues still open")

The Modbus IIoT Library
========================

Expand Down
5 changes: 5 additions & 0 deletions examples/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ fn main()
println!("Hello, Modbus world!");
let mut client = TcpClient::new("192.168.1.1");
client.connect();

// read register from address 266 (WAGO controllers)
let response = client.read_holding_registers(266, 1);
println!("Response: {:?}", response);

// read 10 words starting at address 256 (WAGO controllers)
let response = client.read_holding_registers(256, 10);
println!("Response: {:?}", response);
Expand Down

0 comments on commit bfaca40

Please sign in to comment.