diff --git a/examples/tests/18-e2sm.rs b/examples/tests/18-e2sm.rs index 9766e5e..3e42394 100644 --- a/examples/tests/18-e2sm.rs +++ b/examples/tests/18-e2sm.rs @@ -5,5 +5,18 @@ mod e2sm { } fn main() { + use asn1_codecs::{aper::AperCodec, PerCodecData}; eprintln!("E2SM"); + + // This will break: Fixed + let decode_str = "080000000100000000002043514901200000"; + + // This one works if it is uncommented + //let decode_str = "08000000010000000000204351490120000000"; + + let decode_hex = hex::decode(decode_str).unwrap(); + let mut codec_data = PerCodecData::from_slice_aper(&decode_hex); + let e2sm_kpmv3_pdu = e2sm::E2SM_KPM_IndicationMessage::aper_decode(&mut codec_data); + + eprintln!("e2sm_kpmv3_pdu: {:#?}", e2sm_kpmv3_pdu.unwrap()); }