use core::time::Duration;
use crate::driver::DriverBounds;
use crate::stack::StackBounds;
use crate::transport::TransportBounds;
pub const DEFAULT_POLL_INTERVAL: Duration = Duration::from_millis(100);
pub const DEFAULT_REPLY_TIMEOUT: Duration = Duration::from_millis(1000);
pub const MAX_SETUP_ATTEMPTS: u8 = 5;
pub const MAX_REASSEMBLY_LEN: usize = 2 * 1024 * 1024;
pub const MAX_OUTBOUND_QUEUE: usize = 64;
pub const MAX_SESSIONS: usize = 32;
pub const MAX_PENDING_NOTIFICATIONS: usize = 1024;
pub const SLOT_READY_GRACE: Duration = Duration::from_secs(12);
pub const SLOT_RETRY: Duration = Duration::from_millis(250);
pub const MAX_STALLED_WRITES: u32 = 20;
pub const TRANSPORT: TransportBounds = TransportBounds {
poll_interval: DEFAULT_POLL_INTERVAL,
reply_timeout: DEFAULT_REPLY_TIMEOUT,
max_setup_attempts: MAX_SETUP_ATTEMPTS,
max_reassembly_len: MAX_REASSEMBLY_LEN,
max_outbound_queue: MAX_OUTBOUND_QUEUE,
};
pub const STACK: StackBounds = StackBounds {
transport: TRANSPORT,
max_sessions: MAX_SESSIONS,
};
pub const DRIVER: DriverBounds = DriverBounds {
stack: STACK,
max_pending_notifications: MAX_PENDING_NOTIFICATIONS,
slot_ready_grace: SLOT_READY_GRACE,
slot_retry: SLOT_RETRY,
};