use ace_sim::clock::Duration;
#[derive(Debug, Clone)]
pub struct ClientConfig {
pub p2_timeout: Duration,
pub p2_extended_timeout: Duration,
pub physical_address: u16,
pub target_address: u16,
}
impl ClientConfig {
pub fn new(physical_address: u16, target_address: u16) -> Self {
Self {
p2_timeout: Duration::from_millis(150),
p2_extended_timeout: Duration::from_millis(5_000),
physical_address,
target_address,
}
}
pub fn with_p2_timeout(mut self, timeout: Duration) -> Self {
self.p2_timeout = timeout;
self
}
pub fn with_p2_extended_timeout(mut self, timeout: Duration) -> Self {
self.p2_extended_timeout = timeout;
self
}
}