hdlc
hdlc
Rust implementation of a High-level Data Link Control (HDLC) library with support of the IEEE standard.
Usage
Add hdlc
to Cargo.toml
[]
= "^0.1.3"
or
[]
= "https://github.com/CLomanno/hdlc"
Add this to crate root
extern crate hdlc;
Encode packet
extern crate hdlc;
use ;
// Set up your vector of bytes and generate your Special Characters
let msg: = vec!;
let cmp: = vec!;
let chars = default;
// Encode your message
let result = encode;
assert!;
assert_eq!;
Custom Special Characters
extern crate hdlc;
use ;
// Set up your vector of bytes and generate your Special Characters
let msg: = vec!;
let cmp: = vec!;
let chars = new;
// Encode your message
let result = encode;
assert!;
assert_eq!
Decode packet
extern crate hdlc;
use ;
// Set up your vector of bytes and generate your Special Characters
let chars = default;
let msg: = vec!;
let cmp: = vec!;
// Decode your message
let result = decode;
assert!;
assert_eq!;
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.