1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! # SMPP Codec
//!
//! `smpp-codec` is a Rust library for encoding and decoding SMPP 3.4 / 5.0 PDUs (Protocol Data Units).
//! It provides a type-safe and efficient way to handle SMPP messages, suitable for building SMSCs (Short Message Service Centers)
//! or ESMEs (External Short Message Entities).
//!
//! ## Features
//!
//! * Full support for SMPP 3.4 / 5.0 PDUs.
//! * Strongly typed structures for all standard operations (Bind, SubmitSm, DeliverSm, etc.).
//! * Support for TLVs (Tagged Length Values) / Optional Parameters.
//! * Easy-to-use API for encoding and decoding.
//!
//! ## Performance Tips
//!
//! This library is designed to be compatible with any `std::io::Write` implementation.
//! When encoding PDUs directly to a network stream, **always use buffering**.
//!
//! * **Recommended**: Encode to a `Vec<u8>` first, then write the vector to the stream.
//! * **Alternative**: Wrap your `TcpStream` in a `std::io::BufWriter`.
//!
//! *Passing a raw `TcpStream` to `encode` will result in many small system calls, significantly reducing throughput.*
//!
//! See [docs/PERFORMANCE.md](docs/PERFORMANCE.md) for a detailed guide.
//!
//! ## Example
//!
//! ```rust
//! use smpp_codec::pdus::BindRequest;
//! use smpp_codec::common::BindMode;
//!
//! let mut bind_req = BindRequest::new(
//! 1, // Sequence number
//! BindMode::Transmitter,
//! "my_system_id".to_string(),
//! "password".to_string(),
//! );
//!
//! // Encode to bytes
//! let mut buffer = Vec::new();
//! bind_req.encode(&mut buffer).unwrap();
//! ```
// Expose the common module (constants, errors, enums)
/// Common constants, enums, and error types.
/// Encoding and decoding utilities (GSM 7-bit, etc.).
/// Tag-Length-Value (TLV) support.
// Expose the PDUs module (the structs for specific operations)
/// PDU definitions and submodules.
/// Message splitting and concatenation utilities.