macros for plctag
please use it with plctag
With this crate, the macros derive plctag_core::Decode
and plctag_core::Encode
for you automatically.
```rust use plctagcore::{RawTag, Result, ValueExt}; use plctagderive::{Decode, Encode};
struct MyUDT { #[tag(offset=0)] a: u32, #[tag(offset=4)] b: u32, }
fn main() { let tag = RawTag::new("make=system&family=library&name=debug&debug=4", 100).unwrap(); let res = tag.read(100); assert!(res.isok()); let udt: MyUDT = tag.getvalue(0).unwrap(); asserteq!(udt.a, 4); asserteq!(udt.b, 0); }
```
MIT