use dvb_bbframe::crc::crc8;
use dvb_bbframe::header::Bbheader;
fn main() {
#[rustfmt::skip]
let mut header = [
0xD8, 0x00, 0x05, 0xF0, 0xE0, 0x30, 0x47, 0x00, 0x00, 0x00, ];
header[9] = crc8(&header[..9]);
let hdr = Bbheader::parse(&header).expect("valid BBHEADER");
println!("mode : {:?}", hdr.mode);
println!("ts_gs : {:?}", hdr.matype.ts_gs);
println!("ccm : {}", hdr.matype.ccm);
println!("issyi : {}", hdr.matype.issyi);
println!("UPL : {} bits", hdr.upl);
println!("DFL : {} bits", hdr.dfl);
println!("SYNC : {:#04X}", hdr.sync);
println!("SYNCD : {}", hdr.syncd);
}