use smpp_codec::common::{Npi, Ton};
use smpp_codec::pdus::AlertNotification;
use smpp_codec::tlv::Tlv;
fn main() -> Result<(), Box<dyn std::error::Error>> {
println!("=== SMPP Alert Notification Example ===");
let mut alert = AlertNotification::new(
200, "source_addr".to_string(),
"esme_addr".to_string(),
)
.with_source_addr(Ton::International, Npi::Isdn, "123".to_string())
.with_esme_addr(Ton::National, Npi::Telex, "456".to_string());
let tlv = Tlv::new_u8(0x0402, 1); alert.add_tlv(tlv);
println!("Alert Notification: {:?}", alert);
let mut buf = Vec::new();
alert.encode(&mut buf)?;
println!("Encoded {} bytes", buf.len());
Ok(())
}