ukhasnet-parser

Crates.ioukhasnet-parser
lib.rsukhasnet-parser
version0.4.0
sourcesrc
created_at2016-03-20 15:13:42.663854
updated_at2017-03-18 14:29:11.981884
descriptionA parser for the UKHASnet protocol
homepagehttps://github.com/adamgreig/ukhasnet-parser
repositoryhttps://github.com/adamgreig/ukhasnet-parser
max_upload_size
id4501
size16,973
Adam Greig (adamgreig)

documentation

README

ukhasnet-parser

A parser for the UKHASnet protocol written in Rust.

See the examples directory for further usage, or simply:

extern crate ukhasnet_parser;

use ukhasnet_parser::{parse};

pub fn main() {
    let s = "2bT12,15H38:test[AG]".to_owned();
    match parse(&s) {
        Ok(p) => println!("{:?}", p),
        Err(e) => println!("{}", e),
    }
}
$ cargo run --example simple
Packet { repeat: 2, sequence: 'b', data: [Temperature([12, 15]), Humidity([38])], comment: Some("test"), path: ["AG"] }
Commit count: 33

cargo fmt