tagotip-codec
A no_std Rust codec for the TagoTiP protocol — parse and build uplink/downlink frames with zero heap allocation.
Features
no_stdby default — works on bare-metal and embedded targets- Zero-copy parsing — parsed types borrow directly from the input string
- Frame builder — serialize frames into a caller-provided
&mut [u8]buffer - Full protocol coverage — PUSH (structured + passthrough), PULL, PING, and ACK frames
- Optional
stdfeature for environments with an allocator
Usage
use parse_uplink;
use build_uplink;
use *;
// Parse an uplink frame
let input = "PUSH|4deedd7bab8817ec|sensor_01|[temperature:=32;humidity:=65]";
let frame = parse_uplink.unwrap;
assert_eq!;
assert_eq!;
assert_eq!;
if let Some = &frame.push_body
// Build (serialize) a frame back into bytes
let mut buf = ;
let n = build_uplink.unwrap;
let output = from_utf8.unwrap;
assert_eq!;
Feature flags
| Flag | Description |
|---|---|
std |
Enables std support (not required for core functionality) |
License
Apache-2.0 — see LICENSE for details.